Test 3
Test 3
Test 3
29th 2018
Name:
YorkU email:
Student Number:
• No calculators, cell phones or any other electronic devices can be used on this exam.
• Show all your work unless otherwise indicated. Write your answers clearly!
Include enough steps for the grader to be able to follow your work.
Page 1 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
Multiple Choice. Circle the best answer. No work needed. No partial credit available.
E = {{1, 2}, {2, 3}, {3, 4}, {1, 4}, {2, 4}}
3. (5 points) If an is the number of bit strings which do not contain four consecutive 0’s, then an satisfies
which recurrence:
A. an = an−1 + 2an−2 + 3an−3
B. an = an−1 + an−2 + an−3 + an−4
C. an = 2an−1 + 2n−1
D. an = 3an−2 + an−4 .
Page 2 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
Page 3 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
7. (15 points) Consider the set Σ∗ of bit strings (i.e. Σ = {0, 1}). Let A ⊆ Σ∗ be the set of bit strings
such that any 0 is followed by at least two 1’s. Give a recursive definition of the set A and list all bit
strings of length 5 that are in A.
• λ∈A
• w1 ∈ A if w ∈ A
• w011 ∈ A if w ∈ A
Page 4 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
8. (20 points) Solve the recurrence relation bn = 72 bn−1 − 32 bn−2 with b0 = 2 and b1 = 3.
A+B =2
1
A + 3B = 3
2
which implies −5B = −4. So, we see that B = 4/5 and A = 6/5. Therefore
n
6 1 4 n
bn = + (3) .
5 2 5
Page 5 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
a − a = 0 = 5 · 0.
a − b = 5k1
b − c = 5k2
Page 6 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
10. (20 points) Let Wn be the graph with vertex set V = {1, 2, . . . , n + 1} and edge set
7 2
6 3
5 4
on the left with vertices labeled and on the right with a proper coloring with 4 colors. Since the
vertices {1, 2, 3, 4, 5, 6, 7} make an odd length cycle these vertices need at least 3 colors. Since the
vertex 8 is connected to all other vertices it needs to be its own color. Therefore we can conclude the
chromatic number of W7 is 4
Page 7 of 8
SC/MATH 1019B Solutions to Test 3 Nov. 29th 2018
Page 8 of 8