Welcome to Gate CS Coaching.
In this video I have explained:-
1) Gate Previous Year Questions on Longest Common Subsequence
2) Gate Previous Year Questions on Dynamic Programming
3) longest common subsequence gate questions
4) gate questions on dynamic programming
Timetable:
0:48- Gate Questions
1) Gate 2009
A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n respectively, with indexes of X and Y starting from 0.
We wish to find the length of the longest common sub-sequence(LCS) of X[m] and Y[n] as l(m,n), where an incomplete recursive definition for the function l(i,j) to compute the length of The LCS of X[m] and Y[n] is given below:
l(i,j) = 0, if either i=0 or j=0
= expr1, if i,j 0 and X[i-1] = Y[j-1]
= expr2, if i,j 0 and X[i-1] != Y[j-1]
(A) expr1 ≡ l(i-1, j) + 1
(B) expr1 ≡ l(i, j-1)
(C) expr2 ≡ max(l(i-1, j), l(i, j-1))
(D) expr2 ≡ max(l(i-1,j-1),l(i,j))
3:32- Gate 2009
2) Consider the data given in the previous question. The values of l(i, j) could be obtained by dynamic programming based on the correct recursive definition of l(i, j) of the form given above, using an array L[M, N], where M = m+1 and N =n+1, such that L[i, j] = l(i, j).
Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of l(i, j)?
(A) All elements L should be initialized to 0 for the values of l(i,j) to be properly computed
(B) The values of l(i,j) may be computed in a row major order or column major order of L(M,N)
(C) The values of l(i,j) cannot be computed in either row major order or column major order of L(M,N)
(D) L[p,q] needs to be computed before L[r,s] if either p r or q s.
7:22- Gate 2014
3) Consider two strings A = “qpqrr” and B = “pqprqrp”. Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B. Then x + 10y = ___.
(A) 33
(B) 23
(C) 43
(D) 34
-------------------------------------------
Contact Details and Group Details are shown below:-
Email Id:- csegatecoaching@gmail.com
LinkedIn Id:- / suraj-prasad-shaw-43b480131
Facebook Group Link :-https://www.facebook.com/groups/33250...
WhatsApp Group Link:- https://chat.whatsapp.com/DSfJrreDFx2...
Telegram Channel Link:- https://t.me/Computer_Science_Gate_Co...
#Algorithm
#GatePreviousYearQuestion
#LongestCommonSubsequence
На этой странице сайта вы можете посмотреть видео онлайн 52 Gate Previous Year Questions on Longest Common Subsequence | Dynamic Programming | Algorithm длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Gate CS Coaching 01 Январь 1970, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,715 раз и оно понравилось 38 зрителям. Приятного просмотра!