Math 55: Sample Final Exam, 9 December 2009
1: (a)
Compute 1155
55
mod 17.
(b)
Find the smallest positive inverse of 10 mod 17.
(c)
State the Chinese Remainder Theorem.
(d)
Use the procedure of the Chinese Remainder Theorem to compute 1155
55
mod
170.
(e)
State Fermat’s little Theorem.
(f)
Use Fermat’s little Theorem to find the smallest odd prime number which
divides 1155
55
−
1.
2:
Choose a
positive
integer solution (
x
1
>
0
, x
2
>
0
, x
3
>
0) of
x
1
+
x
2
+
x
3
= 42
at random, where each solution has equal probability.
(a)
What is the probability of selecting (14
,
14
,
14)?
(b)
What is the probability that at least one of the
x
’s is exactly equal to
20?
(c)
What is the probability that
x
1
= 10, given that
x
2
= 14?
3: (a)
Let
B
be the set of finite bit strings
B
=
{
x
|∃
n
≥
0 (
x
=
b
0
b
1
b
2
. . . b
n
where
b
i
= 0 or 1)
}
.
Is
B
finite, countable or uncountable? Why?
(b)
Let
F
be the set of all Boolean-valued functions
f
:
N
→{
0
,
1
}
of a
nonnegative integer variable. Is
F
finite, countable or uncountable? Why?
(c)
Given any Boolean-valued function
f
of a nonnegative integer variable
n
, can we always find a C program which accepts input
n
and outputs
f
(
n
)?
Why or why not?
4:
The cycle
C
n
is the simple graph on vertices
V
=
{
1
,
2
,
3
, . . . , n
}
with
edges
E
=
{{
1
,
2
}
,
{
2
,
3
}
,
{
3
,
4
}
, . . .,
{
n
−
1
, n
}
,
{
n,
1
}}
. The
cocycle
¯
C
n
is its
complement, with vertices
¯
V
and edges
¯
E
. Justify your answer to each of
the following questions.
1