Professional Documents
Culture Documents
Solution Idea Assignment 1: (15 Marks)
Solution Idea Assignment 1: (15 Marks)
Fall 2017
Solution:
Solution:
Proof
We have to prove that, amount = 6.m + 7.n,
n0 = 30 since 29 cents ≠ 6.m + 7.n for any m, n ≥ 0
Now we prove the base case
Basis Step:
30 = 6*5 + 7*0
31 = 6*4 + 7*1
32 = 6*3 + 7*2
1
Virtual University of Pakistan
Fall 2017
33 = 6*2 + 7*3
34 = 6*1 + 7*4
35 = 6*0 + 7*5
36 = 6*6 + 7*0
Inductive Hypothesis:
We want to show that
P(k) is true Þ P(k+1), " k ≥ 30
Suppose k – 5 = 6 * m + 7 * n
Then k – 5 + 6 = 6 * m + 7 * n + 6
k + 1 = 6 * (m + 1) + 7 * n
By Strong Induction, P(n) is true if n Z and n 30
OR
Suppose k = 6 * m + 7 * n
Then k + 1 = 6 * m + 7 * n + 1
k + 1 = 6 * (m - 1) + 7 * (n + 1)
By Strong Induction, P(n) is true if n Z and n 30
Solution:
bk 8bk 1 16bk 2 k 2
with initial condition: b0 = 2 and b1 = 6
characteristic equation t2 – 8t + 16 = 0
(t - 4)2 = 0
t = 4 is repeated root.
2
Virtual University of Pakistan
Fall 2017
4n and n.4n are sequences which satisfies the same RR, but do not satisfy the initial
condition.
Suppose general solution: bn = C.4n + D.n4n which satisfies the original recurrence, C and
D are constants.
Since b0 = 2, b1 = 6
For n = 0, C.40 + D.0.40 = 2 C = 2