Professional Documents
Culture Documents
Wikipedia)
Wikipedia)
3/27/2012
/
PDF
English
Esperanto
Franais
Italiano
.
)(
) (Longest Common Subsequence :
) (
.
.
][
. LCS
][
Polski
.
. .
.
.
][
. :
:
LCS Y X . :
LCS
Z LCS
Z LCS
LCS : LCS .
LCS
][
C LCS
LCS .
. i=0 j=0
LCS
LCS
. :
http://fa.wikipedia.org/wiki/%D8%A8%D8%B2%D8%B1%DA%AF%E2%80%8C%D8%AA%D8%B1%DB%8C%D9%86_%D8%B2%DB%8C%D8%B1%D8%AF%D9%86%D8%A8%D8%A7%D9%84%D9%87_%D
1/3
3/27/2012
LCS
.
LCS
) .(
. row-major . c
.
. .
)
.
b
.( LCS .
LCS b .
http://fa.wikipedia.org/wiki/%D8%A8%D8%B2%D8%B1%DA%AF%E2%80%8C%D8%AA%D8%B1%DB%8C%D9%86_%D8%B2%DB%8C%D8%B1%D8%AF%D9%86%D8%A8%D8%A7%D9%84%D9%87_%D
2/3
3/27/2012
return
' = ]if b[i,j
' then
)print_LCS(b,X,i-1,j-1
print
else if b[i,j]= ' ' then
)print_LCS(b,X,i,j-1
)else print_LCS(b,X,i,j-1
][
.
. LCS
N
.
. :
n m
[]
][
.L. Bergroth and H. Hakonen and T. Raita. SPIRE (IEEE Computer Society) 00 (2000): 3948 .1
][
: .
Creative Commons Attribution/Share-Alike .
.
http://fa.wikipedia.org/wiki/%D8%A8%D8%B2%D8%B1%DA%AF%E2%80%8C%D8%AA%D8%B1%DB%8C%D9%86_%D8%B2%DB%8C%D8%B1%D8%AF%D9%86%D8%A8%D8%A7%D9%84%D9%87_%D
3/3