short and sweet answer

The Gateway to Computer Science Excellence

0 votes

What is the difference between the following two expressions, conceptually and in terms of relational algebra ?

1. names of girl students with more marks than some boy student

2. names of girl students with marks not less than some boy students

Can someone please give an example to illustrate the difference.

+1 vote

Just resolve the sentence using discrete maths...

x: Girl student

y: Boy student

f(z): marks of student z

then 1- {x|∃y(f(x)>f(y)}

2- {x|∄y(f(x)<f(y)}

thus the first query means select the girl whose mark is greater than any one of the the boy student( it has to be greater than minimum of the marks of boy students)

and second query means to select the girl whose marks are not less than any boy student (i.e. on negation it becomes that girls marks are greater than every boy student) thus the marks of girl should be greater than maximum marks of the boy students.

x: Girl student

y: Boy student

f(z): marks of student z

then 1- {x|∃y(f(x)>f(y)}

2- {x|∄y(f(x)<f(y)}

thus the first query means select the girl whose mark is greater than any one of the the boy student( it has to be greater than minimum of the marks of boy students)

and second query means to select the girl whose marks are not less than any boy student (i.e. on negation it becomes that girls marks are greater than every boy student) thus the marks of girl should be greater than maximum marks of the boy students.

- 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,741 questions

57,241 answers

198,009 comments

104,601 users