CS1502, Fall 2004 Some practice questions for Exam 2. This doesn't have questions covering all the things that will be on the exam. I think it will be useful practice to supplement the lecture notes and assignments. Part I:==================== Which of the following are true, and which are false? (Read the first one as "A logically follows from A^B" or "A is entailed by A^B". Though the book does not use this terminology often, it is common terminology). 1. A ^ B |= A 2. A |= A ^ B 3. A v B |= B 4. B |= A v B 5. ~(P ^ A) |= ~P v ~A 6. ~P v ~A |= ~(P ^ A) 7. P |= Q 8. Q |= P 9. ~P |= P 10. P |= ~P 11. P ^ (~P v Q) |= Q 12. Q |= P ^ (~P v Q) 13. all x P(x) |= ~exists x ~P(x) 14. ~exists x ~P(x) |= all x P(x) Which of the following are logical truths? Which are logically satisfiable but not logical truths? Which are not logically satisfiable? (Note: these involve the same sentences as above) 16. (A ^ B) --> A 17. A --> (A ^ B) 18. (A v B) --> B 19. B --> (A v B) 20. ~(P ^ A) --> (~P v ~A) 21. (~P v ~A) --> ~(P ^ A) 22. P --> Q 23. Q --> P 24. ~P --> P 25. P --> ~P 26. (P ^ (~P v Q)) --> Q 27. Q --> (P ^ (~P v Q)) 28. all x P(x) --> ~exists x ~P(x) 29. ~exists x ~P(x) --> all x P(x) 30. (P ^ (~P v Q)) --> Q 31. (A ^ B) <--> A 32. A <--> (A ^ B) 33. (A v B) <--> B 34. B <--> (A v B) 35. ~(P ^ A) <--> (~P v ~A) 36. (~P v ~A) <--> ~(P ^ A) 37. P <--> Q 38. Q <--> P 39. ~P <--> P 40. P <--> ~P 41. (P ^ (~P v Q)) <--> Q 42. Q <--> (P ^ (~P v Q)) 43. all x P(x) <--> ~exists x ~P(x) 44. ~exists x ~P(x) <--> all x P(x) 45. (P ^ (~P v Q)) <--> Q Which of the following pairs are logically equivalent? (Note1: these involve the same sentences as above) 46. (A ^ B), A 47. A, (A ^ B) 48. (A v B), B 49. B , (A v B) 50. ~(P ^ A), (~P v ~A) 51. (~P v ~A) , ~(P ^ A) 52. P, Q 53. Q, P 54. ~P, P 55. P, ~P 56. (P ^ (~P v Q)), Q 57. Q, (P ^ (~P v Q)) 58. all x P(x), ~exists x ~P(x) 59. ~exists x ~P(x), all x P(x) 60. (P ^ (~P v Q)), Q Which of the following are logically valid arguments? 60.5 P ^ ~P ------ Q v R 61. (A ^ B) --- A 62. A --- (A ^ B) 63. (A v B) --- B 64. B --- (A v B) 65. ~(P ^ A) --- (~P v ~A) 66. (~P v ~A) --- ~(P ^ A) 67. P --- Q 68. Q --- P 69. ~P -- P 70. P --- ~P 71. (P ^ (~P v Q)) --- Q 72. Q --- (P ^ (~P v Q)) 73. all x P(x) --- ~exists x ~P(x) 74. ~exists x ~P(x) --- all x P(x) 75. (P ^ (~P v Q)) --- Q Part II:============================= For each of the following, state whether it is a valid argument. If it is not valid, give a counter example showing it is not. all x (Student(x) --> Smart(x)) all x Student(x) --- all x Smart(x) -------------------------- all x Student(x) all x Smart(x) --- all x (Student(x) ^ Smart(x)) -------------------------- exists x (Student(x) --> Smart(x)) exists x Student(x) --- exists x Smart(x) -------------------------- exists x Student(x) exists x Smart(x) --- exists x (Student(x) ^ Smart(x)) -------------------------- -------------------------- Are the following pairs logically equivalent? If not, give an example that shows that they are not. all x (P(x) ^ Q(x)), all x P(x) ^ all x Q(x) -------------------------- all x (P(x) v Q(x)), all x P(x) v all x Q(x). -------------------------- exists x (P(x) v Q(x)), exists x P(x) v exists x Q(x) -------------------------- exists x (P(x) ^ Q(x)), exists x P(x) ^ exists x Q(x) Part III:============================= Consider a world with only two shapes. They are both tets and they are in the same row. Is the following sentence true? all x all y ((cube(x) ^ cube(y)) --> (leftof(x,y) v rightof(x,y))) ---------------------------- Express the following sentences in English (where taken(x,y) means that student x took class y): exists x exists y taken(x,y) exists x all y taken(x,y) all x exists y taken(x,y) exists y all x taken(x,y) all y exists x taken(x,y) exists y (small(y) ^ all x(small(y) --> y=x)) ------------- Suppose Q(x,y,z) is the statement x+y=z The domain of discourse is the real numbers. Are the following sentences true? all x all y exists z Q(x,y,z) exists z all x all y Q(x,y,z) --------- Express the following sentences in logic (where L(x,y) means that x loves y, and the domain of discourse for both x and y is the set of all people in the world) everybody loves fred every loves somebody there is someone whom no one loves everyone loves himself or herself -------------------- Express the following in logic. First do this using both function and predicate symbols, and then do it using only predicate symbols. Everyone has exactly one mother, who is a woman.