Q1: 20 points Q2: 15 points Q3: 10 points Q4: 15 points Q5: 15 points Q6: 10 points Q7: 15 points Total: 100 points
Question text is in black, solutions in blue.
This is a function and is both 1:1 and onto. The inverse function is a-1(x) = x1/3, the cube root of x.
This is a function and is both 1:1 and onto. The function's inverse is itself.
This is not a function from the given domain to the given co-domain, since c(0) is not defined.
This is a function and is 1:1, but not onto. Since the domain elements are integers, the range elements are perfect squares (or their additve inverses) and not every integer is a perfect square.
This is a function but is neither 1:1 nor onto. For example, e(1, 2) = e(2, 4), and every integer in the range is a multiple of 3.
The statement translates as "((h ∧ c) → g)". To get CNF, we first use the definition of implication to get "¬(h ∧ c) ∨ g). We then use DeMorgan to get "(¬h ∨ ¬c) ∨ g". Because ∨ is associative, we can remove the parentheses to get "¬h ∨ ¬c ∨ g". This is an or-clause and is also the and of one or-clause, so it is in CNF.
The statement translates as "((b ∧ ¬c) → g)
∧ (r → ¬b)". (Note that "but" just means "and" here, with an additional connotation not
captured by the PropCalc statement. Also note that all those parentheses are
necessary because different boolean operators are in general not associative
with each other.)
To get CNF, we first use the definition of implication twice to get
"(¬(b ∧ ¬c) ∨ g) ∧ (¬r ∨ b)". We then use DeMorgan
(and associativity of ∨) to get "(¬b ∨ c ∨ g) ∧ (¬r
∨ ¬b)" which is the and of two or-clauses and is thus in CNF.
There are at least two possible proofs. It is possible to construct a 1:1
correspondence (a function that is both 1:1 and onto, also called a bijection)
from {a, b}* to N with a bit of care. The strings are listed
in a standard order with smaller strings first and alphabetical order among
strings of the same length. We can get a bijection by mapping each string to
its position in this order starting from 0, but I may or may not have been
fully convinced by your definition of this order. The nicest definition I know
of this map is take w in {a, b}*, convert it to binary by mapping a to 0
and b to 1, prepend a 1, and subtract 1.
You get more flexibility in defining your functions if you quote the
Schroeder-Bernstein Theorem (done in lecture), which says that if there are
1:1 functions from X to Y and from Y to X, then there is a bijection between
the two sets and they thus by definition have the same cardinality. We can get
a 1:1 function from {a, b}* to N by mapping a's to 1's and b's to 2's,
then interpreting the result as a decimal number. (Many of you wanted to
map a's to 0's and b's to 1's and interpret the result as binary. This is not
1:1 because, for example, f(a) = f(aa) = 0 -- the binary strings 0 and 00
represent the same number. An easy 1:1 function from N just takes
the number n to the string an, so that g(0) = λ and g(3) =
aaa.
119 = 7 ⋅ 15 + 14, 15 = 1 ⋅ 14 + 1; 14 = 14 ⋅ 1 + 0, 1 is the last positive number occurring and is this the gcd.
119 = 1 ⋅ 119 + 0 ⋅ 15, 15 = 0 ⋅ 119 + 1 ⋅ 15, 14 = 1 ⋅ 119 - 7 ⋅ 15, 1 = -1 ⋅ 119 + 8 ⋅ 15.
There is an inverse because the gcd is 1. From (b) we see that 8 ⋅ 15 ≡ 1 (mod 119), so 8 is the multiplicative inverse.
253 = 3 ⋅ 66 + 55, 66 = 1 ⋅ 55 + 11, 55 = 5 ⋅ 11 + 0. Here 11 is the last positive number occurring and is thus the gcd.
253 = 1 ⋅ 253 + 0 ⋅ 66, 66 = 0 ⋅ 253 + 1 ⋅ 66, 55 = 1 ⋅ 253 - 3 ⋅ 66, 11 = -1 ⋅ 253 + 4 ⋅ 66.
There is no multiplicative inverse because the gcd of the two numbers is not 1. The gcd, 11, divides any linear combination of 253 and 66, but if y were the desired inverse we would have k ⋅ 253 + y ⋅ 66 = 1 for some integer k, and 11 does not divide 1.
Since the binary for 9 is 1000, we see that 99 = 98 ⋅ 91 and so the same equation holds modulo 11. We successively compute 9 ≡ 9 (mod 11), 92 = 81 ≡ 4 (mod 11), 94 = (92)2 ≡ 42 = 16 ≡ 5 (mod 11), and 98 = (94)2 ≡ 52 ≡ 3 (mod 11). Then 99 ≡ 3 ⋅ 9 ≡ 5 (mod 11).
We know by the Chinese Remainder Theorem that x ≡ c (mod 4⋅5⋅7), where c = 3⋅5⋅7⋅y1 + 4⋅4⋅7⋅y2 + 1⋅4⋅5⋅y3 and y1, y2, and y3 are the appropriate multiplicative inverses. We compute that y1 = (35)-1 (mod 4) = 3, that y2 = (28)-1 (mod 5) = 2, and that y3 = (20)-1 (mod 7) = -1 or 6. Then c is 315 + 224 - 20 = 519 or 315 + 224 + 120 = 659, and either of these numbers reduced modulo 140 is 99. We can and should check that 99 meets the three given congruences.
Last modified 26 February 2013