FINAL TERM: Quiz Algorithm( Mashiour Rahman & Musfiq Rahman)

 

 Quiz 1. 

 

Find out the longest common subsequence for the strings “contain” and “conta”. Show all of  the simulation.

 

 

 

Quiz 2.

 

Find out the minimum number of required to multiply the matrix chain with following dimension –

 

       Your id : 0 [ a ]   -- 0 [ b ] [ c ] [ d ] [ e ]  – [ f ]

         D[ 0 ] = a, D[ 1 ] = b, D[ 2 ] = c, D[ 3 ] = d, D[ 4 ] = e, D[ 5 ] = f

         

      If  D[ I ] = 0 for  1<= I <= 5 then D[ I ] = D[ I + 1 ] + D[ I – 1 ]

 

 Quiz 3.

 

Simulate the FLOYED-WARSHALL algorithm for directed graph;

 

Quiz 4.

you will be given a matrix( n X m ) of integers. You are to find out the maximum sums for following four events-

a)      Lower Left Triangle-

1.      Taking one integer from each row.

2.      If an integer is chosen from a row r and column c then next number to be chosen must be either from( r+1,c) or (r+1,c+1).

    b)Upper Right Triangle-

 1. Taking one integer from each row.

                 2. If an integer is chosen from a row r and column c then next number to be                                                    

                     chosen must be either from( r-1,c) or (r-1,c-1).

 

 

    c)Upper Left Triangle-

 1. Taking one integer from each row.

                 2. If an integer is chosen from a row r and column c then next number to be                                                    

                     chosen must be either from( r-1,c) or (r-1,c+1).

 

    d)Lower Right Triangle-

 1. Taking one integer from each row.

                 2. If an integer is chosen from a row r and column c then next number to be                                                    

                     chosen must be either from( r+1,c) or (r+1,c-1).