Exam 1 Solutions - Discrete Math Structures | MAT 243, Exams of Discrete Mathematics

Discrete Mathematics - Exam 1 Solutions Material Type: Exam; Class: Discrete Math Structures; Subject: Mathematics; University: Arizona State University - Tempe; Term: Unknown 1989;

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-3jl
koofers-user-3jl 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Solutions to exam 1
1. Construct the truth table for the following proposition:
(pq)(¬p ¬r)
Solution:
p q r p q¬p¬r¬p ¬r(pq)(¬p ¬r)
T T T T F F T T
T T F T F T F F
T F T F F F T T
T F F F F T F T
F T T T T F F F
F T F T T T T T
F F T T T F F F
F F F T T T T T
2. Express the negation of the statement so that all negation symbols
immediately precedes predicates.
yxz(T(x, y, z)Q(x, y ))
Solution:
¬(yxz(T(x, y, z)Q(x, y ))) yxz(¬T(x, y, z) ¬Q(x, y)
3. Show without using truth tables that the following logical equivalences
hold:
(a)
¬((pq)r)(¬pq) ¬r
Solution:
¬((pq)r) ¬(¬(pq)r)
¬(¬(¬pq)r)
¬((p ¬q)r)
(¬pq) ¬r)
1
pf3
pf4
pf5

Partial preview of the text

Download Exam 1 Solutions - Discrete Math Structures | MAT 243 and more Exams Discrete Mathematics in PDF only on Docsity!

Solutions to exam 1

  1. Construct the truth table for the following proposition:

(p → q) → (¬p ↔ ¬r)

Solution:

p q r p → q ¬p ¬r ¬p ↔ ¬r (p → q) → (¬p ↔ ¬r) T T T T F F T T T T F T F T F F T F T F F F T T T F F F F T F T F T T T T F F F F T F T T T T T F F T T T F F F F F F T T T T T

  1. Express the negation of the statement so that all negation symbols immediately precedes predicates.

∀y∃x∃z(T (x, y, z) ∨ Q(x, y))

Solution:

¬(∀y∃x∃z(T (x, y, z) ∨ Q(x, y))) ≡ ∃y∀x∀z(¬T (x, y, z) ∧ ¬Q(x, y)

  1. Show without using truth tables that the following logical equivalences hold:

(a) ¬((p → q) → r) ≡ (¬p ∨ q) ∧ ¬r

Solution:

¬((p → q) → r) ≡ ¬(¬(p → q) ∨ r) ≡ ¬(¬(¬p ∨ q) ∨ r) ≡ ¬((p ∧ ¬q) ∨ r) ≡ (¬p ∨ q) ∧ ¬r)

(b) ¬(a → (¬(c → d) ∧ (a → (d ∨ ¬c)))) ≡ a Solution: First note that ¬(c → d) ≡ ¬(¬c ∨ d) ≡ c ∧ ¬d and a → (d ∨ ¬c) ≡ ¬a ∨ d ∨ ¬c. Thus

¬(a → (¬(c → d) ∧ (a → (d ∨ ¬c)))) ≡ ¬(a → (c ∧ ¬d) ∧ (¬a ∨ d ∨ ¬c)) ≡ ¬(¬a ∨ ((c ∧ ¬d) ∧ (¬a ∨ d ∨ ¬c)) ≡ a ∧ [¬(c ∧ ¬d) ∨ ¬(¬a ∨ d ∨ ¬c)] ≡ a ∧ [(¬c ∨ d) ∨ (a ∧ ¬d ∧ c)] ≡ a ∧ [(¬c ∨ d ∨ a) ∧ (c ∨ d¬d) ∧ (¬c ∨ d ∨ c)] ≡ a ∧ [(¬c ∨ d ∨ a) ∧ T ∧ T ] ≡ a ∧ (¬c ∨ d ∨ a) ≡ (a ∧ ¬c) ∨ (a ∧ d) ∨ a ≡ a

  1. Translate the following english sentences into logical expressions. Use the following predicates:

W(x): x is a whole number, i.e. 1, 2 , 3 ,... N(x): x is a natural number, i.e. 0, 1 , 2 , 3 ,... Q(x): x is a rational number R(x): x is a real number G(x, y): x is greater than y

(a) Every natural number greater than 0 is a whole number. Solution: ∀x(N (x) ∧ G(x, 0)) → W (x))

(b) Some real numbers are rational numbers, but some aren’t. Solution:

∃x(R(x) ∧ Q(x)) ∧ ∃y(R(y) ∧ ¬Q(y))

  1. Prove that bn/ 2 c · dn/ 2 e = bn^2 / 4 c for all integers n. Solution: Case 1: Assume n is an even integer, that is, there exists an integer k such that n = 2k. Then

bn/ 2 c · dn/ 2 e = b 2 k/ 2 c · d 2 k/ 2 e = bkc · dke = k · k = k^2

and bn^2 / 4 c = bk^2 c = k^2

Case 2: Assume n is an odd integer, that is, there exists an integer k such that n = 2k + 1. Then

bn/ 2 c = b(2k + 1)/ 2 c = k

and dn/ 2 e = d(2k + 1)/ 2 e = k + 1 and so bn/ 2 c · dn/ 2 e = k · (k + 1) = k^2 + k. At the same time,

n^2 /4 =

4 k^2 + 4k + 1 4

= k^2 + k + 1/ 4 ,

so that bn^2 / 4 c = bk^2 + k + 1/ 4 c = k^2 + k

  1. Let A be the set {u, v, w, x} and B be the set { 1 }.

(a) Find A × B. Solution:

A × B = {(u, 1), (v, 1), (w, 1), (x, 1)}

(b) Find the power set of A. Solution: {∅, {u}, {v}, {w}, {x}, {u, v}, {u, w}, {u, x}, {v, w}, {v, x}, {w, x}, {u, v, w}, {u, v, x}, {u, w, x}, {v, w, x}, {u, v, w, x}}

  1. Let Ai = { 2 ,... , 2 i}.

(a) Write down A 1 , A 2 , and A 3. Solution: A 1 = { 2 }, A 2 = { 2 , 4 }, A 3 = { 2 , 4 , 6 }, (b) Find ⋃∞

i=

Ai

and prove your claim. Solution: ⋃∞ i=1 Ai^ =^ {^2 ,^4 ,^6 ,.. .}^ =^ {x^ |^ x^ is a positive even integer}.^ Since all members of all the Ai sets are even positive integers, the union may only contain even positive integers. On the other hand, it contains all of them, since if we pick any positive even integer k, then k ∈ Ak, so k is in the union. (c) Find ⋂∞

i=

Ai

and prove your claim. Solution: Since A 1 = { 2 }, A 2 = { 2 , 4 },... it is obvious that all sets contain

  1. On the other hand, the intersection cannot contain any element which is not contained in A 1.
  2. (a) Let f : Z → Z be the function f (x) = 3x − 1. Determine whether f is onto (surjective). Prove your claim. Solution: It is not onto, since there is no integer x for which 3 x − 1 = 1. (b) Let f : R → R be the function f (x) = 3x − 1. Determine whether f is a one-to-one correspondence (bijection). Prove your claim. Solution: It is a injective (one-to-one), since if 3x − 1 = 3y − 1 then x = y. It is onto since for any real number y there exists a real number x such that 3x − 1 = y. This number is y+1 3. So the function is bijective. (Note that Z denotes the set of integers, and R the set of real numbers.)