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

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
**Unformatted text preview: **Computer Science 130B Winter 2007 Homework #3 Due: 4pm, February 23th, Friday Problem 1 Consider a square lattice structure. A square lattice of size n 2 is a directed labeled graph G = ( V, E ), where | V | = n 2 . Vertices in a lattice are arranged in a grid pattern, i.e., each vertex has a unique address ( i, j ), where 1 ≤ i ≤ n , and 1 ≤ j ≤ n . There are two types of edges in a lattice: horizontal and vertical. Horizontal edges go from vertex ( i, j ) to vertex ( i, j +1), for 1 ≤ i ≤ n , and 1 ≤ j ≤ n- 1, while vertical edges go from vertex ( i, j ) to vertex ( i + 1 , j ), for 1 ≤ i ≤ n- 1, and 1 ≤ j ≤ n . Label of an edge indicates the cost of traversing the particular edge. The goal here is to find a directed path of 2 × ( n- 1) edges ( n- 1 vertical and n- 1 horizontal) leading from vertex (1,1) to vertex ( n, n ) such that the total cost of the path is minimized....

View
Full
Document