You are on page 1of 3

Virtual University of Pakistan

Fall 2017

Solution Idea Assignment 1

Question 1 (15 Marks)


Show that  A  (A  B)  B is a tautology by logical equivalence.
Note: Don’t use truth table.

Solution:

Proof by logical equivalence


 A  (A  B)  B
  A  (~A  B)  B
  A  A   (A  B)   B
  f  (A  B)  B
  A  B  B
~  A  B   B
  ~A ~B   B
 ~A   ~B  B 
 ~A  t
t

Question 2 (20 Marks)


Show by mathematical induction that any amount in cents ≥ n0 cents can be obtained
using 6 cents and 7 cents coins only.
Note: First you will need to calculate n0.

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

Let P(n) be the statement that:


“n cents can be obtained using 6 and 7 cent coins”.

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

Question 3 (15 Marks)


Suppose sequence b0, b1, b2, . . ., satisfies the recurrence relation
bk  8bk 1  16bk  2 k 2
with initial condition: b0  2 and b1  6
Then find explicit formula for b0, b1, b2, . . ., using the characteristic equation of the above
recursion.

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

For n = 1, C.41 + D.1.41 = 6  4C + 4D = 6  4(2) + 4D = 6  4D = -2


D = -1/2

Hence, bn = 2.4n + (-1/2).n.4n is the explicit formula the above recursion.

b0 = 2.40 + (-1/2).0.40 = 2+0 = 2


b1 == 2.41 + (-1/2).1.41 = 8 - 2 = 6
b2 == 2.42 + (-1/2).2.42 = 32 - 16 = 16
b3 = 2.43 + (-1/2).3.43 = 128 - 96 = 32
.
.
.

You might also like