I need to choose best path,
say have this array:
x=
1 0 0
0 0 0
0 0 0
i want anyone help me to write algorithm to trace any path begin from (1,1) and have to stop in (3,3), but when passing position such x(i,j),(i,j) will be =1 , otherwise will be zero where sum(Xij)<=2 if j=1:3 or sum(xij)<=1 if i=1:3.
it is like sequence alignment algorithm, but I do not want use dynamic programming algo. to do this task.
who can help me?
Thanks in advance
sorry sum(xij)<=2 not 1 if i=1:3