100% found this document useful (2 votes)
2K views42 pages

MTH202 Practice Questions 1-45

Here are the steps to solve this problem: (a) The relation R represented by the directed graph is: R = {(a,b), (b,c), (c,d)} The inverse of R is: R-1 = {(b,a), (c,b), (d,c)} (b) R is neither symmetric nor anti-symmetric: - Not symmetric: (a,b) is in R but (b,a) is not. - Not anti-symmetric: Both (b,c) and (c,b) are in R but b ≠ c. So in summary: (a) R = {(a,b),
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
2K views42 pages

MTH202 Practice Questions 1-45

Here are the steps to solve this problem: (a) The relation R represented by the directed graph is: R = {(a,b), (b,c), (c,d)} The inverse of R is: R-1 = {(b,a), (c,b), (d,c)} (b) R is neither symmetric nor anti-symmetric: - Not symmetric: (a,b) is in R but (b,a) is not. - Not anti-symmetric: Both (b,c) and (c,b) are in R but b ≠ c. So in summary: (a) R = {(a,b),
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Solution File Lecture No 1-3

Question No 1:

Let p be “I am intelligent” and let q be “I have a book”, Give a simple verbal sentence which
describes each of the following statement:

(a) p
(b) p  q
(c) q  p

Solution:

(a) I am not intelligent


(b) I am intelligent or I have a book
(c) I have a book but I am not intelligent

Question No 2:

Construct a truth table for the compound proposition [ p   ~ p  q ]  q

Solution:

p q ~p ~p →q P^(~p→q) [ p   ~ p  q ]  q
T T F T T T
T F F T T F
F T T T F T
F F T F F T

Question No 3:

Convert into logical form and then write converse, inverse and contra positive of the following
statement.

“If I study, then I shall pass the test”.

Solution:

Inverse: If I do not study, then I shall not pass the test.

Converse: If I shall pass the test then Istudy.

Contrapositive: if I shall not pass the test then I do not study.


Question No 4:

Let p = “Ahmad eats apple”, q = “Ahmad eats banana” and r = “Ahmad eats grapes”. Write each
of the following in symbolic form:

a) Ahmad eats apple or banana but not grapes.


b) It is not true that Ahmad eats apple but not grapes.
c) It is not true that Ahmad eats apples or bananas but not grapes.

Solution:

i)  p  q  ~ r
ii) ~ ( p ~ r )

iii) ~ ( p q   ~ r )

Question No 5:

Assume that for the truth values p = F and q = T. Show that the proposition
( p  q)  ( p  ( p   q)) is true.

Solution:

p q ~p ~q (p q) (p  ~ q) ~ p (p  ~ q) ( p  q)  ( p  ( p   q))

F T T F F F T T

Hence the given proposition is true.

Question No 6:

Use truth table to verify the statement (how to prove it using laws)

q  ( p  q)  q  (p  q)
Solution:

p q (p q) q  ( p  q) (p  q) q  (p  q)
T T T T T T
T F F F F F
F T F T T T
F F F F T F

Therefore from column 4&6, q  ( p  q)  q  (p  q) .

Question No 7:

Do it by yourself

Question No 8:

Use De Morgan’s laws to find the negation of

“Ahmad loves football and his brother loves cricket”

Solution:

Let p=Ahmed loves football

q=His brother loves cricket

p  q = Ahmed loves football and His brother loves cricket

Using De Morgan’s law

~ ( p  q) ~ p ~ q =Ahmed does not love football or his brother does not love cricket

Question No 9:

Do it by yourself.
Lecture 4-6

Question # 1: Formulate the symbolic expression ~ ( p  q)  r in words using

p =: Today is Holiday
q =: It is raining
r =: We should study.

Solution:

If it is not true that today is holiday or it is raining, then we should study.

Question # 2: Check the validity of the following argument form using truth table:

pq
pq
p
Solution:

p q pq pq p
F F T F F
F T T T F
T F F T T
T T T T T

Row 2 and 4 are critical rows, in second row conclusion is false so it is an invalid argument.

Question # 3: Write the output of each gate in the following circuit

Solution:
X Y Z X Y ~Z  X Y  ~ Z ~  X  Y   ~ Z 
0 0 0 0 1 1 0
0 0 1 0 0 0 1
0 1 0 0 1 1 0
0 1 1 0 0 0 1
1 0 0 0 1 1 0
1 0 1 0 0 0 1
1 1 0 1 1 1 0
1 1 1 1 0 1 0

Question # 4: Construct a truth table to determine whether the following statement is logically
equivalent or not:
 p  q   r and p   q  r  .

Solution:

p q r pq  p  q  r qr p  q  r 
F F F F F F F
F F T F T T F
F T F F F T F
F T T F T T F
T F F F F F F
T F T F T T T
T T F T T T T
T T T T T T T

Columns 5 and 7 tells that they are not equivalent

Question # 5: By using the laws of logic verify the following logical equivalence:
~ ((~ p  q)   ~ p ~ q )   p  q   p .

Solution:
~   ~ p  q    ~ p  ~ q     p  q  ~  ~ p   q ~ q     p  q  Distributive Law
~  ~ p  t    p  q  Negation Law
~  ~ p    p  q  Identity Law
 p   p  q Double Negation Law
p Absorption Law

Question # 6: Construct the input/output table for ( p v q)

Solution:

Inputs Output
p q ( p v q)  r ~ ( p v q)  s
1 1 1 0
1 0 1 0
0 1 1 0
0 0 0 1

Question # 7: Construct circuit for the Boolean expression (~ p  q) ~ r .


Solution:
Solution File of Practice Questions Lecture No 7-9

Solution No 1:
U = {a, b, c, d , e, f , g}
A = {a, c, e, g}
B = {d , e, f , g}
AUB = {a, c, e, g}U {d , e, f , g} = {a, c, d , e, f , g}
A  B = {a, c, e, g}  {d , e, f , g} = {e, g}
B - A = {d , e, f , g}-{a, c, e, g} = {d , f }
Ac = U − A = {a, b, c, d , e, f , g} − {a, c, e, g} = {b, d , f }

Solution No 2:
A = {x  Z | 0  x  2}
B = {x  Z |1  x  4}
C = {x  Z | 3  x  9}

AUB = {x  Z | 0  x  2}U {x  Z |1  x  4} = {x  Z | 0  x  4}
( AUB ) = U − AUB = {x | x  Z + } − {x  Z | 0  x  4} = {x  Z | x  4}
C

A  B = {x  Z | 0  x  2}  {x  Z |1  x  4} = {x  Z |1  x  2}
( A  B) = U − A  B = {x | x  Z + } − {x  Z |1  x  2} = {x  Z | x  3}
C

AC = U − A = {x | x  Z + } − {x  Z | 0  x  2} = {x  Z | x  3}
B c = U − B = {x | x  Z + } − {x  Z |1  x  4} = {x  Z | x  4}
ACUB C = {x  Z | x  3}U {x  Z | x  4} = {x  Z | x  3}
AC  B C = {{x  Z | x  3}  {x  Z | x  4} = {x  Z | x  4}
A  C = {x  Z | 0  x  2}  {x  Z | 3  x  9} = {x  Z | 0  x  8}

Solution No 3:

y will be in the shaded area

A
B
Solution No 4:

Do it by yourself.

Solution No 5:
A = {4,8,12,16}
B = {2, 4, 6,8,10,12,14,16,18}
A  B = {4,8,12,16}
B− A = {2, 6,10,14,18}
Practice Questions solution Files

Lecture No (10 – 12)

Solution No 1:
Let A = {1, 2, 3, 4, 5, 6, 7, 8}

A 1 = {1, 2, 3}
A 2 = {4, 5, 6}
A 3 = {7, 8}

To show that A 1 , A 2 and A 3 is the partition of A, we have to show

1) A 1 ∪A 2 ∪ A 3 = A
2) A 1 ∩A 2 ∩ A 3 = ∅

A 1 ∪ A 2 ∪ A 3 = {1, 2, 3, 4, 5, 6, 7, 8} = A
A1 ∩ A2 ∩ A3 = ∅

Hence {{1, 2, 3}, {4, 5, 6}, {7, 8}} is a partition of {1, 2, 3, 4, 5, 6, 7, 8}.

Solution No 2:
Domain of R = {a, b, c}
Range of R = {8,9}

Solution No 3:
A× B =
{(5, x), (5, y ), (9, x), (9, y )}
B× A =
{( x,5), ( x,9), ( y,5), ( y ,9)}

A × B is not equal to B × A. Since order matters in Cartesian product.


Solution No 4:

Solution No 5:

(a) R is not transitive because ( d, b ) ∈ R and ( b, c ) ∈ R but ( d, c ) ∉ R


(b) R is not anti-symmetric because ( b, c ) and ( c, b ) ∈ R but b ≠ c
Lecture 13-15

Question No 1:

Let R and S be the following relations on A= {1, 2, 3}

R= {(1, 1), (1, 2), (2, 3), (3, 1), (3, 3), (1, 3), (2, 2)}

S= {(1, 2), (1, 3), (2, 1), (3, 3), (2, 2)}

Find the following

a) RS
b) RS
c) R S
d) S2= S S

Solution:

a) R  S = {(1, 2),(3, 3),(1,3),(2,2)}


b) R  S = {(1, 1),(1, 2),(1, 3),(2, 1),(2,2),(2, 3),(3, 1),(3, 3)}
c) R S = {(1,2),(1,1),(2,3),(3,2),(1, 3),(2,1),(2, 2),(3, 1),(3, 3)}
d) S2= S S = {(1, 1), (1, 2), (1, 3), (2, 2), (2, 1),(2,3),(3,3)}

Question No 2:

Determine whether the relation shown by the directed graph is reflexive, symmetric, anti-
symmetric or transitive?

Solution:

Reflexive:

There is not a loop at every point of the directed graph so it is not reflexive.
Symmetric & Anti-symmetric:

It is neither symmetric nor anti-symmetric, since there is an edge from a to b but not one
from b to a. but there are edges in both directions b and c.

Transitive:

It is not transitive, since there is an edge from a to b and an edge from b to c, but no edge
from a to c.

Question No 3:

In the following diagram


(a) Write the relation R as set of ordered pairs then write inverse of R.
(b) Whether it is symmetric or anti-symmetric relation?

Solution:

R  {( x, x), ( x, y ), ( y, z ), (z, y), ( z , x)}


(a)
R 1  {( x, x), ( y, x), ( z , y ), (y, z), ( x, z )}

(b) It is neither symmetric nor anti-symmetric, since there is an edge from z to x but not
one from x to z. but there are edges in both directions z and y.

Question No 4:

Let X  {1, 2,3, 4} be a set and R   x, y  x  y is a relation on X. Find all the ordered
pairs of R and R 1 . Also draw the directed graph of R.

Solution:

X  1, 2,3, 4
X  X  1, 2,3, 4  1, 2,3, 4
So (1,1), (1, 2), (1,3), (1, 4), (2,1), (2, 2), (2,3), (2, 4), 
 
(3,1), (3, 2), (3,3), (3, 4), (4,1), (4, 2), (4,3), (4, 4) 

R  (1,1), (1, 2), (1,3), (1, 4), (2, 2), (2,3), (2, 4), (3,3), (3, 4), (4, 4)
R 1  (1,1), (2,1), (3,1), (4,1), (2, 2), (3, 2), (4, 2), (3,3), (4,3)(4, 4)

The directed graph of R is

Question No 5:

Let R1 and R2 be the relations on a set A  {1, 2,3, 4} given by


R1  {(1,1),(1, 2),(3, 2),(3, 4),(4, 2)}
R2  {(1, 2),(2,1),(3,1),(4, 4),(2, 2)}

Find the ordered pairs of R1 R2 and R2 R1 .

Solution:

R2 R1  {(1, 2),(1,1),(4,1),(3,1),(3, 2),(3, 4),(4, 2)}


R1 R2  {(2,1),(2, 2),(3,1),(3, 2),(4, 2)}

Question No 6:
Find the matrix representing the relations S R where the matrices representing R and S
are as follows
1 0 0  0 1 0 
M R  1 1 0  M S  0 0 1
0 0 0  1 0 1
Solution:

Question No 7:

x 3
If f ( x)   3 and g ( x)  x  2 then find the value of 5 f (2)  7 g (4) .
2 4

Solution:

f (2)  1  3  4
g (4)  3  2  1
Then
5 f (2)  7 g (4)  5(4)  7(1)
 20  7  13
Question No 8:

Determine whether f : Z  R such that f (n)  2 n is a function or not.

Solution:

f is not defined for n  0 , since f results in imaginary values (not real). So f is not a
function.
Solution to Practice questions for Lecture No. 16 – 18

Solution 1:
Given function is
3x  2
y
x2
We know that a function will be injective if for any two values x1, x2 from the domain of f,

f ( x1 )  f ( x2 )

Then
x1  x2

Lets assume that for x1, x2 , we have

3 x1  2 3 x2  2

x1  2 x2  2
(3 x1  2)( x2  2)  (3 x2  2)( x1  2)
3 x1 x2  6 x1  2 x2  4  3 x1 x2  6 x2  2 x1  4
6 x1  2 x2  6 x2  2 x1
4 x1  4 x2
x1  x2

Thus, the given function is injective or one to one.


We know that, a function is surjective if for every value of y  Y , there exist a x  X such that
f ( x)  y .

For that let’s take


3x  2
y
x2
And try to find x such that f(x) = y for all y belongs to Y.
3x  2
y
x2
y ( x  2)  3 x  2
xy  2 y  3x  2
xy  2 y  3x  2
x( y  3)  2  2 y
2  2y
x
y 3

So, apparently, we see that for every y, there is an x as given above, but if you watch carefully, the
value of x is undefined for y = 3. Saying so, in other words, we can very conveniently claim that
for y = 3, there exist no x, Therefore, the given function is not surjective.
Solution 2:
Given that

f ( x)  x 2  1 and g ( x )  3 x  5

Then
f  g ( x )  f ( g ( x ))
 f (3 x  5)
 (3 x  5) 2  1
 9 x 2  30 x  24

g  f ( x )  g ( f ( x ))
 g ( x 2  1)
 3( x 2  1)  5
 3x 2  2

Solution 3:
Given function is
2
y
x 5
y (x  5)  2
xy  5 y  2
xy  2  5 y
5y  2
x
y
Thus,
5y  2
f 1 (y) 
y

Solution 4:
Given that

y  g  x    2 x – 1
y 1  2 x
y 1
x
2
Which is the required inverse function.
Now, replacing x and y , we get
x 1
g 1 (x) 
2
5  1
g 1 (5)  3
2
Solution 5:
Given that
f ( x )  ax  b and g ( x )  cx  d , where a, b, c and d are constants.

f  g ( x)  f ( g ( x))
 f (cx  d )
 a(cx  d )  b
 acx  ad  b
g  f ( x)  g ( f ( x))
 g (ax  b)
 c(ax  b)  d
 cax  cb  d
f  g ( x)  g  f ( x)
acx  ad  b  cax  cb  d
If
acx  ad  b  cax  cb  d
ad  b  cb  d
d (a  1)  b(c  1)
(a  1) / (c  1)  b / d 
Solution File
Sequence, Series and Recursion
(Lecture # 19-22)

Question No 1:
Write the geometric sequence with positive terms whose third term is 3 and fourth term is
1.

Solution:
3rd term = ar2 =3…..1
4th term = ar3 =1……2
To find r and a, (2)/(1)
ar3/ ar2 = 1/3
r=1/3 and a = 27
So geometric sequence is, 27, 9, 3, 1,…

Question No 2:
Find the 15th term of the Arithmetic sequence, if its 6th term is 19 and 9th term is 31.

Solution:
6th term = a+5d = 19….(1)
9th term = a+8d = 31…(2)
By subtracting (2) and (1), we get
3d =12, d =4 and a = -1
15th term = a+14d = -1+14*4 = 55

Question No 3:
The sixth term of an arithmetic sequence is 22 and eighth term is 32 .Find the first four terms of
this sequence.
Solution:

Do it by yourself.

Question No 4:

A man deposited Rs.20 in a bank in the first month; Rs.25 in the second month; Rs.30 in the
third month and so on. Find how much he will have deposited in the bank by the 7th month.
Solution:
1st term =20, 2nd term =25, 3rd term= 30, d=2nd term - 1st term = 5
In 7st month = a+6d = 20+5*6 = 50.

Question No 5:

Find a common fraction for the recurring decimal 1.73 .

Solution:

1.73 = 1.73737373….
= 1+ .73737373…. = 1+.73+ 0.0073+ 0.000073
Now using the geometric sequence on 0.73+ 0.0073+ 0.000073, here a = 0.73 and r =
0.0073/0.73 = 0.01
Formula = a / (1-r) = 0.73/ (1-0.01)
1.73 = 1+0.73/ (1-0.01)

Question No 6:
Sum the following series upto n terms.
(11)  (2  3)  (3 5)  ...

Solution:

It can be written as
(11)  (2  3)  (3  5)  ...  1 , 2,3.. * 1, 3, 5.. 
Use Arithmetic Progression on (1,2,3..) and (1,3,5..), and then multiply both answers in order to
get the sum of series upto n terms.

Question No 7:
Find the sum of first n terms of an arithmetic series.

Solution:
Do it by yourself

Question No 8:
How many terms are there in 9  6  3  0  amount to 45?

Solution:
a =-9 and d = -6+9 = 3 and an = 45
an = 45 = a+(n-1)d = -9+(n-1)(3)
54 = (n-1) (3)
n-1 =18
n =19

Question No 9:
Let a and b be integers. Suppose a function Q is defined recursively as follows:
 5 if ab
Q ( a, b)  
Q(a  b, b)  a if b  a
Find Q (25, 5)
Solution:

Now

Q (25, 5) = Q (25 – 5, 5) -25

= Q (20, 5) - 25

= [ Q (20-5, 5) -20 ] - 25

= Q(15, 5) - 20 - 25
= Q(15, 5) – 45

= [Q(15 - 5, 5) – 15] - 45

= Q(10 , 5) – 60

= [Q(10 - 5 , 5) - 10 ] - 60

= [Q(5 ,5) -70] = [Q(5 - 5, 5) – 5 ] – 70

= Q(0 ,5) – 75

= 5 - 75

= -70

Question No 10:
Suppose that f is defined recursively by f (0)  2, f (n 1)  4 f (n)  2 then find f (3) .

Solution:

For n =0, f(0+1) = 4f(0)+2 = 4 (2) +2 =10

f(1) =10

For n =1, f(1+1) = 4f(1)+2 or f(2) = 4f(1)+2 = 4(10)+2 = 42

Similarly find the value for f(3)=170

Question No 12:

Show that the sequence 0,1,3, 7,..., 2n  1,... , for n  0 satisfies the recurrence relation
dk  3dk 1  2dk 2 , for all integers k  2 .
Solution:

The sequence is given by the formula


n
dn = 2 – 1 for n  0

k-1
Substituting k – 1 for n we get dk-1 = 2 –1

k-2
Substituting k – 2 for n we get dk-2 = 2 –1
We want to prove that

dk = 3dk-1 – 2dk-2

k-2
R.H.S. = 3(2k-1 – 1) – 2(2 – 1)
k-2
= 3 · 2k-1 – 3 – 2 · 2 +2
k-1
= 3 · 2k-1 – 2 –1
k-1
= (3 – 1) · 2 –1
k-1 k
=2·2 – 1 = 2 – 1 = dk = L.H.S.

Question No 11:
Define a sequence a0 , a1 , a2 ,... by the formula an  2n  1 , for all integers n  0 . Show that this

sequence satisfies the recurrence relation ak  ak 1  2 , for all integers k  1 .

Solution:

Do it by yourself
Solution File Lecture No 23-25

Question No.1:

Use mathematical induction to prove that 4n > 3n + 4 is true for integral values of n ≥ 2

Solution:

Let P(n) = 4 > 3 + 4


n n

Let P ( n ) = 4n > 3n + 4
BASIS STEP:
n=2
42 > 32 + 4 = 16 > 13
So P ( 2 ) is true
INDUCTIVE STEP:
Suppose P ( k ) is true for all k ≥ 2
4k > 3k + 4 (1)
we are to prove P ( k + 1) is true i.e.
4k +1 > 3k +1 + 4 ( 2)
Now
LHS = 4k +1 = 4k .4 > 4.(3k + 4) = 4.3k + 16 by (1) for k ≥ 2.
4k +1 > 3k .(3 + 1) + 16
4k +1 > 3k .3 + 3k + 16
4k +1 > 3k +1 + 3k + 4 + 12
4k +1 > 3k +1 + 4 + 12 + 3k
4k +1 > 3k +1 + 4 ignoring 12 + 3k as if a > b + c then a > b

Hence it is proved by mathematical induction that 4n > 3n + 4 is true for integral values
of n ≥ 2 .
Question No.2
3n(n + 1)
Use mathematical induction to prove that 3 + 6 + 9 + ... + 3n = for all positive
2
integers n.

Solution:
3n(n + 1)
Let P ( n ) : 3 + 6 + 9 + ... + 3n =
2
BASIS STEP:
(1) 3
= 3=
LHS
3(1 + 1)
RHS = =3
2
So P (1) is true
INDUCTIVE STEP:
Suppose P ( k ) is true for all k ≥ 1
3k (k + 1)
3 + 6 + 9 + ... + 3k = (1)
2
we are to prove P ( k + 1) is true i.e.
3 ( k + 1) (( k + 1) + 1)
P ( k + 1) : 3 + 6 + 9 + ... + 3 ( k + 1) = ( 2)
2
Now
LHS = 3 + 6 + 9 + ... + 3k + 3 ( k + 1) = ( 3 + 6 + 9 + ... + 3k ) + 3 ( k + 1)
3k (k + 1)
+ 3 ( k + 1)
=
2
k 
=3 ( k + 1)  + 1
2 
k +2
= 3 ( k + 1)
2
3 ( k + 1) ( k + 1) + 1
= = RHS
2
Question No.3

Suppose n3 − n is divisible by 6 is true for any positive integer. Justify the statement for

n = k+1.

Solution:
Inductive Step:
Suppose for n=k, k 3 − k is dividible by 6
then k 3 − k =6.q
we need to prove ( k + 1) − ( k + 1) is dividible by 6
3

( k + 1) − ( k + 1) =
3
(k 3
+ 3k 2 + 3k + 1) − ( k + 1)
= k 3 − k + 3k ( k + 1)
=6.q + 3k ( k + 1)
As the product k ( k + 1) of integers is even so we can take as 2r
=6.q + 3k ( k + 1)
= 6.q + 3.2r
= 6(q + r )
( k + 1) − ( k + 1) is dividible by 6
3
So
Hence by induction method, n 3 − n is divisible 6

Question No 4:

Suppose 5n − 1 is divisible by 4 is true for n = k . Justify the statement for n= k + 1 .


Solution:
Inductive Step:
=
Let for n k , 5k − 1 is divisible by 4 then
5k − 1 =4.q
we need to prove that 5k +1 − 1 is divisible by 4
5k +1 − 1= 5.5k − 1
= 5k ( 4 + 1) − 1
= 5k .4 + 5k − 1
= 5k .4 + 4.q
= 4 ( 5k + q )
Hence 5k +1 − 1 is divisible by 4

Question No 5
Prove that if x divides y and y divides z then x divides z.

Solution:
By our assumptions, and the definition of divisibility, there are natural numbers k 1 and k 2
such that
= y xk= 1 and z yk2 .
Consequently,
=z yk= 2 xk1 k2 .
Let k = k1k2 Now k is a natural number and z = xk , so by the definition of divisibility, x
divides z.

Question No 6:
Show that for all integers a and b, if a + b is even then a − b is also even.

Solution:
Take a+b = 2k
a= 2k-b
Subtracting ‘b’ from both sides
a-b =2k-b-b
a-b = 2k -2b
a-b = 2( k-b)
Hence a-b is also even.
Question No 7:
Assume that m and n are particular integers. Justify your answer to each of the following:
1) Is 4m + 6n even?
2) Is 8mn + 5 odd?

Solution:
1) Yes: 4m+6n =2.(2m+3n) [by definition of even]
(2m+3n) is an integer because 2, 3, m, n are integers and products and sums of
integers are integers.
2) Yes: 8mn+5 =2.(4mn+2)+1 [by definition of odd]
(4mn+2) is an integer because 4, 2, m, n are integers and products and sums of
integers are integers.
Solution to Practice questions Lecture 26-28
Solution 1:

We are to prove by contradiction that 4  3 2 is an irrational number. So, let’s assume that
4  3 2 is a rational number. Then by definition of rational number, it can be written in the
following form
a
43 2  for some integers a and b with b  0
b
a
43 2 
b
a
3 2 4
b
a  4b
2
3b

Since a and b are integers, so are a-4b and 3b with 3b  0 . This shows that 2 is a rational number.
Which is a contradiction to the f act that 2 is an irrational number. This contradiction shows that
our initial supposition was incorrect and thus, 4  3 2 is not an irrational number that is 4  3 2
is a rational number.

Solution 2:
We are to prove by contradiction that if 5n  1 is odd then n is even. Suppose for some integer n
, 5n  1 is odd but n is not even. That is n is odd. So it can be written as
n  2m  1 for some integer m.
5n  1  5(2m  1)  1
 10m  6
 2(5m  3)

This shows that 5n  1 is equal to some multiple of 2 and so it is even which is a contradiction to
our initial supposition. So, the correct supposition will be that if 5n  1 is odd then n is even.
Solution 3:

We are to prove by contraposition that if n 2 is odd then n is odd. That is we are to prove that if n
is even then n 2 is even.
Lets assume n is even. Then it can be written as a multiple of 2. That is
n  2k for some integer k
n 2  (2k ) 2
 4k 2
 2(2k 2 )

Clearly, n 2 is a multiple of 2 so n 2 is also even.

This Proves that if n 2 is odd then n is odd.


Solution 4:
The following are pre and post conditions.

Pre-condition: The input variables a and b are positive integers.


Post-condition: The output variable q and r are positive integers such that

a = b · q + r and 0 ≤r < b.
Solution 5:
We are to find the GCD (61114, 94).
Divide 61114 by 94
61114  94  650  14
Divide 94 by 14
94  14  6  10
Divide 14 by 10
14  10 1  4
Divide 10 by 4
10  4  2  2
Divide 4 by 2
4  2 2  0
Thus, the GCD of 61114 and 94 is 2.
Solution to practice questions for Lecture No. 29-31

Solution 1:
For a round trip, the person will travel from city A to B, B to C then C to B and then B to A i.e.,
A B C  B  A
The person can travel 3 ways from A to B and 5 ways from B to C and back that is
3 5 5 3
A B C  B  A
Thus, there are
3  5  5  3  225
ways to have a round trip.
Solution 2:
Each bit (binary digit) is either 0 or 1.
Hence, there are 2 ways to choose each bit. Since we have to choose seven bits therefore, the
product rule shows, there are a total of 2  2  2  2  2  2  2  27  128
Solution 3:
Given that
p(n,2)=42

That is
n!
 42
(n  2)!
n(n  1)(n  2)!
 42
(n  2)!
n(n  1)  42
n 2  n  42  0
n 2  7n  6n  42  0
n(n  7)  6(n  7)  0
(n  6)(n  7)  0
n  6, n  7

Ignoring the negative value, the desired value of n is 7.


Solution 4:
5 boys can be selected from 10 in following number of ways
10
C5  252
5 girls can be selected from 15 in following number of ways
C5  3003
15

Total number of ways a team of 10 students be selected = 252  3003=756756

Solution 5:
There are 13 Spade cards in a deck of cards so C(13,2) = 78
There are 13 Heart cards in a deck of cards so C(13,2) = 78
C 13, 2  C 13, 2   78  78  6084
Practice questions Lectures 32-34

Question No 1:

How many distinguishable ways can the letter of the word HULLABALOO be arranged?

Question No 2:

How many signals can be given by 7 flags of different colors using 3 flags at a time?

Question No 3:

How many 4-digit numbers can be formed by using each of the digits1, 2, 3,4,5,6 only once?

Question No 4:
Suppose that there are 2000 students at your university. Of these 500 are taking a course in
computer science, 670 are taking a course in mathematics and 300 are taking course in both
computer science and mathematics. How many are taking a course either in computer science or
in mathematics?

Question No 5:
There are 24 students in a class, only 13 are willing to go to a tour for Murree. In how many
ways can these be chosen?

Question No 6:

In an office, there are 75 faculty members can speak Malay(M ) and 25 can speak Chinese (C),
while only 10 can speak both Malay and Chinese. Using Inclusion-exclusion Principle find how
many faculty members can speak either Malay (M) or Chinese(C)?
Practice Questions for Lecture No. 35 to 37

Question 1:
A box contains seven discs numbered 1 to 7. Find for each integer k ( k is from 3 to
11), the probability that the numbers on two discs drawn without replacement have a sum equal to
k.
Question 2:
A die is weighted so that the outcomes produce the following probability distribution:
Outcome 1 2 3 4 5 6
Probability 0.1 0.3 0.2 0.1 0.1 0.2

Consider the event A = {odd number occur on die} then find P(A) and P (A c ) .

Question 3:
There are 20 girls and 40 boys in a class. Half of the boys and half of the girls have
blue eyes. Find the probability that one student chosen as monitor is either a girl or a student having
blue eyes.
Question 4:
A pair of fair dice is thrown. Find the probability P that the sum is 9 or greater if
(i) 5 appear on first die
(ii) 5 appear on at least one die
Prcatice Question Lecture No 39-41
Question No 1:

Find the maximum number of edges for a complete graph knby using handshaking theorem.

Solution

The total degrees in graphKn = 2 (number of edges in Kn)

 n(n-1) = 2(number of edges in Kn)


n(n  1)
Number of edges in Kn 
2

Question No 2:

Is the graph below is Complete Bipartite or not? Redraw the bipartite graph so that its bipartite
nature is evident?

Solution:
Yes it is a complete bipartite graph.

Question No 3:

Check whether the given graphs have an Euler circuit? If it does, find such a circuit, if it does
not, give an argument to show why no such circuit exists.

Solution:

In G1: each vertex has even degree so it an Euler circuit. In G2: vertices “c” and “b” has odd

degree so it is not an Euler circuit

Question No 4:

Find two Hamiltonian circuits of the following graph


Solution:
(i) abcdefga ii) abcefgda

Question No 5:

Find the product AB and BA of the matrices (if not possible then give reason).

2 0 1 2 3
A B
1 4
and
1  3 2 

Solution:

2 0  1 2 3  2  0 4  0 6  0  2 4 6
AB        
1 1 3 2 4   1  3 2  2 3  4   2 4 1

BA is not possible as B has 3 columns and A has two rows, so multiplication is not possible.

Question No 6:

Find the adjacency matrix of the graph shown below.

Solution:
a b c d
a
0 0 1 0
 0 1 2
b 0
 
c
1 1 0 1
 
d 0 2 1 0

Question No 7:

Draw a graph with the adjacency matrix.

1 1 1 0 
1 0 1 1 
 
1 1 0 1 
 
0 1 1 0 

with respect to the ordering of vertices a, b, c, d.

Solution:
Lecture 41-43

Question No 1:
Find the product AB and BA of the matrices (if not possible then give reason).

2 0 1 2 3
A B
1 4
and
1  3 2 

Question No 2:
Find the adjacency matrix of the graph shown below.

Question No 3:

Draw a graph with the adjacency matrix.

1 1 1 0 
1 0 1 1 
 
1 1 0 1 
 
0 1 1 0 
with respect to the ordering of vertices a, b, c, d.

Question No 4 :
Find the degree sequence of the following graph.
Question No 5:
Draw all possible simple graphs with 2 vertices, which are non-isomorphic to each other.

Question No 6:
Determine whether the given graphs are isomorphic? (justify your answer)

Question No 7:
Suppose that a connected planar simple graph has 22 edges. If you want to draw a graph
having 11 faces, how many vertices does this graph have?

Question No 8:
Re-draw the given graph to prove it planar.
Question No 9:

Determine the chromatic number of the given graph.


Practice Questions for Lecture No. 44 and 45

Question 1:
Find the total number of internal and terminal vertices of a full binary tree with nine vertices

Question 2:
Draw a binary tree with height 3 and having seven terminal vertices.

Question 3:
Draw any two non-isomorphic trees of five vertices.

Question 4:

Use Kruskal’s Algorithm to draw the minimal spanning tree for the graph given below. Indicate
the order in which edges are added to form a tree.

Question 5:
Find a spanning tree for the graph k1,5 ?

You might also like