Unformatted text preview: tiplication problem: Look for the two contiguous matrices that can be multiplied the fastest and multiply them. Continue like this until Fnished. (More formally, let the dimensions for matrices A 1 ,...,A n , be given by the sequence < p ,p 1 ,...,p n > . Look for the two contiguous matrices A i and A i +1 whose multi-plication minimizes the product p i-1 p i p i +1 . Substitute p i-1 ,p i +1 for p i-1 ,p i ,p i +1 in p . Continue like this until p consists of only two values.) Show that this greedy algorithm does not necessarily Fnd the optimal way to multiply a chain of matrices....
View Full Document
- Fall '08
- Multiplication, Greedy algorithm, Clyde Kruskal