3. [15 marks] We say that a sequence of Roman letters A occursas a subse-
quence of a sequence of Roman letters B if we can obtain A bydeleting some
of the symbols of B. Design an algorithm which for every twosequences A and
B gives the number of dierent occurrences of A in B, i.e., thenumber of ways
one can delete some of the symbols of B to get A. For example,the sequence
ba has three occurrences in the sequence baba:baba, baba,baba.
Expert Answer
An answer will be send to you shortly. . . . .