...

/

Solution: Longest Common Subsequence of Two Sequences

Solution: Longest Common Subsequence of Two Sequences

Solution for the Longest Common Subsequence of Two Sequences Problem.

We'll cover the following...

Solution

Consider a longest common subsequence C=(c1,,cp)C = (c_1 , \ldots, c_p ) specified by indices 1i1<i2<<ipn1≤i_1 <i_2 <\ldots<i_p ≤n and 1j1<j2<<jpm1≤j_1 <j_2 <\ldots<j_p ≤ m (therefore, for every 1qp,aiq=bjq=cq1≤q≤p, a_{i_{q}}=b_{j_{q}} =c_q ...