a) An 8x8 image is given.
Use 8 connectivity to find shortest path between
pixels (1,1) with value 10 and (8,8) with value
106, if v = \{0, 10, 50, 54, 60, 63, 75, 106, 110\}
\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
10 & 143 & 210 & 0 & 0 & 10 & 170 \\
\hline
110 & 54 & 60 & 0 & 111 & 211 & 139 & 102 \\
\hline
60 & 63 & 111 & 71 & 161 & 105 & 10 & 70 \\
\hline
10 & 11 & 255 & 0 & 0 & 15 & 255 & 70 \\
\hline
0 & 50 & 190 & 0 & 112 & 0 & 6 & 200 \\
\hline
0 & 130 & 10 & 0 & 115 & 175 & 75 & 200 \\
\hline
60 & 0 & 150 & 10 & 200 & 81 & 255 & 50 \\
\hline
255 & 105 & 111 & 41 & 211 & 113 & 201 & 106 \\
\hline
\end{array}