3AIRC1 Discrete Math Final Exam Solution
3AIRC1 Discrete Math Final Exam Solution
(b) For the following hashing function, show how the following data would be inserted in the (06)
order given in initially empty cells. Use the usualcollision resolution policy to resolve
collision, if occurs: h(x) = (x?+ x) (mod 13), cells indexed from 0 to 12; the data is: 142,
29, 821, 378, 1048, 2965, 1032, 1983, 34, 23.
(c) Construct the Hasse diagram for the partial ordering {(a, b): a divides b} on the set (06)
{2, 3, 5, 9, 12, 15, 18, 24, 36, 45), writing allsteps properly.
b) Use generating function to solve the recurrence relation an = 8an-1 + 10-, where a0 = 1. (06)
(c) Find the solution to the recurrence relation an + 5an-1 + 6an-2 = 3r 2n+ 1. (06)
@4. (a) Find the length of a shortest path between a and z in the given weighted graph, using (06)
Dijkstra's algorithm:
4
6 PT
{b)
Use Kruskal's algorithn to find aminimum spanning trec in the following weighted (06)
graph:
6
(c) (06)
Use Hufiman coding to encode these symbols with given frequencies:
A: 0.15, B: 0.20, C: 0.05, D:0.10, E: 0.30, F: 0.08, G: 0.09, H: 0.03
What is the average number of bits required toencode a symbol?
Q5. (a) Show that the set of all integers I forms an infinite abelian group with the operation (06)
defined as: a b =a+b-1, where all a, b E I.
(06)
) Show that the set of numbers of the forma + bym, where m is a positive integer and
with a and b as rational numbers, is a field.
(c) (03)
() Transform f(x,y,z) =((x.y)z).(x+z).(y +z)) into a sums-of-products form.
(ii) Simplify the Boolean function and then draw the simplified logic circuit and
switching circuit: (03)
f(a,b, c) =(a+b).(b +c).(c +a)
******
BE I I I T
341RCl: Diele Mall:
3SD
3s
ltn (2,5)
J:
3So
L IA2nAyl 3 SO
J=6
3SD
Leu(8jl)' Ll n ( 24 S, 8)
4,
3SD 3So
leul z,s, ) Luu (2, 8,I) J
3So 3SU
lunl2, S,8, )
24 8 4
24
2 3
36 36
24 9 24
|2
2 2
2
:2(a): Clieele
As A
F 1
T
o a tauto lagy
(b) ale
A Guen
:You ane weld faes
Yeu get teue
Coee
PrefesoL
wenld taws
Pefesse tHeu
you oo nt gt tere as a
net wld ameo,
(cCx ) AE))
Cx) V ~El))
-ctateueatt 3)
shdut ; P(x): a taculty meiee
las asleed y a queehon ) feple j.
( lois has aked Paotesso Mihacls a questou
Awos A(<kou , Paofessor michaels)
dtuoleut has mot asked auy falty memlee
(2) Soue
queatou.
Aw: s Jx y(6tx) AElyA,y)
134 2t
(K+)
2
(k) -2
2
(Ic+2)
- (K
RHS
P(n) tn loldo.
( lo) lae .
MB Lau
n 2lo
n
((ox)4..]
= 8x G) + z |+l0x+
8*) Gn) + (|-|0x)
Gu) (1 - 84x}) = It
A
G)
(1-&)(1-l0x) |-lox
2 au )(8"4 1o")
2
A
(h+ 3) (4 t 2) = o ) =-2, -3
122 3
|2 -342 -2
24
288
d,(-2t <el-3) + + 13 n t
288
alyoi la.
Ket
deli(a-c).
step D: S -4,c3, ( oo, 3t o): 0
mun ( 4, 3+ 2) = (4)
3+3) =
Jle)- mws (ao 3t6) = ll2) mus (o, 3 t 0)=
(a-b)
Ry e, ti923
miul 0 6t o0 ) -
mis( 4 , é+1) =() mun (o, 6t ) =
ael a-c-d -e)
3
K 9,3
3 2 2
(e,e)
2 2
2
7 (d,t) 2
( Totl (3
O30
Ano: O.0s 0-08
G A B
020
O20 O3o
D A
C
O3O
O2
O30
O20
A
030 O3)
039
6
A
Co des fi
2
020
3 O30
O30 2 0'60
O08 o32
3 027
O000| O103
To tad
85a): sow Hiat
Gien atb- | )
a, beJ
ClosuLe law
Va, b I, a b atb - | ET
als
(0) As sociat lawi
a t b t c -2
a+ b+C- 2
a* b4c)
Existeuse of 2olenhibg:
ate -|
el
St a* b e
b 2-a
Coumutaline lan:
b t a -|
(Nm,+ )
3) So.
4) Juv a-bv
((m),)
) ula
24 As Law
3) Tl.
uv. - x t y :
a-b a-b e 2)
ato a-2
Coulew
LD.
(ato)cc+dve) + (etti)
(a tove)(ctd t (a tovi)(e +4J)
np.
y y2 +
As' Gune ta lo, c) = (a to). (btC) ( ta)
(ac +b) (c ta)
acC t aac bc + G b
+ b (aC)
b CatC)
Switeluing iciit : a
Kegic c i t :
b (k+)