The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+12 votes
544 views
Give a relational algebra expression using only the minimum number of operators from $(∪, −)$ which is equivalent to $R$ $∩$ $S.$
asked in Set Theory & Algebra by Veteran (59.5k points)
edited by | 544 views

3 Answers

+28 votes
Best answer

$R-(R-S)$

There is no need to use Union operator here.

Just because they say you can use operators from $(∪, −)$ we don't need to use both of them.

Also they are saying that only the minimum number of operators from (∪, −) which is equivalent to $R ∩ S$.

My expression is Minimal.

answered by Boss (42.8k points)
edited by
0
can you give any example ...according to your solution ....
+3

air1ankit  see this example

+11 votes
Answer: R − ((R ∪ S) − S)

Just imagine the Venn diagram in mind.
answered by Boss (34k points)
0

Can you please say Is it necessary to use both U,-?

Can I represent  R ∩ S=R-(U-S) ?

where U is the universal set.

+2
You should answer what the question demands. So you have to use only (∪, −) operators with R and S.
+4

Question says only the minimum number of operators from (∪, −) which is equivalent to R ∩ S. Using union is unnecessary here !

0 votes
p ={(1,1) , (2,2) , (1,2)}

q={(1,2) , (2,10) ,(3,2)}

p ח q = { (1,2) }

p-q={ (1,1) (2,2) }

p-(p-q) = { (1,2) }

so  p-(p-q) = p ח q = { (1,2) }
answered by Active (3.7k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,529 questions
46,674 answers
139,821 comments
57,586 users