Exercise Lover

July 1, 2007

Exercises 25.1-10

Filed under: 25.1 — yuhanlyu @ 12:19 pm

Find \min_m \exists_i L_{ii}^m < 0.

Exercises 25.1-9

Filed under: 25.1 — yuhanlyu @ 12:18 pm

Check the diagonal entries. If there is one entries with negative value, then there exists negative cycle.

Exercises 25.1-8

Filed under: 25.1 — yuhanlyu @ 12:17 pm

One matrix L stores the partial result, the other matrix W stores the repeatedly square matrix. We can use the bit-pattern of n to decide whether L multiplies W or not.

Exercises 25.1-7

Filed under: 25.1 — yuhanlyu @ 12:14 pm

The same as 25.1-6.

Exercises 25.1-6

Filed under: 25.1 — yuhanlyu @ 12:13 pm

If L[i,j] = L[i,k] + w[k,j], then π[i,j] = k.

Exercises 25.1-5

Filed under: 25.1 — yuhanlyu @ 12:08 pm

The vector v is initialized with all ∞ except the source is 0. Then multiply v by matrix W n-1 times.

Exercises 25.1-4

Filed under: 25.1 — yuhanlyu @ 12:06 pm

Exercises 25.1-3

Filed under: 25.1 — yuhanlyu @ 12:06 pm

The matrix corresponds to the identity matrix.

Exercises 25.1-2

Filed under: 25.1 — yuhanlyu @ 12:04 pm

It is by definition. If after the algorithm termination the value is not zero, then there exists a negative cycle.

Exercises 25.1-1

Filed under: 25.1 — yuhanlyu @ 12:02 pm

Blog at WordPress.com.