Search found 161 matches
- Mon Aug 21, 2006 1:48 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10806 - Dijkstra, Dijkstra.
- Replies: 24
- Views: 17904
can anyone verify whether my algorithm is correct? i am getting wa, i checked all inputs posted in this board. - assign capacity 1 to each edges of the graph and simply run maxflow - if maxflow < 2 then Back to jail - remove edges where no flow occured(i.e where still have residual capacity) - run d...
there must exist a recurrence relation for 3 LCS
these recurrence relation may or may not be correct
Code: Select all
LCS(x, y, z) = 0, if x=0 or y=0 or z=0 LCS(x-1, y-1, z-1) + 1, if S1[x]=S2[y]=S3[z] max(LCS(x-1,y,z),LCS(x,y-1,z),LCS(x,y,z-1)), otherwise;
- Tue Jul 04, 2006 5:02 pm
- Forum: Algorithms
- Topic: array sorted or not (bentley)
- Replies: 2
- Views: 1052
say the array length is n, and you have m processors(computers) that can work simultaneously. then you can decide whether tha array is sorted or not in n/m times. x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 ^ ^ ^ ^ p1 p2 p3 p4 the 1st processor p1 checks the array[x1...x4] the 2nd processor p2 checks the...