Exercise 9.5.2: a. List all
the 3-combinations for the set cfw_x1 , x2 , x3 , x4 , x5 .
Deduce the value of 53 .
Exercise 9.5.2: a. List all
the 3-combinations for the set cfw_x1 , x2 , x3 , x4 , x5 .
Deduce the value of 53 .
Answer: cfw_x1 , x2 , x3 ,
1.
(a) G and H are not isomorphic. We can see this from the fact that while both graphs have two
degree-3 vertices, in G these two vertices are adjacent whereas in H they are not. Instead, we
could notice that G has 3 simple circuits of length 4 (specific
Prove by mathematical induction that for all integers n 1
1 + 6 + 11 + 16 + . . . + (5n 4) =
n(5n 3)
2
Prove by mathematical induction that for all integers n 1
1 + 6 + 11 + 16 + . . . + (5n 4) =
n(5n 3)
2
Proof: First, let us translate into summation not
Quiz 4
Consider the following graph:
v7
v8
e10
e13
e11
e14
e8
e2
e9
v5
v4
e1
e5
v1
e6
e4
v6
e7
v2
e3
a. Find all edges that are incident on v3 .
Solution: e6 , e7 , e12
b. Find all vertices that are adjacent to v1 .
Solution: v1 , v4 , v7
c. Find all edge
The Pigeonhole Principle (Section 9.4)
The Pigeonhole Principle (Section 9.4)
Example: You have 7 pigeons and 5 pigeonholes.
The Pigeonhole Principle (Section 9.4)
Example: You have 7 pigeons and 5 pigeonholes. You can only fit one
pigeon into each pigeon
Assignment 6 Solutions
1. Say that there are k buckets with at least 5 things each. Then there are 10
k buckets with at most 4 things. By the generalized pigeonhole principle
(contrapositive form), the former collection of buckets can hold at most 10k
th
Practice Midterm
1.
(a) v1 v4 v6 v2 v4 v7 v8 v9 v6 v3 v5 v1
(b) No Euler trail exists in this graph since every vertex has even degree.
(c) No Hamiltonian circuit exists in this graph, shown by contradiction:
Assume that H is a subgraph of G which is conn
Assignment 2
MTH 210
Due in lab, week beginning Feb. 3, 2014
1. Define a sequence a0 , a1 , a2 , . . . by a0 = 1, a1 = 2 and for every k 2
ak =
ak1 + ak2
2
Prove by strong induction that an =
5
3
+
1
3
21
n1
for every n 0.
2. Define a set S recursively a
RSA
RSA
p, q primes
RSA
p, q primes
ed 1(mod (p 1)(q 1)
RSA
p, q primes
ed 1(mod (p 1)(q 1)
C = M e mod pq
RSA
p, q primes
ed 1(mod (p 1)(q 1)
C = M e mod pq
M C d (mod pq)
RSA
p, q primes
ed 1(mod (p 1)(q 1)
C = M e mod pq
M C d (mod pq)
Euclids Lemma: F
Assignment 4
MTH 210
Due in lab, week beginning Feb. 24, 2014
1. For each of the following, either find one in the given graph, or explain why
none exists.
v5
v6
v7
v3
v4
v1
v2
(a) An Euler circuit.
(b) An Euler trail.
(c) A Hamiltonian circuit.
2. For ea
Recall: Say that a graph G is connected if for every v , w V (G)
there is a walk from v to w.
Recall: Say that a graph G is connected if for every v , w V (G)
there is a walk from v to w.
Lemma: If G is connected then for every v , w V (G) with v 6= w,
th
Counting and Probability (Chapter 9)
Counting and Probability (Chapter 9)
Flip a fair coin 32 times. How many heads do you expect to get in a row on
average?
Counting and Probability (Chapter 9)
Flip a fair coin 32 times. How many heads do you expect to g
Recursion (Section 5.6)
Recursion (Section 5.6)
Definition:
A recurrence relation is a formula relating ak to certain of its
predecessors, ak1 , ak2 , . . . , aki for some integer i with
k i 0.
Recursion (Section 5.6)
Definition:
A recurrence relation is
1. (10 pts) Use mathematical induction to show that 72n 4n is divisible by 5 for every n 0.
Basis Step: 720 40 = 1 1 = 0 which is divisible by 5.
Inductive Step: Let k 0. Assume that 72k 4k is divisible by 5, say that 72k 4k = 5j where j Z
(IH). We need t
Proposition: If a graph G has a Hamiltonian circuit then it has a
subgraph H with the following properties:
I
H contains every vertex of G,
I
H is connected,
I
H has the same number of edges as vertices, and
every vertex in H has degree 2.
I
Proposition:
Quiz 3
Let S be the set of strings on cfw_0, 1, 2 which is recursively defined as follows:
I. BASE: 0 S, 1 S, 2 S.
II. RECURSION: For any string x,
a. If 0x S and c cfw_0, 1, 2 then c0x S.
b. If 1x S and c cfw_0, 2 then c1x S.
c. If 2x S and c cfw_0, 1, 2
Quiz 9
Some number of indistinguishable tasks are to be completed by 4 distinguishable CPUs (CP U0 , CP U1 , CP U2 and CP U3 ). No task can be worked on by more
than one CPU.
1. How many ways of assigning 9 tasks to 4 CPUs are there?
2. How many ways of a
Quiz 2
Define a sequence a0 , a1 , a2 , . . . by a0 = 1, a1 = 5, and for every k 2
ak = 4ak1 + 5ak2 .
Prove by strong induction that an = 5n for every n 0.
Solution
Basis Step: a0 = 1 = 50 and a1 = 5 = 51 .
Inductive Step: Let k 0. Assume that ai = 5i for
Emphasis: Sets A and B have the same cardinality if there exists a
one-to-one onto function f : A B.
Emphasis: Sets A and B have the same cardinality if there exists a
one-to-one onto function f : A B.
Clearly Z and Z have the same cardinality, as demonst
Applications of Number Theory to yhpargotpyrC (Section 8.4)
Applications of Number Theory to yhpargotpyrC (Section 8.4)
Definition: When attempting to send a hidden message, the original message
is called the plaintext and the encoded message is called th
Induction (Section 5.2-5.3)
Induction (Section 5.2-5.3)
What amounts of money can be represented using only
(hypothetical) 3 coins and 5 coins?
Induction (Section 5.2-5.3)
What amounts of money can be represented using only
(hypothetical) 3 coins and 5 co
Make an augmented next-state table for the following finite-state
automaton.
X
0, 1
1
0
Y
Z
0
1
Make an augmented next-state table for the following finite-state
automaton.
X
0, 1
1
0
Y
Z
0
1
Make an augmented next-state table for the following finite-sta
Quiz 3
Let S be the set of strings on cfw_0, 1, 2 which is recursively defined as follows:
I. BASE: 0 S, 1 S, 2 S.
II. RECURSION: For any string x,
a. If 0x S and c cfw_1, 2 then c0x S.
b. If 1x S and c cfw_0, 1, 2 then c1x S.
c. If 2x S and c cfw_0, 1, 2
Assignment 9 Solutions
1. The probability of getting an odd number on a roll of one die is 12 . The
probability of getting a red-suited card on a single draw from a standard
= 21 . These two events do not influence each other. Therefore the
deck is 26
52
Quiz 2
Define a sequence a0 , a1 , a2 , . . . by a0 = 1, a1 = 4, and for every k 2
ak = 3ak1 + 4ak2 .
Prove by strong induction that an = 4n for every n 0.
Solution
Basis Step: a0 = 1 = 40 and a1 = 4 = 41 .
Inductive Step: Let k 0. Assume that ai = 4i for
Recall:
n
P
i=1
i=
n(n+1)
2
and
n
P
ri =
i=0
rn+1 1
r1
Use of a calculator is not allowed.
1. Are the following pairs of graphs isomorphic? Either give an isomorphism or state an invariant for
graph isomorphism which the graphs do not share.
a
b
s
t
1
2
c
Quiz 5
Consider the following graph:
d
1
c
6
13
11
g
h
5
14
20
2
f
e
15
3
16
a
18
b
Use Prims algorithm beginning at a to find a minimum spanning tree for this
graph. Remember to record your choice at each step of the procedure.
Solution (10 pts total)
d