Instead of finding the longest common
subsequence, let us try to determine the
length of the LCS.
Then tracking back to find the LCS.
Consider a1a2…am and b1b2…bn.
Case 1: am=bn. The LCS must contain am,
we have to find the LCS of a1a2…am-1 and
b1b2…bn-1.
Case 2: am≠bn. Wehave to find the LCS of
a1a2…am-1 and b1b2…bn, and a1a2…am and
b b b
b1b2…bn-1
Let A = a1 a2 … am and B = b1 b2 … bn
Let Li j denote the length of the longest i,g g
common subsequence of a1 a2 … ai and b1 b2
… bj.
Li,j = Li-1,j-1 + 1 if ai=bj
max{ L L } a≠b i-1,j, i,j-1 if ai≠j
L0,0 = L0,j = Li,0 = 0 for 1≤i≤m, 1≤j≤n.
標(biāo)簽:
the
subsequence
determine
Instead
上傳時(shí)間:
2013-12-17
上傳用戶:evil
MIPS 仿真器,能夠?qū)崿F(xiàn)匯編,反匯編和模擬運(yùn)行。自己開發(fā)的,java課的大程,可能問題比較多,僅做參考,而且程序架構(gòu)也設(shè)計(jì)地不是很好。但作為新手大程學(xué)習(xí)和簡單的MIPS模擬還是沒有問題的。
本 MIPS 模擬器支持的指令如下:
add,addi,sub,subi,and,andi,or,ori,nor,beq,bne,j,jr,jal,lw,lh,lb,sw,sh,sb, 其中所有的跳
轉(zhuǎn)指令第三個(gè)操作數(shù)只能為一個(gè)行標(biāo)簽[不支持相對(duì)地址以及絕對(duì)地址],標(biāo)簽可
以寫在一行開頭,以冒號(hào)結(jié)尾。
標(biāo)簽:
MIPS
仿真器
上傳時(shí)間:
2014-01-04
上傳用戶:ruixue198909