Similar questions 6 more →
Relational Algebra & Calculus
![Question 45, GATE 2009: Relations r on R={a, b, c}, s on S={c}. I=π_ab(r)−π_ab((π_ab(r)×s)−r). II={t∈π_ab(r):∀u∈s ∃v∈r(u=v[c]∧t=v[ab])}. III replaces that quantification by∀v∈r ∃u∈s with the same equality predicates. IV SELECT R.a, R.b FROM R, S WHERE R.c=S.c. Which pair is equivalent? A I/II; B I/III; C II/IV; D III/IV.](../../assets/questions/CS-2009-Q45-1.webp)
Answer & solution
Answer: A (no official key was published)
I begins with candidate(a, b) pairs from r and removes those for which some c in s is missing from r, exactly relational division r÷s. II expresses the same condition: for every tuple u in s there exists a tuple v in r matching both u’s c and the candidate(a, b). Thus I and II are equivalent, A, including empty s because both restrict candidates to the projection of r. III reverses the quantifiers and requires all r tuples to share the candidate pair; IV is only an existential matching join, not universal division.
Division asks for candidates paired with every c in s. Expression I constructs all required candidate/c combinations, subtracts actual tuples to find missing combinations, then removes the candidates with any missing one. II directly quantifies the same every-c requirement. A join only requires at least one matching c, so IV cannot replace division. Empty s is handled consistently because both I and II retain candidates only fromπ_ab(r), rather than introducing an infinite domain.