min tuple=0 and maximum=min(r,s)

The Gateway to Computer Science Excellence

0 votes

Consider a relation R(A, B) that contains r tuples, and a relation S(B, C) that contains s tuples; assume r > 0 and s > 0. Make no assumptions about keys. For the following relational algebra expression, in terms of r and s the minimum and maximum number of tuples that could be in the result?

given answer is: minimum:0, maximum: min(r,s)

according to me: minimum:0, maximum: r

please give answer with proper explanation.

0

$\pi _{B}(R)-(\pi _{B}(R)-\pi _{B}(S))=\pi _{B}(R)\bigcap \pi _{B}(S)$

min tuple=0 and maximum=min(r,s)

min tuple=0 and maximum=min(r,s)

0

@amit166

it is correct that the expression reduces to the intersection operation. but from that expression we need to find the minimum and maximum.

minimum occurs when πB(R) and πB(S) are disjoint. in that case intersection will be 0.

maximum occurs when πB(R) is a subset of πB(S). in that case intersection will be R.

it is correct that the expression reduces to the intersection operation. but from that expression we need to find the minimum and maximum.

minimum occurs when πB(R) and πB(S) are disjoint. in that case intersection will be 0.

maximum occurs when πB(R) is a subset of πB(S). in that case intersection will be R.

+1

and also continue that,

maximum occurs when πB(R) is a subset of πB(S). in that case intersection will be R ===> r is minimum

maximum occurs when πB(R) is a superset of πB(S). in that case intersection will be S ===> s is minimum

so, for combning these two maximum occurs as min(r,s).

0

aambazinga take it as simple

the Relation represent : * πB*(*R*) ⋂* π**B*(*S*)

if (R<S) then MAX : R

if (S <R ) then MAX : S

therefore min (R,S)

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,384 answers

198,541 comments

105,340 users