Exercise Lover

May 28, 2009

Exercise 28.4-6

Filed under: 28.4 — yuhanlyu @ 6:40 am

Solution wanted!

Exercise 28.4-5

Filed under: 28.4 — yuhanlyu @ 6:39 am

Solution wanted!

Exercise 28.4-4

Filed under: 28.4 — yuhanlyu @ 6:38 am

Given a n * n boolean matrix A, the transitive-closure of A is A^n, which can be get by repeat squaring in O(\lg n) multiplication. Given two matrix A and B, we can construct a matrix C with up-right is A and down-left is B, otherwise zero. The result of A * B can be extracted by transitive closure C’s top left sub-matrix.

Exercise 28.4-3

Filed under: 28.4 — yuhanlyu @ 6:25 am

Solution wanted!

Exercise 28.4-2

Filed under: 28.4 — yuhanlyu @ 6:24 am

Solution wanted!

Exercise 28.4-1

Filed under: 28.4 — yuhanlyu @ 6:16 am

Square operation can be simulated easily by multiply itself, hence M(n) time matrix multiplication implies an O(M(n)) time squaring algorithm. If we want to multiply two matrix A and B, we can construct a matrix C with top-right is A and down-left is B, otherwise 0. The result of A * B can be extracted from C^2.

Blog at WordPress.com.