Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
ICS 6D Homework 1
1. Give a truth table for the following logical expession: (p ∨ ¬r) → ¬q.
2. The propositional variables p, q, and r have the following truth values:
• p = T
• q = F
• r = F
What is the truth value of the following compound propositions:
(a) (p ∧ q) → ¬r
(b) ¬(r ∨ ¬p ∨ ¬q)
(c) ¬(q ∧ r) → ¬p
(d) ¬(q ∧ r) ∨ (p ∧ ¬r)
3. Which statements below evaluate to true?
(a) If 3 is a prime number then 4 is also a prime number.
(b) If January has 28 days, then 4 is a prime number.
4. Are the expressions p → q and q → p logically equivalent? Use a truth table to prove your answer.
5. Define the following propositions:
• s: a person is a senior.
• v: a person is at least seventeen years of age.
• p: a person is allowed to park in the parking lot.
Express each of the following English sentences with a logical expression:
(a) A person is allowed to park in the parking lot only if they are a senior and at least seventeen years of age.
(b) A person can park in the parking lot if they are a senior or at least seventeen years of age.
6. In this question the domain of discourse is a set of employees in a company. Define the following predicates:
• T(x): person x is a member of the executive team.
• S(x): person x received a large bonus.
Express the following English sentences with quantified logical expressions:
(a) Someone did not get a large bonus.
(b) Everyone got a large bonus.
(c) Sam did not receive a large bonus even though he is a member of the executive team.
(d) Someone who is not an executive received a large bonus.
(e) Every executive team member got a large bonus.
7. In this problem, the domain of discourse is the set of all integers. Which statements are true? If an existential statement is true, give an example. If a universal statement is false, give a counter-example.
(a) ∃x(x + x = 1)
(b) ∀x(x 2 − x 6= 1)
(c) ∀x(x 2 − x 6= 0)
(d) ∃x(x + 2 = 1)
8. Define the following sets:
• A = {x ∈ Z : x is even}
• B = {x ∈ R : x ≥ 1}
• C = {−3, 1, 2, 6, 7, 9}
• D = {2, 3, 5, 9, 10, 17}
Indicate whether the following statements are true or false:
(a) π ∈ B
(b) A ⊆ B
(c) C ⊆ B
(d) 8 ∈ A ∩ B
(e) A ∩ C ⊆ B
(f) C ⊆ A ∪ B
(g) A ∩ C ∩ D = ∅
(h) |C| = |D|
(i) |C ∩ D| = 3
9. Venn diagram question. A ∩ (B ∪ C) B ∩ (A ∪ C).
10. Define the sets X = {a, b, c} and Y = {1, 2}. Show the set X × Y by listing the elements with set notation.
11. Show the set {0, 1} 3 by listing the elements with set notation. You can specify each element as a string instead of including the parentheses and commas.
12. What is |{0, 1} 2 |? What is |{0, 1} 3 |?
13. For each of the functions below, indicate whether the function is onto, one-to-one or both. If the function is not one-to-one, give an example showing why. (a) f : R → R. f(x) = x 2 . (b) g : R → R. g(x) = x 3 . (c) h : Z → Z. g(x) = x 3 .
14. For each of the functions below, indicate whether the function is onto, one-to-one or both. If the function is not onto, specify its range by listing the elements using set notation. If the function is not one-to-one, give an example showing why.
(a) f : {0, 1} 4 → {0, 1} 3 . The output of f is obtained by taking the input string and dropping the first bit. For example, f(1011) = 011.
(b) g : {0, 1} 3 → {0, 1} 3 . The output of g is obtained by replacing the first bit with 1 regardless of whether the first bit is a 0 or a 1. For example, g(001) = 101 and g(110) = 110.
(c) h : {0, 1} 3 → {0, 1} 3 . The output of h is obtained by reversing the bits. For example h(001) = 100 and h(110) = 011.
15. Let f be a function f : {0, 1} 2 → {0, 1} 3 . Is it possible that f is a bijection? Why or why not?
16. Express the following sums using summation notation:
(a) (−2) + (−1) + 0 + 1 + 2 + 3 + 4 + 5
(b) 2 2 + 23 + 24 + 25 + 26 + 27 + 28
(c) 0 3 + 13 + 23 + 33 + 43 + 53 + · · · + (17)3 .
(d) The sum of the squares of the odd integers between 0 and 100.
17. Indicte whether the following equality is true and justify your answer: X 100 j=0 j 3 = X 100 j=1 j 3
18. Give the first six terms of the following sequences. You can assume that the sequences start with an index of 1.
(a) The n th term is n 2 .
(b) The first term is 1 and the second term is 2. The rest of the terms are the product of the two preceding terms.
(c) g1 = 2 and g2 = 1. gn = n · gn−2 + gn−1.
(d) A geometric sequence in which the first value is 3 and the common ratio is 2.
(e) An arithmetic sequence in which the first value is 3 and the common difference is 5.
19. Evaluate the following summations:
(a) P2 j=−2 j 3
(b) P3 k=0 2 k