Relational Algebra & Calculus

Answer & solution
Official answer: B
Approach: Introduce one independently chosen tuple for each person that must be witnessed.
1. Derivation. Rename three copies P1, P2, P3 of Person and take their product using two binary cross products. Select equal cities and pairwise distinct pids, then project the city. This identifies exactly cities with at least three residents. With only one cross product, selection/projection/rename can expose at most two independently chosen source tuples, which cannot witness a third distinct person. Thus the minimum is 2, option B, in the stated algebra without aggregation or other operators.
2. Explanation and checks. Write P1×P2×P3 as (P1×P2)×P3. Select P1.city=P2.city=P3.city and P1.pid≠P2.pid, P1.pid≠P3.pid, P2.pid≠P3.pid, then project P1.city. All three inequalities are necessary to prevent a two-person city from reusing one person. Rename, selection and projection do not introduce an additional independently chosen resident. This lower-bound argument assumes the stated relational algebra expression model, not a materialized intermediate relation supplied from outside the expression.