15 15 a 0 3 4 0 1 2 2 1 2 1 1 0 2 5 0 3 4 0 1 2 2 1 2 1 1 6 2 7 0 1 2 7 0 1 2 8 0 1 0 2 5 2 8 8 8 0 1 0 23 4 2 43 34 3 1 2 4 8 0 23 4 2 1 2 4 8 43 34 3 43 7 0 14 8 0 1 8 3 439 0 7 3 This method is called Egyptian Multiplication Division or Russian Peasant Multiplication Division Wow Those Russian peasants were pretty smart 7 X 101 2 2 2 7 5 2 7 How could this be Egyptian Historically negative numbers first appear in the writings of the Hindu mathematician Brahmagupta 628 AD 6 7 6 7 6 2 6 We can view numbers in many different but corresponding ways Representation Und erstand the rrelationship elationship bet ween different differ ent repr esentations of the t he same informat ion or idea information 1 2 3 A Induction is how we define and manipulate mathematical ideas Formal Arguments Loop Invariants Recursion Algorithm Design Recurrences B Abstr action Abstr act aw ay the inessential away featur es of a problem features pr oblem or solution Even very simple computational problems can be surprisingly subtle 7 7 7 7 7 7 7 7 1 1 1 1 1 1 1 4 7 1 7 1 7 1 This method costs only 3 multiplications The savings are significant if b a8 is executed often 6 C 7 D D 6 E F 6 6 2 3 2 3 G 6 6 7 6 F E E Exemplific ation Tr y out a pr oblem or solution on small examples E 7 H K IJ E H E H K C E 7 I J 6 4 7 E 3 4 4 D 6 4 E 2 4 7 E 3 4 4 D 2 6 4 E Upper Bound Lower Bound Lower Bound Exhaustive Search There are only two sequences with 2 multiplications Neither of them make 8 a a2 a3 a a2 a4 Lower Bound Upper Bound Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution Representation Und erstand the rrelationship elationship bet ween different differ ent repr esentations of the t he same informat ion or idea information 1 2 3 6 Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution E Representation Und erstand the rrelationship elationship bet ween different differ ent repr esentations of the t he same informat ion or idea information 1 2 3 8 Everything besides the exponent is inessential This should be viewed as a problem of repeated addition rather than repeated multiplication 7 D 6 F F 2 4 6 4 34 6 4 Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution Representation Und erstand the rrelationship elationship bet ween different differ ent repr esentations of the t he same informat ion or idea information 1 2 3 15 15 a A 2 3 4 3 4 3 2 2 2 3 4 2 2 6 6 7 6 6 8 F 6 A F G G 6 3 4 6 6 D 6 6 6 6 D 2 2 3 4 3 2 0 3 4 3 4 3 4 3 2 2 E 2 60 3 4 3 4 2 3 4 3 2 6 6 2 1 30 by a chain of 6 1 2 4 8 10 20 30 6 6 6 6 D D 6 Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution We saw that applying ABSTRACTION to the PROBLEM simplifies the issue PROBLEM Raising A Number To A Power Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution What about ABSTRACTION to the SOLTUTION Let SOLUTION be the Repeated Squaring Algorithm Abstraction Abstract Abstr act aw ay the inessential featur es of a problem or solution What features did our solution RQA actually make use of Abstraction Abstract Abstr act aw ay the inessential featur es of a problem or solution For example does the RQA require the underlying objects to be numbers Abstraction Abstr ac tion Abstr ac t away aw ay the inessential features featur es of a problem or solution The repeated squaring method works for modular arithmetic and for raising a matrix to a power Abstraction Abstrac tion Abstrac Abstractt away the inessential features featur es of a problem pr oblem or solution The repeated squaring method works for any notion of multiplication that is associative a b c a b c ak is well defined ax ay ax y L Abstraction Abstr ac tion Abstract Abstr act away aw ay the inessential featur es of a problem or solution features D 6 F M B D 3 4 2 3 Failure of Imagination A 6 D D D D7 6 D D 8 D8 A 6 D D D D8 D D8 D8 6 F 6 D8 D 6 D F D8 D8 6C 7 7 D N 6 F 6 OP Q R 2 7 2 2 6 B D 3 3 7 73 D 2 4 F 4 F D S 3 7 3 4 2 0 D 0 4 G 3 3 4 3 2 30 1 2 4 8 10 20 30 A 8 A 8 6 Construct a in M a additions Using a as a unit follow a construction method for b using M b additions In other words every time the construction of b refers to a number x use the number a times x 3 7 1 5 72 5 73 3 283 I I 3 J I 3 4 5 J 3 3 3 J 6 A 7 2 8 8 8 7 2 2 6 7 2 2 8 8 8 8 D D Does equality hold 22 R 2 8 2 7 7 2 8 7 0 22 7 T I I I 2J 2 J 3 4 2 22J 6 F 6 T T 6 6 6 B 7 8 D 45 G F F A U 5 7 24 7 A 6 R T 6 6 6 A I 3 4 0 2 3 4 3 3 4 3 3 42 4 423 5 J T V 8 6 D 6 G B 6 6 W W I D 6 F J M Repr esentation Under stand the relationship r elationship between different r epr esentat ions of the same esentations infor mation or idea Formal Arguments Loop Invariants Recursion Algorithm Design 1 Recurrences 2 3 Abstr action ac tion Abstr actt away the inessential Abstrac featur es of a pr oblem or solution problem Exemplific ation Tr y out a pr oblem or problem solution on small examples Abstraction Abstr ac tion Abstract Abstr act away aw ay the inessential …
View Full Document