Professional Documents
Culture Documents
cs542 Regno Name
cs542 Regno Name
To be filled by Student
Instructions: 1. Write your Name and Registration Number in the space provided above.
2. Save the file name “21-Arid-YourNo YourName Final21.doc”.
3. Upload file at least 1-2 hours before deadline.
4. After uploading view your uploaded file that either the file is correct or not?
Q.No.1: [5 marks]
Consider the following chain of matrices having matrices A, B, C and D. You have to consider the
digits of your Registration Number in the order of the matrix as given. Add 2 to the digit if its zero.
For example, your Reg_No. 20-Arid-436 has last digit 6, 2 nd last digit 3 and 3rd last digit 4.
A B C
2 X last digit last digit X 2nd last digit 2nd last digit X 3nd last digit
D
3rd Last digit X 4
What will be the minimum number of multiplication to multiply these matrices? Show the order of
multiplication as well. [4+2 marks]
Q.No.2:
Consider the following graph. Add three edges weight according to your Reg_No. e.g. 20-Arid-436
has last digit 6, 2nd last digit 3 and 3rd last digit 4. Add the required number as shown in the graph if
any digit is zero.
8 20
C F Last digit of your arid number, add 1 if its 0
4
11
21
H
G
2nd Last digit of your arid number, add 2 if its 0
Apply kruskal algorithm on the above graph to compute Minimum Spanning Tree. Consider node A
as the starting vertex. Detailed steps of dry run are required in your solution. [6 marks]
Q.No.3:
Consider the above Graph, apply Depth First Search algorithm. You are required to clearly show the
state of the stack at every iteration. [6 marks]
Q.No.4:
Apply floyd warshall algorithm on the above graph to compute shortest path from all vertices to
every vertex. [6 marks]
Q.No.5:
Assume F stand for first character of your name [6 marks]
S stand for second character of your name
And T stands for third character of your name
The language set contains only these three characters
Construct FSA for the pattern (F S F T S F), replace each with characters of yours name.