4
Visit : https://hemanthrajhemu.github.io Join Telegram to get Instant Updates: https://bit.ly/VTU_TELEGRAM Contact: MAIL: [email protected] INSTAGRAM: www.instagram.com/hemanthraj_hemu/ INSTAGRAM: www.instagram.com/futurevisionbie/ WHATSAPP SHARE: https://bit.ly/FVBIESHARE

Visit : ://hemanthrajhemu.github.io/.../42_DAA/DAA_DEC_2018_JAN_2… · S= 15, 10, 12, 13,15, 18} d=30. (08 Marks) b. Solve the belowinstance ofassignment problem usingbranchand bound

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Visit : ://hemanthrajhemu.github.io/.../42_DAA/DAA_DEC_2018_JAN_2… · S= 15, 10, 12, 13,15, 18} d=30. (08 Marks) b. Solve the belowinstance ofassignment problem usingbranchand bound

Visit : https://hemanthrajhemu.github.io

Join Telegram to get Instant Updates: https://bit.ly/VTU_TELEGRAM

Contact: MAIL: [email protected]

INSTAGRAM: www.instagram.com/hemanthraj_hemu/

INSTAGRAM: www.instagram.com/futurevisionbie/

WHATSAPP SHARE: https://bit.ly/FVBIESHARE

Page 2: Visit : ://hemanthrajhemu.github.io/.../42_DAA/DAA_DEC_2018_JAN_2… · S= 15, 10, 12, 13,15, 18} d=30. (08 Marks) b. Solve the belowinstance ofassignment problem usingbranchand bound

ppeal

toev

alua

toran

d/o

requationswritten

eg,42+8=

50,wi

llbe

treatedas

malp

ract

ice.

Onco

mple

ting

your

answ

ers.

comp

ulso

rily

drawdi

agon

alcr

oss

lineson

there

main

ingblankpa

ges.

2ofid

enti

fica

tion

,a

Any

revealin

2.

Important

Note:

: we

- {|

a ‘USN Nh 34) 15C843

He 5 easFourth Semester B.E. Degree Examination, Dec.2018/Jan.2019

Design and Analysisof Algorithms

Time: 3 hrs. Max. Marks: 80

Note: Answer any FIVE full questions, choosing

ONE full question from each module.

Module-1

1 Whatis an algorithm? What are the properties of an algorithm? Explain with an example.(04 Marks)

Explain the general plan for analyzing the efficiency of a recursive algorithm, Suggest arecursive algorithmto find factorial ofa number. Derive its efficieney. (08 Marks)

Ifty(n) € O(g; (n)) and to(n) € Of g(n)) prove that t)(n) + t(n) € O(max{ gif), go(n))).(04 Marks)

OR

2 Explain the asymptotic notations with examples. (06 Marks)Distinguish between the two common waysto represent a graph. (04 Marks)Discuss about the important problem types and fundamental data structures. (06 Marks)

Module-2

3 Discuss howquick-sort works to sort an array and trace for the following data set. Drawthetree ofrecursivecalls made.

65 70 75 80 85 60 5S SO 45

Derive the best case complexity of quick sort algorithm. (10 Marks)

Briefly explain the Strassen’s matrix multiplication. Obtain its time complexity, (06 Marks)

OR

4 Explain the concept ofdivide and conquer. Design an algorithm for merge sort andderiveitstime complexity. (10 Marks)What are the three major variations of decrease and conquer technique? Explain with anexample for each. (06 Marks)

| of 3

https://hemanthrajhemu.github.io

http

s://h

eman

thra

jhem

u.gi

thub

.io

Page 3: Visit : ://hemanthrajhemu.github.io/.../42_DAA/DAA_DEC_2018_JAN_2… · S= 15, 10, 12, 13,15, 18} d=30. (08 Marks) b. Solve the belowinstance ofassignment problem usingbranchand bound

Bt:

15CS43

Module-3

Explain the concept of greedy technique for Prim’s algorithm. Obtain a minimumcost

spanning tree for the graph shown in Fig.Q5(a). (08 Marks)

;a &e- :

aT -

| COLLEGE OF ENGINES RING

BL DE. ASSOCIATION» .

VACHANA PITAMBHA t

DR.P.GHALEKAT?!

LIBRARY, BIJAPUR.

Fig.Q5(a)b. Solve the below instance of the single source shortest path problem with vertex 6 as the

6 a

b.

7 a

b.

source. With the help ofa suitable algorithm. (08 Marks)

Fig.Q5(b)

ORWhat are Huffman trees? Explain. Construct a Huffman codefor the following data :

Character A B © pIE =

Probability 0.5 0.35 0.5 0.1 0.4} Q2

Eneode DAD_CBEusing Huffman encoding. (08 Marks)

Explain transform and conquer technique. Sort the belowlist using Heapsort :a, 2, AT, 6, 3, (08 Marks)

Module-4

Define transitive closure of a graph. Write Warshall’s algorithm to compute transitiveclosure ofa directed graph. Apply the same onthe graph defined by the following adjacency

matrix :

0 1! 0 0

R= cmt oD . (08 Marks)0 0 0 |]

0 OO O OU

Using Dynamic programming, solve the belowinstance of knapsack problem. (08 Marks)

Item Weight Value

1 2 122 | 10 Capacity w= 5

3 3 204 2 15

| of3

https://hemanthrajhemu.github.io

http

s://h

eman

thra

jhem

u.gi

thub

.io

Page 4: Visit : ://hemanthrajhemu.github.io/.../42_DAA/DAA_DEC_2018_JAN_2… · S= 15, 10, 12, 13,15, 18} d=30. (08 Marks) b. Solve the belowinstance ofassignment problem usingbranchand bound

B.L.D.E. ASSOCIATION’s i

VACHANA PITAMAHA bE

DR.P.GHALARATT! ' 185C843

COLLEGE OF ENGINEERING |,

OR | LIBRARY, BIJAPUR.

$ a. Obtain

a

optimal binarysearchtree for the following four-key set. (08 Marks)

Key | A B C 5

Probability | 0.1 02 04 03

b. Solve the following travelling sales person problem represented as a graph shown inFig.Q8(b), using dynamicprogramming. (08 Marks)

20Fig-Q8(b)

Module-59 a. What is the central principle of backtracking? Apply backtracking to solve the below

instance of sum ofsubset problem —S = 15, 10, 12, 13,15, 18} d=30. (08 Marks)

b. Solve the belowinstance of assignment problem usingbranch and bound algorithm.

doh; Job, Job, Job,

9 2 7 8 ) Persona

C= 6 4 3 7 Person b

§ 8 I & Persone7 6 9 4) Persond

(08 Marks)

OR10 a. Draw thestate-space tree to generate solutions to 4-Queen’s problem. (04 Marks)

b. Apply backtracking to the problem offinding a Hamiltonian circuit m the graph shownbelow: (04 Marks)

Fig O10(a)c. Define the following :

i) Class P

i) Class NPil) NP complete problemiv) NP hard problem. (08 Marks)

KR RE

3 0f3

https://hemanthrajhemu.github.io

http

s://h

eman

thra

jhem

u.gi

thub

.io