CSE 215: Foundations of Computer Science Name: ID#: Recitation Exercises Set #2 Section #: Stony Brook University /4 Score: Unit 3: Digital Logic Circuits 1. Draw a circuit diagram corresponding to the following Boolean expression: (A ∨ B) ∧ (B ∨ C) Answer: 2. Draw a circuit diagram corresponding to the following Boolean expression: (∼A ∧ B) ∨ ∼(B ∨ C) Answer: 3. Draw a circuit diagram corresponding to the following Boolean expression: ∼(A ∧ B) ∨ ∼(C ∧ D) Answer: CSE 215 R01/R02/R06 Page 1 of 6 4. Give the input/output table for the circuit given below. Hint: first find a Boolean expression that corresponds to the circuit. A 1 1 0 0 B 1 0 1 0 S = (A ∧ B) ∨ (A ∨ B) 1 1 1 0 5. Give the input/output table for the circuit given below. Hint: first find a Boolean expression that corresponds to the circuit. A 1 1 1 1 0 0 0 0 B 1 1 0 0 1 1 0 0 C 1 0 1 0 1 0 1 0 S = ∼(B ∧ C) ∨ ∼((A ∧ B) ∨ ∼C) 0 1 1 1 1 1 1 1 CSE 215 R01/R02/R06 Page 2 of 6 6. Draw a circuit for the input/output table given below. Use only one-input and two-input gates. Hint: first find a Boolean expression that corresponds to the input/output table. P 1 1 1 1 0 0 0 0 Q 1 1 0 0 1 1 0 0 R 1 0 1 0 1 0 1 0 S 0 1 1 0 1 0 0 0 S = (P ∧ Q ∧ ∼R) ∨ (P ∧ ∼Q ∧ R) ∨ (∼P ∧ Q ∧ R) 7. Find the Boolean expression that corresponds to the circuit given below. Do not simplify the circuit before giving your answer. S = ∼((P ∨ Q) ∧ ∼(P ∨ ∼R)) ∧ (Q ∧ R) CSE 215 R01/R02/R06 Page 3 of 6 Unit 4: Predicates and Quantified Statements 8. Find a counterexample to show that the following statement is false: ∀x ∈ R, x > 1/x Counterexample: Let x = 1 6> 11 . (This is one counterexample among many.) 9. Consider the following statement: ∀ basketball players x, x is tall. Which of the following are equivalent ways of expressing this statement? a. Every basketball player is tall. b. Among all the basketball players, some are tall. c. Some of all the tall people are basketball players. d. Anyone who is tall is a basketball player. e. All people who are basketball players are tall. f. Anyone who is a basketball player is a tall person. (a), (e) and (f) are all equivalent. Review with the students why they are equivalent, writing symbolic notation if needed. 10. Rewrite the statement “All equilateral triangles are isosceles.” in the following two forms: • “∀x, if • “∀ then .” x, .” ∀x if x is an equilateral triangle, then x is isosceles. ∀x equilateral triangles x, x is isosceles. 11. Rewrite the statement “Some hatters are mad.” in the following two forms: • “∃ x such that • “∃x such that and .” .” ∃ a hatter x such that x is mad. ∃x such that x is a hatter and x is mad. CSE 215 R01/R02/R06 Page 4 of 6 12. Rewrite each statement without using quantifiers or variables. Indicate which are true and which are false, and briefly justify your answers. Let the domain of x be the set D of objects discussed in mathematics courses, and let Real(x) be “x is a real number,” Pos(x) be “x is a positive real number,” Neg(x) be “x is a negative real number,” and Int(x) be “x is an integer.” a. ∀x, Real(x) ∧ Neg(x) → Pos(−x). b. ∃x such that Real(x) ∧ ∼Int(x). a. One possible answer: If a real number is negative, then when its opposite is computed, the result is a positive real number. This statement is true because for all real numbers x, −(| − x|) = |x| (and any negative real number can be represented as −|x|, for some real number x). b. One possible answer: There is a real number that is not an integer. This statement is true. For instance, 1 2 is a real number that is not an integer. 13. Write a negation of the following statement: ∀ real numbers x, if x2 ≥ 1 then x > 0. ∃ a real number x such that x2 ≥ 1 and x ≥ 6 0. In other words, ∃ a real number x such that x2 ≥ 1 and x ≤ 0. There is a real number whose square is at least 1 but that is not greater than 0. Some real numbers that are less than or equal to zero have squares that are greater than or equal to one. 14. Write the converse, inverse, and contrapositive of the statement from the previous question. Indicate as best as you can which among the statement, its converse, its inverse, and its contrapositive are true and which are false. Give a counterexample for each that is false. Statement: ∀ real numbers x, if x2 ≥ 1 then x > 0. Contrapositive: ∀ real numbers x, if x ≤ 0 then x2 < 1. Converse: ∀ real numbers x, if x > 0 then x2 ≥ 1. Inverse: ∀ real numbers x, if x2 < 1 then x ≤ 0. The statement and its contrapositive are false. As a counterexample, let x = −2. Then x2 = (−2)2 = 4, and so x ≥ 1. However, x 6> 0. The converse and the inverse are also false. As a counterexample, let x = 12 . Then x2 = 41 , and so x > 0 but x2 ≥ 6 1. CSE 215 R01/R02/R06 Page 5 of 6 15. Rewrite the following statement in if-then form: “Earning a grade of C- in this course is a sufficient condition for it to count toward graduation.” If a person earns a grade of C- in this course, then the course counts toward graduation. 16. Use the facts that the negation of a ∀ statement is a ∃ statement and that the negation of an if-then statement is an and statement to rewrite the following statement without using the words necessary or sufficient: “Being divisible by 8 is not a necessary condition for being divisible by 4.” It is not the case that if a number is divisible by 4, then that number is divisible by 8. In other words, there is a number that is divisible by 4 and is not divisible by 8. CSE 215 R01/R02/R06 Page 6 of 6
© Copyright 2025 Paperzz