Longest common subsequence: Difference between revisions
m
Corrected definition of the strict Cartesian product-order.
m (→{{header|Phix}}: added syntax colouring, marked p2js compatible) |
m (Corrected definition of the strict Cartesian product-order.) |
||
Line 10:
An ordered pair (i, j) will be called a match if ''A''[i] == ''B''[j], where 0 <= i < m and 0 <= j < n.
Define the strict Cartesian product-order (<) over matches, such that (i1, j1) < (i2, j2) iff i1 <
If i1 <=
Defining (#) to denote this case, we write m1 # m2. Because the underlying product order is strict, m1 == m2 (''i.e.'', i1 == i2 and j1 == j2) implies m1 # m2.
|