Q1) For each of the following assertions, state whether it is true/false, and justify the answer. a) \forall x (A(x)-->B(x)) logically implies \exists x (A(x)/\B(x)) Not true; suppose for all values of x, A(x) is false. Then the LHS is true where as the RHS is always false. b) \exists x (A(x)--> ~B(x)) LEQV ~\forall x(A(x)/\B(x)) True: \exists x (A(x)--> ~B(x)) LEQV \exists x(~A(x)\/~B(x)) LEQV \exists x ~(A(x)/\B(x)) LEQV ~\forall x (A(x)/\B(x)) c) \exists x A(x) /\ \exists x ~A(x) LEQV \exists x (A(x)/\ ~A(x)) not true; Let A(x) mean: x is >0. Then for integers, the LHS is true (as there both negative and non-negative numbers) but the RHS is false for all interpretation of A(x). Q2) A formula involving predicates and quantifiers is in Prenex Normal Form if and only if it is of the form Q_1 x_1 Q_2 x_2....Q_kx_k E where k>=0, each Q_i is a quantifier (\forall, \exists) and E is a quantifier-free formula. For example \forall x\exists y (S(x,y)-->M(y)) is in PNF. It can be shown that: Theorem: For every formula F, there is a PNF formula F' that is LEQV to F. Transform the following formula to a LEQV form in PNF. \forall x(\forall z (P(x,y,z)\/ \exists u S(z,u))--> M(z)) LEQV \forall x(\forall v (P(x,y,v)\/ \exists u S(v,u))-->M(z)) (change of var) LEQV \forall x\exists v ((P(x,y,v)\/\exists u S(v,u))-->M(z)) (by IIe) LEQV \forall x\exists v (\exists u(P(x,y,v)\/ S(v,u))-->M(z)) (by IIb) LEQV \forall x\exists v\forall u((P(x,y,v)\/ S(v,u))-->M(z)) (by IIe) Q3) Consider the library database system example covered in lectures which involves three predicates Books(b,t,a); Subs(s,n,a); and Borrowed(s,b,d). Write the predicate formula for the following queries: a) titles of the books every copy of which was borrowed by all subscribers. \exists b \exists a (Books(b,t,a) /\ \forall s(\exists n\exists a Subs(s,n,a)--> \forall b' (Books(b',t,a)--> \exists d Borrowed(s,b',d))) b) titles of the books one copy of which have been borrowed by all subscribers \exists b\exists a (Books(b,t,a) /\ \forall s(\exists n\exists a Subs(s,n,a)--> \exists b' (Books(b',t,a) /\ \exists d Borrowed(s,b',d)))