Introduction to Algorithms, Second Edition Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein The MIT Press Cambridge , Massachusetts London, England McGraw-Hill Book Company Boston Burr Ridge , IL Dubuque , IA Madison , WI New Yo
Problem Set 1 MIT students: This problem set is due in lecture on Day 6. Reading: Chapters 1–4, excluding §4.4; §28.2; §30.1. Both exercises and problems should be solved, but only the problems should be turned in. Exercises are intended to help you
一般情况下矩阵乘法需要三个for循环,时间复杂度为O(n^3),现在我们将矩阵分块如图:( 来自MIT算法导论 ) 一般算法需要八次乘法 r = a * e + b * g ; s = a * f + b * h ; t = c * e + d * g; u = c * f + d * h; strassen将其变成7次乘法,因为大家都知道乘法比加减法消耗更多,所有时间复杂更高! strassen的处理是: 令: p1 = a * ( f - h ) p2 = ( a + b ) * h p3
Introduction to Algorithms, Second Edition This book is one of a series of texts written by faculty of the Electrical Engineering and Computer Science Department at the Massachusetts Institute of Technology. It was edited and produced by The MIT Pre