in reply to Re^4: True Brute Force Longest Common Sub Sequence
in thread True Brute Force Longest Common Sub Sequence

I strongly disagree. Not only does the optimized common still requires the nested loops to find the LCS, worse/average O(N^2*M^2 + M+N + M+N) is still O(N^2*M^2).

Replies are listed 'Best First'.
Re^6: True Brute Force Longest Common Sub Sequence
by tachyon-II (Chaplain) on Nov 28, 2007 at 00:06 UTC

    You are of course free to strongly disagree, however it is a matter of fact. Don't take my word for it, insert a loop counter variable and check the results.

      Counters don't show complexity.

      However, I do see I was wrong. For some odd reason, I was thinking the product of the two sets of subsets had already been found before common.