Chapter 2
Section 2.1
1. a. There is one function of type {a, b} → {1}; it maps both a and b to 1.c. There are four functions of type {a, b} → {1, 2}: one maps both a and b to 1; one maps both a and b to 2; one maps a to 1 and b to 2; and one maps a to 2 and b to 1.
2. a. O. c. {x | x = 4k + 3 where k ∈ N}. e. ∅.
3. a. E. c. E – {0}. d. N.
4. a. −5. c. 4.
6. For example, x = y = ½.
7. a. 3. c. 1.
8. a. 1. b. 2. c. 3.
9. gcd(296, 872) = 8 = (−53) · 296 + 18 · 872.
10. a. 3. c. 3.
11. {0, 1, 2, 3, 4, 5, 6}.
12. a. f (∅) = ∅. c. f ({2, 5}) = {4}. e. f ({1, 2, 3}) = {0, 2, 4}.
13. a. 11001. c. 1101111.
14. a. 43. c. 2127.
15. a. floor(x) = if x ≥ 0 then trunc(x) else if x = trunc(x) then x else trunc(x − 1).
16. When x is negative, f(x, y) can be ...
Get Discrete Structures, Logic, and Computability, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.