1

I understand what they are and I have seen examples regarding these. One such example is

{t.Fname,t.Lname|Employee(t) AND (∃d)(Department(d) AND d.Dname='Research' AND d.Dnumber=t.Dno)}

Now what is the difference between above and this

{t.Fname,t.Lname|Employee(t) AND Department(d) AND d.Dname='Research' AND d.Dnumber=t.Dno}

And how is

(∀x) (P(x)) ≡ NOT (∃x) (NOT (P(x)))

Can someone please explain ?

Prabhat
  • 2,261
  • 7
  • 46
  • 74

1 Answers1

2

For every x P(x) means that all x satisfy P, which means that there doesn't exist an x which doesn't satisfy P, hence

(∀x) (P(x)) ≡ NOT (∃x) (NOT (P(x)))

Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434
  • I understand the principle but did not understand the formula. The LHS says for all x, P(x) returns true. And the RHS is what I am not understanding. NOT (P(x)) actually means tuples (rows) from table other than P. – Prabhat Mar 13 '11 at 15:01
  • @Prabhat: the RHS. without the first NOT means: There exists a row that doesn't saisfy P. With the first NOT it means: There DOESN"T exist a row that doesn't satisfy P, which is the same as to say that all rows satisfy P – Armen Tsirunyan Mar 13 '11 at 15:03
  • @Armen - Thanks. Then what about the reverse case ? (∃x) (P(x)) ≡ NOT (∀x) (NOT (P(x))) – Prabhat Mar 13 '11 at 15:07
  • @Prabhat: LHS means: there exists a row for which P(x). The RHS without the first NOT means: for all rows P is NOT satisfied. With the first NOT it means: not for all rows P isn't satisfied, which means there exists at least one row for which it is. – Armen Tsirunyan Mar 13 '11 at 15:11
  • @ Armen - Thanks. Rep++ Can you say something about the example in the post. – Prabhat Mar 13 '11 at 15:17
  • @Prabhat: Unfortunately I can't because I am not very familiar with the notation you are using... if you could convert them to SQL queries, I'd try to tell you the difference – Armen Tsirunyan Mar 13 '11 at 15:19
  • @ Armen - The query is to list the name of all employees who work for the 'Research' department. – Prabhat Mar 13 '11 at 15:24