# ALGO HW 3 - XICHEN 860996805 HW3 PROBLEM ONE From the proof...

This preview shows pages 1–2. Sign up to view the full content.

XICHEN 860996805 HW3 PROBLEM ONE From the proof Dijkstra’s at notebook page 660-661, we know that the correctness of this algorithm is based on non-negative weights of edges. However, Dijkstra only used this restriction is to solve the case that: “because y appears before u on a shortest path from s to u and all edge weights are non-negative, we have ζ (s, y) <= ζ (s, u) ( ζ ()denotes the shortest length from source s to node). But, by suspecting the problem one, we found that the edges that have negative weight are the ones leaving the source vertex s, which means the algorithm will always choose the lightest non-negative weight leaving from s after the 1st step is done. And even when we take the 1st step, we still obey the algorithm strictly as choosing the lightest weight although this weight is negative, and since then there is no chance to contact with any negative weight; either we don’t have any negative weight problem anymore. So the proof of correctness holds. PROBLEM TWO Step 1: Define OPT [i, j i ] = the sum of minimum disruptions of the pixels in it 1,2. ..

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

ALGO HW 3 - XICHEN 860996805 HW3 PROBLEM ONE From the proof...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online