If this exam is like most of the others I've made up in my career, it's probably too long. I get carried away thinking of interesting questions. So do as much as you can in the allotted time. Turn in your paper. Then take the exam home and do it again as homework for Tuesday.
Reminder: in strings order matters and repetitions are allowed.
Answer.
There are nk strings of length k on an n letter alphabet. I probably said that n times in class.
Answer.
The first letter can be any of the n. After that there are just n-1 choices for each letter, so the number of strings is n(n-1)k-1.
Answer.
There are n(n-1)k-2 strings of length k-1 with no double letters. For each such string you can choose one of the k-1 letters to double up. So there are n(n-1)k-2(k-1) strings of length k with exactly one double letter.
Answer.
Since 101 is prime, Fermat's little theorem says 10100 == 1 (mod 101).
Since 97 is prime, Fermat's little theorem says 1096 == 1 (mod 97). Then
10100 == 1096104 == 1002 == (-3)2 == 9 (mod 97)
Answer.
(x2 - 2/x)50 = (x2)50 -50(x2)49(2/x) + ... = x100 - 50*2x97 + (50*49/2)22x94 - (50*49*48/6)*23x97+so the coefficient of x90 is 0 and the coefficient of x91 is -156800.
Answer.
This is false. The relation = on a two element set is antisymmtric but not total.
Answer.
This is false. The relation consisting of all ordered pairs from a two element set is total but not antisymmetric.
Answer.
This is false. The equivalence relation = on a two element set is antisymmtric.
Answer.
This is false. This is false. The equivalence relation consisting of all ordered pairs from a two element set is total.
Answer.
This was very hard. Only Avram got it; no one else came close. There are n(n-1)/2 pairs of distinct elements of S. Totality requires that for each x != y, at least one of (x,y) or (y,x) be in R. Antisymmetry requires that just one of them is in R. So there are 2n(n-1)/2 choices so far. Then each of the n pairs (x,x) may be in R, or not, without affecting either totality or antisymmetry. So altogether there are 2n(n-1)/2*2n relations that are both antisymmetric and total.
N = x2 - y2 .Hint: Remember that
x2 - y2 = (x-y)*(x+y).Then count how many ways are there to write N as a product of two factors.
Note. The Prime Number Theorem says (in one form) that the nth prime is about n*ln(n). The approximation isn't very good for small numbers: the 101st prime is 547, while 101 * ln(101) = 466.127172.
Answer.
There are 2100 subsets of the set of 100 primes. Each way to write N as a product of two factors corresponds to choosing one of these subsets and its complement. So there are 299 ways to do the job.
Here's a theorem we haven't proved (yet). Use it in what follows.
If p is prime and a !== 0 (mod p) then a has either no square roots (mod p) or exactly two.
Note: html isn't kind to mathematics. I'll write ==
for
the congruence symbol, and !==
to negate a congruence.
For example, modulo 7,
1 == 12 == 62 (mod 7) 2 == 32 == 42 (mod 7) 4 == 22 == 52 (mod 7)so 1, 2 and 4 each have two square roots mod 7, while the equations
3 == x2 (mod 7) 5 == x2 (mod 7) 6 == x2 (mod 7)have no solutions, so 3, 5 and 6 have no square roots.
Answer.
The square of every odd number is 1 (mod 8), so 1 has the four square roots 1, 3, 5 and 7 (mod 8).
Suppose p is prime and a !== 0 (mod p). Then a(p-1)/2 == +-1 (mod p).
Answer.
Fermat's little theorem says
(a(p-1)/2)2 == ap-1 ===+-1 (mod p)so
a(p-1)/2
is a square root of 1. Since p is
prime, it has only two square roots, and those are +-1, so
a(p-1)/2
must equal one of them.
Suppose p is prime and a !== 0 (mod p). If a has a square root mod p then a(p-1)/2 == 1 (mod p).
Answer.
If a has a square root then a == b2 (mod p) for some b. Then Fermat's little theorem says a(p-1)/2 == bp-1 == 1 (mod p).
Answer.
Suppose p is prime and a !== 0 (mod p). Then a has a square root mod p if a(p-1)/2 == 1 (mod p).
Answer.
Answer.