Sei sulla pagina 1di 1

The University of Lahore

Subject: Design & Analysis of Algorithms Assignment#: 04


Due Date / Time: Dec 31, 2019 Max Marks: 35
Solve all of the following questions. Assignment can be solved individually or in a
group of size 2.

Question 01. [10]


Execute Edit Distance dynamic programming algorithm on your full name (at least
10 characters) as source string and any one of your friend’s full name (at least 10
characters) as destination string. Your response must include:
 Minimum number of edit operations
 List of edit operations
 Mention the optimum substructure of Edit Distance algorithm

Question 02. [10]


Execute Longest Common Subsequence dynamic programming algorithm on your
full name (at least 10 characters) as source string and any one of your friend’s full
name (at least 10 characters) as destination string. Your response must include:
 Longest Common Subsequence
 Optimum substructure of Longest Common Subsequence algorithm.

Question 02. [15]


Execute Assembly Line Scheduling dynamic programming algorithm for following
data:
Entry Costs: 5, 4, 5

Line 1 Costs: 7, 8, 6, 5
Line 2 Costs: 6, 9, 5, 6
Line 3 Costs: 6, 6, 7, 7

Line 1 to line 2 transportation costs: 2, 1, 2


Line 1 to line 3 transportation costs: 2, 1, 1

Line 2 to line 1 transportation costs: 1, 2, 2


Line 2 to line 3 transportation costs: 1, 2, 1

Line 3 to line 1 transportation costs: 1, 1, 2


Line 3 to line 2 transportation costs: 2, 2, 1

Exit Costs: 4, 5, 4

 Draw the diagram (hand drawn)


 Write down Optimum substructure for work stations of assembly lines
 Find the minimum cost of producing one batch of products

Section B

Potrebbero piacerti anche