# n-ary relations and their applications

• Jun 7th 2008, 02:14 PM
robocop_911
n-ary relations and their applications
Can anybody do the following problem?
I don't know how to go about doing it...

Give an example to show that if R and S are both n-ary relations, then

\$\displaystyle
P_{i_1,i_2,...,i_m}(R \cap S)\$ may be different from \$\displaystyle
P_{i_1,i_2,...,i_m}(R) \cap P_{i_1,i_2,...,i_m}(S) \$
• Jun 7th 2008, 02:31 PM
Plato
Quote:

Originally Posted by robocop_911
Give an example to show that if R and S are both n-ary relations, then\$\displaystyle
P_{i_1,i_2,...,i_m}(R \cap S)\$ may be different from \$\displaystyle
P_{i_1,i_2,...,i_m}(R) \cap P_{i_1,i_2,...,i_m}(S) \$

How does your text define \$\displaystyle P_{i_1,i_2,...,i_m}(S)\$?
• Jun 7th 2008, 02:46 PM
robocop_911
Quote:

Originally Posted by Plato
How does your text define \$\displaystyle P_{i_1,i_2,...,i_m}(S)\$?

The projection \$\displaystyle P_{i_1,i_2,...,i_m}\$ where \$\displaystyle i_1 < i_2 < ... < i_m\$, maps the n-tuple \$\displaystyle (a_1, a_2,..., a_n) \$ to the m-tuple \$\displaystyle (a_{i_1}, a_{i_2}, ..., a_{i_m})\$, where m <= n.

In other words, the projection P_i1, i_2,..., i_m deletes \$\displaystyle n-m\$ of the components of an n-tuple, levaing the i1th, i2th and imth components.
• Jun 7th 2008, 02:57 PM
robocop_911
Quote:

Originally Posted by robocop_911
The projection \$\displaystyle P_{i_1,i_2,...,i_m}\$ where \$\displaystyle i_1 < i_2 < ... < i_m\$, maps the n-tuple \$\displaystyle (a_1, a_2,..., a_n) \$ to the m-tuple \$\displaystyle (a_{i_1}, a_{i_2}, ..., a_{i_m})\$, where m <= n.

In other words, the projection P_i1, i_2,..., i_m deletes \$\displaystyle n-m\$ of the components of an n-tuple, levaing the i1th, i2th and imth components.

For example:
If \$\displaystyle P_{1,3}\$ is applied to a 4 tuple (2,3,0,4) gives (2,0)