2
 COM103: Discrete Structures for Computer Science Problem Set 1 1. State with reasons whether the following assertions are propositions or not. (a) “This state ment is false. (b) “1 + 1 = 3.” (c) “If 1 + 1 = 3, then pigs can y .” (d) “x 2 + y 2 = 1.” 2. “If job A arr ives at the prin ter before job B, the n A wil l be printed before B.” Write the converse and the contrapositive of this statement in English. 3. Prove the follo wing equiv alences: (a)  p → q  ≡ ¬q  → ¬  p. (b)  p ↔ q  ≡ (  p → q ) (¬  p → ¬q ). (c)  ¬x(P (x) → Q(x)) ≡ x(P (x) ¬Q(x)). 4. Find a propositional formula on three varia bles p, q,r  such that it is true if and only if exactly two of  p, q,r  are set to true. 5. Sho w that ( ¬  p q ) (  p r) → ( q r) is a tautology. 6. The compou nd proposit ion ¬(  p → ¬q ) → ( r → ( ¬s → t )) is false for exactly one assignment of truth values to  p,q,r, s, t. Find this assignment without constructing the truth table. 7. Deter mine whethe r the follo wing compound propositi on is a tautology, a cont radic tion, or a contingency: ((s  p) (s ¬  p)) → ((  p → q ) → r ). 8. Let  Z be the universe of discourse. Which of the following are true? (a) ∀xy(x > y); (b) ∃xy(x > y). 9. “Ev ery Indi an has a dream.” Expres s thi s propositio n in logic using the predicate  H (  p, d) that means “  p dreams of  d ” and two universes of discours e: the universe  I  of Indians and the universe  D of dreams. 10. Let  M (x) denote “x is a man in town” and  S (x, y) denote “x shaves  y ”. Expre ss the followi ng sta tement in predi cate log ic: “The barber is a man in town who sha ves all those , and only those, men in town who do not shave themselves.” 11. Giv e logical expressio ns for the followin g statement s. Use quanti ers, connecti ves, and the predicates  P (x) and  H (x) which mean “x passed the class” and “x did all of the homework”. (a) Every student that passed the class did all of the homework. 1

questions-dm.pdf

Embed Size (px)

Citation preview

  • COM103: Discrete Structures for Computer Science

    Problem Set 1

    1. State with reasons whether the following assertions are propositions or not.

    (a) This statement is false.

    (b) 1 + 1 = 3.

    (c) If 1 + 1 = 3, then pigs can fly.

    (d) x2 + y2 = 1.

    2. If job A arrives at the printer before job B, then A will be printed before B. Write theconverse and the contrapositive of this statement in English.

    3. Prove the following equivalences:

    (a) p q q p.(b) p q (p q) (p q).(c) x(P (x) Q(x)) x(P (x) Q(x)).

    4. Find a propositional formula on three variables p, q, r such that it is true if and only if exactlytwo of p, q, r are set to true.

    5. Show that (p q) (p r) (q r) is a tautology.

    6. The compound proposition (p q) (r (s t)) is false for exactly one assignmentof truth values to p, q, r, s, t. Find this assignment without constructing the truth table.

    7. Determine whether the following compound proposition is a tautology, a contradiction, or acontingency: ((s p) (s p)) ((p q) r).

    8. Let Z be the universe of discourse. Which of the following are true?(a) xy(x > y); (b) xy(x > y).

    9. Every Indian has a dream. Express this proposition in logic using the predicate H(p, d)that means p dreams of d and two universes of discourse: the universe I of Indians and theuniverse D of dreams.

    10. Let M(x) denote x is a man in town and S(x, y) denote x shaves y. Express the followingstatement in predicate logic: The barber is a man in town who shaves all those, and onlythose, men in town who do not shave themselves.

    11. Give logical expressions for the following statements. Use quantifiers, connectives, and thepredicates P (x) and H(x) which mean x passed the class and x did all of the homework.

    (a) Every student that passed the class did all of the homework.

    1

  • (b) There was a student that passed the class, but did not do all of the homework.

    12. Let F (a, b) denote that a and b are friends. Assuming the domain is the set of all students ina school, translate the following into English:

    xyz((F (x, y) F (x, z) (y 6= z)) F (y, z)).

    13. Prove without using the resolution rule (but using other logical equivalences and inferencerules) that q r follows from p q and p r.

    14. Write a program for checking whether a propositional formula (on n variables) is satisfiable.Can you write a program that essentially consists of two subroutines?

    15. How many truth tables are possible on n variables? Provide justifications.

    16. Prove or disprove the claim that x(P (x) Q(x)) is logically equivalent toxP (x) xQ(x).

    17. Show logically that the conclusion Hummingbirds are small follows from the premisesAll hummingbirds are richly colored.No large birds live on honey.Birds that do not live on honey are dull in color.

    18. prove that if 0 x 2, then x3 + 4x2 + 1 > 0.

    19. Prove that

    3 is irrational.

    20. Prove that log2 3 is irrational.

    21. Prove that the following is true for any positive integer n:12 22 + 32 . . . + (1)n1n2 = (1)n1 n(n+1)2 .

    22. Prove by induction: For all n Z+, 13 + 23 + 33 + . . . + n3 =[

    n(n+1)2

    ]2.

    23. Prove using induction that for all n > 1

    1 +14

    +19

    + . . . +1n2

    < 2 1n

    .

    2