Time Left - 15:00 mins

GATE 2024 Algorithms Foundation Quiz 69

Attempt now to get your rank among 53 students!

Question 1

Consider two strings A= "associategate" and B= "gateassociate". Consider " x " to be the length of the longest common subsequence between A and B . The value of x+2x is:

Question 2Multiple Correct Options

Which of the following statement(s) is/are true regarding the bellman ford algorithm?

Question 3

Four matrices M1, M2, M3 and M4 of dimension p×q, q×r, r×s and s×t respectively can be multiplied. If p = 10, q = 100, r = 5, s = 50 and t = 1, then what is the minimum number of addition and multiplication require to multiple the matrices M1, M2, M3 and M4?

Question 4

Which of the following problems can be solved using the longest subsequence problem?

Question 5

Consider the matrixchain multiply problem for a subchain

AiAi+1 ..Aj

We want to parenthesize the chain to get the minimum number of scalar multiplications possible (call this operation Scal). We decide to split the subchain at location k, and parenthesize it there. Scal(i,j) is the therefore the number of scalar multiplications to compute the subproducts Ai . . k and Ak + 1 . . j , plus the cost to multiply these together. The dimensions of every Ai are di – 1 × di , so the cost of multiplying these 2 matrices is di – 1 × dk × dj. What is the recurrence relation for the Scal() operation?

  • 53 attempts
  • 0 upvotes
  • 0 comments
May 20GATE & PSU CS