Solve Cartesian Product Without Symbol: Find Answers Here

In summary: I thought it meant "Select ... as x , select ... as y , ... where ... " but I don't understand the minus in ##x-y##. Shouldn't it be an ##AND\,?##B should be something like:##\rho_e(employee), \rho_l(loan), \rho_b(books)####x \leftarrow (\pi_{isbn} (
  • #1
momentum
111
0
<Moderator's note: Moved from a technical forum and thus no template.>

Here is a problem and solution given in my book.

this is using a symbol in cartesian product .

I checked other books for cartesian product examples but there was no such symbol being used.

iRrgWqa.jpg
Here is my solution without that symbol
8zW5Tsd.jpg
Is my solution wrong ?

I'm confused.


 

Attachments

  • iRrgWqa.jpg
    iRrgWqa.jpg
    51.1 KB · Views: 748
  • 8zW5Tsd.jpg
    8zW5Tsd.jpg
    14.1 KB · Views: 613
Last edited by a moderator:
Physics news on Phys.org
  • #2
I just looked this up. That is the greek character rho (##\rho##) which means rename according to wikipedia. So employee is renamed to e, books to b, loan to c, then it creates the cartesian product. Does that help?
 
  • #3
verty said:
I just looked this up. That is the greek character rho (##\rho##) which means rename according to wikipedia. So employee is renamed to e, books to b, loan to c, then it creates the cartesian product. Does that help?
okay. But is my solution correct ?

I am not renaming. Can I do this ?
 
  • #4
I don't want to mislead you but for some reason I have an inkling that it may be necessary in the relational algebra to use rename when attributes would clash. So for example, if you were joining from employee to employee and matching each staff member to their manager, it would be necessary to use rename. I think in this problem it isn't necessary.

Why did you write employee x books x loan at the top? Should it not be in line with the rest?
 
  • #5
momentum said:
<Moderator's note: Moved from a technical forum and thus no template.>

Here is a problem and solution given in my book.

this is using a symbol in cartesian product .

I checked other books for cartesian product examples but there was no such symbol being used.

View attachment 232159Here is my solution without that symbol
View attachment 232160Is my solution wrong ?

I'm confused.

Without more context, especially the definition of a relation algebra, it is hard to tell.
##\rho## is the Greek letter ##r##, so one might suspect that it stands for relation. Also is it indexed by the three categories, which might indicate that ##\rho_{\text{employee}} \times \rho_{\text{books}} \times \rho_{\text{loan}}## is simply the phase space of all possible relations, resp. their tables in the database.
 
  • Like
Likes momentum
  • #6
verty said:
Why did you write employee x books x loan at the top? Should it not be in line with the rest?
I believe notation of sigma says, at the top you put name of the relation and at bottom you put the condition. There is no in line stuff with this syntax. Is it wrong ?
 
  • #7
momentum said:
I believe notation of sigma says, at the top you put name of the relation and at bottom you put the condition. There is no in line stuff with this syntax. Is it wrong ?

Wow I'm confused by your how your book has written these answers. I believe the answer to A given in the book should look like this (there was a typo):
$$\pi_{name} (\sigma_{e.empno = l.empno \land l.isbn = b.isbn \land b.publisher = 'McGraw-Hill'} (\rho_e(employee) \times \rho_l(loan) \times \rho_b(books)))$$
And I don't know what is going on with answer B. It just doesn't look right to me.

In your answer, I don't think putting the relation at the top is correct. Sorry, I'm doing the best I can to help.
 
  • #8
verty said:
Wow I'm confused by your how your book has written these answers. I believe the answer to A given in the book should look like this:
$$\pi_{name} (\sigma_{e.empno = l.empno \land l.isbn = b.isbn \land b.publisher = 'McGraw Hill'} (\rho_e(employee) \times \rho_l(loan) \times \rho_b(books)))$$
And I don't know what is going on with answer B. It just doesn't look right to me.

In your answer, I don't think putting the relation at the top is correct. Sorry, I'm doing the best I can to help.

okay . I understand answer to A now.

But I am confused with answer to B.

What does these mean ?
x<--
y<---

I checked relational algebra notations but could not find such notations. And so I'm stuck to understand solution B .
If solution B is not correct solution. What is the right solution ?
 
  • #9
momentum said:
okay . I understand answer to A now.

But I am confused with answer to B.

What does these mean ?
x<--
y<---

I checked relational algebra notations but could not find such notations. And so I'm stuck to understand solution B .
If this is not correct solution. What is the right solution ?
I thought it meant "Select ... as x , select ... as y , ... where ... " but I don't understand the minus in ##x-y##. Shouldn't it be an ##AND\,?##
 
  • #10
B should be something like:
##\rho_e(employee), \rho_l(loan), \rho_b(books)##
##x \leftarrow (\pi_{isbn} (\sigma_{e.empno = l.empno} (e \times l))##
##y \leftarrow (\pi_{isbn} (\sigma_{publisher = McGraw-Hill} (b))##
##\pi_{name} (\sigma_{j.isbn = l.isbn \land l.empno = e.empno} (e \times l \times \rho_j(\sigma (x - y))))##

Oh wait, this is not correct but I don't have time to fix it. This answers a different question but it's similar.

fresh_42 said:
I thought it meant "Select ... as x , select ... as y , ... where ... " but I don't understand the minus in ##x-y##. Shouldn't it be an ##AND\,?##

That x-y means tuples in x but not in y.
 
  • Like
Likes fresh_42
  • #11
momentum said:
okay . I understand answer to A now.

What does these mean ?
x<--
y<---

I checked relational algebra notations but could not find such notations. And so I'm stuck to understand solution B .
If solution B is not correct solution. What is the right solution ?

I think you may need a better book. Anyway, I don't want to explain every little thing. I think I have done the best I can here. That book looks to be particularly poor, I must say.
 

What is a Cartesian product?

A Cartesian product is a mathematical operation that combines two sets to form a new set. It is represented by the symbol "x" and is also known as a cross product.

How do you solve a Cartesian product without using symbols?

To solve a Cartesian product without using symbols, you can use the "list" method. This means writing out the elements of each set and combining them to form the new set.

What is the purpose of solving a Cartesian product without symbols?

Solving a Cartesian product without symbols can be helpful in understanding the concept of cartesian products and can also serve as a useful exercise in problem solving and critical thinking.

What are some examples of solving a Cartesian product without symbols?

For example, if set A = {1, 2} and set B = {3, 4}, the Cartesian product A x B without symbols would be written as {(1, 3), (1, 4), (2, 3), (2, 4)}.

What are the real-world applications of Cartesian products?

Cartesian products have many applications in mathematics, computer science, and other fields. In computer science, they are often used to represent data structures and in database operations. In mathematics, they are used in the study of functions and relations. In everyday life, Cartesian products can be seen in the combinations of different sets, such as menu items at a restaurant or clothing options in a store.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
582
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
896
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Precalculus Mathematics Homework Help
Replies
10
Views
2K
Replies
14
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
2K
Back
Top