Number of Shortest Supersequences

Revision en1, by Aayushi_Bhardwaj_Pataka, 2018-03-09 10:57:08

Given two strings s and t. Find the number of ways to make a new string c such that both s and t appear as subsequences in c and also c has minimum length among all such strings possible.

I was able to figure out that the shortest length will be len(s) + len(t) — len(lcs(s, t)) but unable to approach further via any recursive/combinatorial approach.

Tags string, #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Aayushi_Bhardwaj_Pataka 2018-03-09 10:57:08 393 Initial revision (published)