in reply to Re^5: Longest Common Subsequence Question
in thread Longest Common Subsequence Question

Humm Makes me think...:)

Actually mathematical subsequences are defined as maps on a subset of N and have "holes"; for example consider u(2n) versus u(n). Still in the case of finite sequences (especially in the context of char strings) it seems *contiguous* would be a fair (even natural) requisite.

Looking at some implementations seems to indicate that the contiguous case is considered as the common useful case:

% steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS -le 'print scalar String::LCSS::lcss(qw[xaxbcxdx + aybycyydy])' % steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS -le 'print scalar String::LCSS::lcss(qw[xabcdxxx +xxx yyyabcdyyyyy])' abcd

I get the same with the recent String::LCSS_XS

% steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS_XS -le 'print scalar String::LCSS_XS::lcss(qw[xa +bcdxxxxxx yyyabcdyyyyy])' abcd
cheers --stephan