discrete structures | homework 1

15
Discrete Structures — Homework 1 Due: January 28. Section 1.1 16 Determine whether these biconditionals are true or false. (4 pt) a) 2+2=4 if and only if 1+1=2 b) 1+1=2 if and only if 2+3=4 c) 1+1=3 if and only if monkeys can fly d) 0 > 1 if and only if 2 > 1 30 How many rows appear in a truth table for each of these compound propositions? (4 pt) a) (q →¬p) (¬p →¬q) b) (p ∨¬t) (p ∨¬s) c) (p r) (¬s →¬t) (¬u v) d) (p r s) (q t) (r ∧¬t) 32 Construct a truth table for each of these compound propositions. (3 pt) a) p →¬p c) p (p q) e) (q →¬p) (p q) EC Find a compound proposition (a formula) using the variables p, q and r such that changing the truth value of one variable always also changes the truth value of the compound proposition. (2.5 pt) Section 1.3 6 Use a truth table to verify the first De Morgan law ¬(p q) ≡¬p ∨¬q. (1 pt) 10 Show that each of these conditional statements is a tautology. (4 pt) You will get bonus points if you show it without a truth table. a) [¬p (p q)] q b) [(p q) (q r)] (p r) c) [p (p q)] q d) [(p q) (p r) (q r)] r

Upload: others

Post on 11-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Structures | Homework 1

Discrete Structures — Homework 1

Due: January 28.

Section 1.1

16 Determine whether these biconditionals are true or false. (4 pt)

a) 2 + 2 = 4 if and only if 1 + 1 = 2

b) 1 + 1 = 2 if and only if 2 + 3 = 4

c) 1 + 1 = 3 if and only if monkeys can flyd) 0 > 1 if and only if 2 > 1

30 How many rows appear in a truth table for each of these compound propositions? (4 pt)

a) (q → ¬p) ∨ (¬p → ¬q)

b) (p ∨ ¬t) ∧ (p ∨ ¬s)

c) (p → r) ∨ (¬s → ¬t) ∨ (¬u → v)

d) (p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r ∧ ¬t)

32 Construct a truth table for each of these compound propositions. (3 pt)

a) p → ¬p

c) p ⊕ (p ∨ q)

e) (q → ¬p) ↔ (p ↔ q)

EC Find a compound proposition (a formula) using the variables p, q and r such that changing thetruth value of one variable always also changes the truth value of the compound proposition.

(2.5 pt)

Section 1.3

6 Use a truth table to verify the first De Morgan law ¬(p ∧ q) ≡ ¬p ∨ ¬q. (1 pt)

10 Show that each of these conditional statements is a tautology. (4 pt)

You will get bonus points if you show it without a truth table.

a) [¬p ∧ (p ∨ q)] → q

b) [(p → q) ∧ (q → r)] → (p → r)

c) [p ∧ (p → q)] → q

d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r

Page 2: Discrete Structures | Homework 1

Discrete Structures — Homework 2

Due: February 4.

Section 1.4

10 LetC(x) be the statement “x has a cat,” letD(x) be the statement “x has a dog,” and let F (x) bethe statement “x has a ferret.” Express each of these statements in terms of C(x), D(x), F (x),quantifiers, and logical connectivities. Let the domain consist of all students in your class. (4 pt)a) A student in your class has a cat, a dog, and a ferret.b) All students in your class have a cat, a dog, or a ferret.c) Some student in your class has a cat and a ferret, but not a dog.d) No student in your class has a cat, a dog, and a ferret.e) For each of the three animals, cats, dogs, and ferrets there is a student in your class who has

this animal as pet.

16 Determine the truth value of each of these statements if the domain of each variable consistsof all real numbers. (4 pt)a) ∃x : x2 = 2

b) ∃x : x2 = −1

c) ∀x : x2 + 2 ≥ 1

d) ∀x : x2 ̸= x

36 Find a counterexample, if possible, to these universally quantified statements, where the do-main for all variables consists of all real numbers. (3 pt)a) ∀x : x2 ̸= x

b) ∀x : x2 ̸= 2

c) ∀x : |x| > 0

Section 1.5

32 Express the negations of each of these statements so that all negation symbols immediatelyprecede predicates. (4 pt)a) ∃z ∀y ∀xT (x, y, z)

b) ∃x ∃ y P (x, y) ∧ ∀x ∀y Q(x, y)

c) ∃x ∃y (Q(x, y) ↔ Q(y, x))

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

40 Find a counterexample, if possible, to these universally quantified statements, where the do-main for all variables consists of all integers. (3 pt)a) ∀x ∃y : x = 1/y

b) ∀x ∃y : y2 − x < 100

c) ∀x ∀y : x2 ̸= y3

EC Which of the following statements is right, which is wrong? Explain your answer. (4 pt)a) ∀xF (x) ∧ ∀xG(x) ≡ ∀x (F (x) ∧ G(x))

b) ∀xF (x) ∨ ∀xG(x) ≡ ∀x (F (x) ∨ G(x))

c) ∃xF (x) ∧ ∃xG(x) ≡ ∃x (F (x) ∧ G(x))

d) ∃xF (x) ∨ ∃xG(x) ≡ ∃x (F (x) ∨ G(x))

Page 3: Discrete Structures | Homework 1

Discrete Structures — Homework 3

Due: February 18.

Section 1.6

6 Use rules of inference to show that the hypotheses “If it does not rain or it is not foggy, thenthe sailing race will be held and the lifesaving demonstration will go on.,” “If the sailing race isheld, then the trophy will be awarded,” and “The trophy was not awarded” imply the conclusion“It rained.” (4 pt)

Please use the following variables:r - It rains.f - It is foggy.s - The sailing race will be held.l - The life saving demonstration will go on.t - The trophy will be awarded.

24 Identify the error or errors in this argument that supposedly shows that if ∀x(P (x)∨Q(x)) istrue then ∀xP (x) ∨ ∀xQ(x) is true. (3 pt)

(1) ∀x(P (x) ∨Q(x)

)Premise

(2) P (c) ∨Q(c) Universal instantiation from (1)(3) P (c) Simplification from (2)(4) ∀xP (x) Universal generalisation from (3)(5) Q(c) Simplification from (2)(6) ∀xQ(x) Universal generalisation from (5)(7) ∀xP (x) ∨ ∀xQ(x) Conjunction from (4) and (6)

28 Use rules of inference to show that if ∀x (P (x) ∨ Q(x)

)and ∀x (

(¬P (x) ∧ Q(x)) → R(x))

are true, then ∀x (¬R(x) → P (x))is also true, where the domains of all quantifiers are the

same. (3 pt)

Section 1.7

6 Use a direct proof to show that the product of two odd numbers is odd. (2 pt)

26 Prove that if n is a positive integer, then n is even if and only if 7n + 4 is even. (2 pt)

32 Show that these statements about the real number x are equivalent: (2 pt)

(i) x is rational(ii) x/2 is rational(iii) 3x− 1 is rational.

Page 4: Discrete Structures | Homework 1

Section 1.8

12 Show that the product of two of the numbers 651000−82001+3177, 791212−92399+22001, and244493 − 58192 + 71777 is nonnegative. Is your proof constructive or nonconstructive? (2 pt)

Hint. Ignore the value of the given numbers and don’t try to find out if they are positive or negative.

20 Prove that given real number x there exist unique numbers n and ϵ such than x = n + ϵ, n isan integer, and 0 ≤ ϵ < 1 (2 pt)

34 Prove that 3√2 is irrational. (2 pt)

Hint. Example 10 of section 1.7 in the textbook (page 86) proves that√2 is irrational.

EC Prove the following statement: If a line L does not intersect a diagonal of a convex polygon Pthen L can intersect only one of the two subpolygons defined by that diagonal. (2 pt)

2

Page 5: Discrete Structures | Homework 1

Discrete Structures — Homework 4

Due: February 25.

Section 2.1

10 Determine whether these statements are true or false. (7 pt)a) ∅ ∈ {∅}b) ∅ ∈ {∅, {∅}}c) {∅} ∈ {∅}d) {∅} ∈ {{∅}}e) {∅} ⊂ {∅, {∅}}f) {{∅}} ⊂ {∅, {∅}}g) {{∅}} ⊂ {{∅}, {∅}}

18 Find two sets A and B such that A ∈ B and A ⊆ B. (1 pt)

24 Determine whether each of these sets is the power set of a set, where a and b are distinct ele-ments. (4 pt)a) ∅b) {∅, {a}}c) {∅, {a}, {∅, a}}d) {∅, {a}, {b}, {a, b}}

Section 2.2

4 LetA = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find (4 pt)a) A ∪ B

b) A ∩ B

c) A − B

d) B − A

12 Prove the first absorption law: A ∪ (A ∩ B) = A. (2 pt)

18 LetA, B, and C be sets. Show that (3 pt)a) (A ∪ B) ⊆ (A ∪ B ∪ C).c) (A − B) − C ⊆ A − C.e) (B − A) ∪ (C − A) = (B ∪ C) − A.

50 Find⋃∞

i=1 Ai and⋂∞

i=1 Ai if for every positive integer i (4 pt)a) Ai = {i, i + 1, i + 2, . . .}b) Ai = {0, i}c) Ai = (0, i), that is, the set of real numbers x with 0 < x < i.d) Ai = (i,∞), that is, the set of real numbers x with x > i.

EC Show that (A1 ∩ A2) × (B1 ∩ B2) = (A1 × B1) ∩ (A2 × B2). (2 pt)

Page 6: Discrete Structures | Homework 1

Discrete Structures — Homework 5

Due: March 11.

Section 2.3

12 Determine whether each of these functions from Z to Z is one-to-one. (4 pt)

a) f(n) = n − 1

b) f(n) = n2 + 1

c) f(n) = n3

d) f(n) =⌈n2

14 Determine whether f : Z × Z → Z is onto if (3 pt)

a) f(m,n) = 2m − n

c) f(m,n) = m + n + 1

e) f(m,n) = m2 − 4

22 Determine whether each of these functions is a bijection from R to R. (4 pt)

a) f(x) = −3x + 4

b) f(x) = −3x2 + 7

c) f(x) = x+1x+2

d) f(x) = x5 + 1

EC Given a function f : X → Y . Define a set F which represents f . (3 pt)

Note. To represent the image of an element x ∈ X , you can use f(x).Hint. If you draw the function in a coordinate system, how would you define the set of points drawn?

Section 2.4

4 What are the terms a0, a1, a2, and a3 of the sequence {an}, where an equals (4 pt)

a) (−2)n?b) 3?c) 7 + 4n?d) 2n + (−2)n?

16 Find the solution to each of these recurrence relations with the given initial conditions. Use aniterative approach such as that used in Example 10. (4 pt)

a) an = −an−1, a0 = 5

c) an = an−1 − n, a0 = 4

e) an = (n + 1)an−1, a0 = 2

f) an = 2nan−1, a0 = 3

Page 7: Discrete Structures | Homework 1

26 For each of these lists of integers, provide a simple formula or rule that generates the termsof an integer sequence that begins with the given list. Assuming that your formula or rule iscorrect, determine the next three steps of the sequence. (4 pt)

a) 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, . . .

c) 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, . . .

e) 0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, . . .

g) 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1

34 Compute each of these double sums. (4 pt)

a)3∑

i=1

2∑

j=1

(i − j)

b)3∑

i=0

2∑

j=0

(3i + 2j)

c)3∑

i=1

2∑

j=0

j

d)2∑

i=0

3∑

j=0

i2j3

2

Page 8: Discrete Structures | Homework 1

Discrete Structures — Homework 6

Due: March 18.

Section 2.5

6 Suppose that Hilbert’s GrandHotel is fully occupied, but the hotel closes all the even numberedrooms for maintenance. Show that all guests can remain in the hotel. (2 pt)

8 Show that a countable infinite number of guests arriving atHilbert’s fully occupiedGrandHotelcan be given rooms without evicting any current guest. (2 pt)

Section 5.1

4 Let P (n) be the statement that 13 +23 + · · ·+n3 = (n(n+1)/2)2 for the positive integer n.(2 pt)

a) What is the statement P (1)?b) Show that P (1).c) What is the inductive hypothesis?d) What do you need to prove the inductive stepe) Complete the inductive step, identifying where you use the inductive hypothesis.

6 Prove that 1 · 1! + 2 · 2! + · · ·+ n · n! = (n+ 1)!− 1 whenever n is a positive integer. (2 pt)

32 Prove that 3 divides n3 + 2n whenever n is a positive integer. (2 pt)

40 Prove that if A1, A2, . . . , An and B are sets, then (A1 ∩ A2 ∩ · · · ∩ An) ∪ B = (A1 ∪ B) ∩(A2 ∪ B) ∩ · · · ∩ (An ∪ B). (2 pt)

49 What is wrong with this “proof” that all horses are the same colour? (1 pt)

Let P (n) be the proposition that all the horses in a set of horses are the same color.Basis Step: Clearly, P (1) is true.Inductive Step: Assume that P (k) is true, so that all the horses in any set of k horses are the same colour.Consider any k + 1 horses; number theses as horses 1, 2, 3, . . . , k, k + 1. Now the first k of these horsesmust have the same color, and the last k of these must have the same color. Because the set of the first khorses and the set of the last k horses overlap, all k + 1 must be the same color. This shows that P (k + 1)is true and finishes the proof by induction.

51 What is wrong with this “proof”? (1 pt)

Theorem. For every positive integer n, if x and y are positive integers with max(x, y) = n, then x = y.

Basis Step: Suppose that n = 1. If max(x, y) = 1 and x and y are positive integers, we have x = 1 andy = 1.

Page 9: Discrete Structures | Homework 1

Inductive Step: Let k be a positive integer. Assume that whenever max(x, y) = k and x and y arepositive integers, then x = y. Now let max(x, y) = k + 1, where x and y are positive integers. Thenmax(x− 1, y − 1) = k, so by the inductive hypothesis, x− 1 = y − 1. It follows that x = y, completingthe inductive step.

Section 5.3

10 Give a recursive definition of Sm(n) = m + n, the sum of the integerm and the nonnegativeinteger n. (2 pt)

25 Give a recursive definition of (6 pt)

a) the set of odd positive integers.b) the set of positive integer powers of 3.c) the set of polynomials with integer coefficients.

For example: 5x3 − 2x2 + 3 or 7x4 − 8x3 + x

EC Give a recursive definition of the rational numbers Q. Use as Basis Step only 0 ∈ Q and 1 ∈ Q.(2 pt)

2

Page 10: Discrete Structures | Homework 1

Discrete Structures — Homework 7

Due: April 8.

Section 6.1

4 A particular brand of shirts comes in 12 colours, has a male version and a female version, andcomes in three sizes for each sex. How many different types of this shirt are made. (1 pt)

56 Thenameof a variable in theCprogramming language is a string that contains uppercase letters,lowercase letters, digits, or underscores. Further, the first character in the sting must be a letter,either uppercase or lowercase, or an underscore. If the name of a variable is determined by itsfirst eight characters, how many different variables can be named in C? (Note that the name ofa variable my contain fewer than eight characters.) (1 pt)

Section 6.2

4 A bowl contains 10 red and 10 blue balls. A woman selects balls at random without locking atthem. (2 pt)

a) How many balls must she select to be sure of having at least three balls of the same color?b) How many balls must she select to be sure of having at least three blue balls?

26 Show that in a group of five people (where any two people are either friends or enemies), thereare not necessarily three mutual friends or three mutual enemies. (1 pt)

34 Assuming that no one has more than 1,000,000 hairs on the head of any person an that thepopulation of New York City was 8,008,278 in 2010, show there had to be at least nine people inNew York City in 2010 with the same number of Hairs on their heads. (1 pt)

Section 6.3

18 A coin is flipped eight times where each flip comes up either heads or tails. Howmany possibleoutcomes (4 pt)

a) are there in total?b) contain exactly 3 heads?c) contain at least 3 heads?d) contain the same number of heads and tails?

22 How many Permutations of the letters ABCDEFGH contain (6 pt)

a) the string ED?b) the string CDE?c) the strings BA and FGH?d) the string AB,DE, and GH?e) the string CAB and BED?f) the string BCA and ABF ?

Page 11: Discrete Structures | Homework 1

Section 6.4

8 What is the coefficient of x8y9 in the expansion of (3x + 2y)17? (1 pt)

12 The row of Pascal’s triangle containing the binomial coefficients(10k

), 0 ≤ k ≤ 10, is:

1 10 45 120 210 252 210 120 45 10 1

Use Pascal’s identity to produce the row immediately following this row in Pascal’s triangle.(1 pt)

2

Page 12: Discrete Structures | Homework 1

Discrete Structures — Homework 8

Due: April 8.

Section 7.1

6 What is the probability that a card selected at random from a standard deck of 52 cards is an ace or aheart? (1 pt)

16 What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?(1 pt)

20 What is the probability that a five-card poker hand contains a royal flush, this is, the 10, jack queenking, and ace of one suit? (1 pt)

24 Find the probability of winning the lottery by selecting the correct six integers, where the order inwhich these integers are selected does not matter, from the positive integers not exceeding (4 pt)

a) 30.b) 36.c) 42.d) 48.

34 What is the probability that Bo, Colleen, Jeff, and Rohini win the first, second, third, and fourth price,respectively, in a drawing if 50 people enter a contest and (2 pt)

a) no one can win more than one price.b) winning more than one price is allowed.

Section 7.2

6 What is the probability of these events when we randomly select a permutation of {1, 2, 3} (3 pt)

a) 1 precedes 3.b) 3 precedes 1.c) 3 precedes 1 and 3 precedes 2.

10 What is the probability of these events when we randomly select a permutation of the 26 lowercaseletters of the English alphabet? (6 pt)

a) The first 13 of the permutation letters are in alphabetical order.b) a is the first letter of the permutation and z is the last letter.c) a and z are next to each other in the permutation.d) a and z are not next to each other in the permutation.e) a and z are separated by at least 23 letters in the permutation.f) z precedes both a and b in the permutation.

Page 13: Discrete Structures | Homework 1

12 Suppose that E and F are events such that p(E) = 0.8 and p(F ) = 0.6. Show that p(E ∪ F ) ≥ 0.8and p(E ∩ F ) ≥ 0.4 (2 pt)

16 Show that if E and F are independent events then E and F are also independent (2 pt)

EC Assume, you chose the answer to this question randomly. How likely is it that your answer is correct.(3 pt)

a) 50%

b) 25%

c) 33%

d) 25%

Hint. Do not take this question too serious ;-)

2

Page 14: Discrete Structures | Homework 1

Discrete Structures — Homework 9

Due: April 22.

Section 9.1

6 Determine whether the relation R on the set of all real numbers is reflexive, symmetric, anti-symmetric, and/or transitive, where (x, y) ∈ R if and only if (8 pt)

a) x + y = 0

b) x = ±y

c) x − y ∈ Qd) x = 2y

e) xy ≥ 0

f) xy = 0

g) x = 1

h) x = 1 or y = 1

10 Give an example of a relation on a set that is (2 pt)

a) both symmetric and antisymmetric.b) neither symmetric nor antisymmetric.

Section 9.3

22 Draw the directed graph that represents the relation{(a, a), (a, b), (b, c), (c, b), (c, d), (d, a), (d, b)}. (2 pt)

Section 9.5

2 Which of these relations on the set of all people are equivalence relations? Determine the prop-erties of an equivalence relation that the others lack. (5 pt)

a) {(a, b) | a and b are the same age}b) {(a, b) | a and b have the same parents}c) {(a, b) | a and b share a common parent}d) {(a, b) | a and b have met}e) {(a, b) | a and b speak a common language}

14 LetR be the relation consisting of all pairs (x, y) such that x and y are strings of uppercase andlowercase English letters with the property that for every positive integer n, the nth charactersin x and y are the same letter, either uppercase or lowercase. Show that R is an equivalencerelation. (2 pt)

42 Which of these collections of subsets are partitions of {−3,−2,−1, 0, 1, 2, 3}? (4 pt)

a) {−3,−1, 1, 3}, {−2, 0, 2}b) {−3,−2,−1, 0}, {0, 1, 2, 3}c) {−3, 3}, {−2, 2}, {−1, 1}, {0}d) {−3,−2, 2, 3}, {−1, 1}

Page 15: Discrete Structures | Homework 1

Section 9.6

2 Which of these relations on {0, 1, 2, 3} are partial orderings? Determine the properties of apartial ordering that the others lack. (5 pt)

a) {(0, 0), (2, 2), (3, 3)}b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 3)}c) {(0, 0), (1, 1), (1, 2), (2, 2), (3, 1), (3, 3)}d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (2, 3), (3, 0), (3, 3)}e) {(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (3, 3)}

6 Which of these are posets? (4 pt)

(X,⊙) = {(a, b) | a, b ∈ X, a⊙ b})

a) (R,=)

b) (R, <)

c) (R,≤)

d) (R, ̸=)

24 Draw the Hasse diagram for inclusion on the set P (S), where S = {a, b, c, d}. (2 pt)

P (S) is the power set of S.

2