Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site nbs-amrf.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!cvl!umcp-cs!nbs-amrf!hopp From: hopp@nbs-amrf.UUCP Newsgroups: net.math Subject: Re: Math for Smart Alecks Message-ID: <173@nbs-amrf.UUCP> Date: Sun, 29-Jan-84 13:23:57 EST Article-I.D.: nbs-amrf.173 Posted: Sun Jan 29 13:23:57 1984 Date-Received: Tue, 31-Jan-84 03:51:01 EST Organization: National Bureau of Standards Lines: 88 Subject: Re: Math for Smart Alecks Newsgroups: net.math Reference: <114@iwu1b.UUCP> I saw this recently in GAMES magazine. I didn't believe it at first, but after many attempts I could only sit back and wonder why it works. 1. Take ANY two numbers: say, 116 and 3011. 2. Halve the first number again and again, discarding any fractional remainder, until you reach 1. Thus: 116, 58, 29, 14, 7, 3, 1. 3. Double the second number as many times as you halved the first. Thus: 3011, 6022, 12044, 24088, 48176, 96352, 192704. 4. Write these series alongside each other, and cross out every even number in the HALVES column and its partner in the DOUBLES column. Thus, as shown below, the even numbers in the HALVES column (116, 58 and 14) are crossed out along with their companions in the DOUBLES column (3011, 6022 and 24088) REGARDLESS OF WHETHER THESE ARE EVEN OR ODD. HALVES DOUBLES 116 xxx 3011 58 xxx 6022 29 12044 14 xxx 24088 7 48176 3 96352 1 192704 5. Add the numbers that remain in the DOUBLES COLUMN ONLY. The resulting sum will be equal to the product of the two numbers you started with. 12044 + 48176 + 96352 + 192704 = 349276 = 116 x 3011 !!!!!!! Does anyone have any inkling as to why this works? Yes. This works because it is the standard algorithm for doing multiplication in binary representation. To see this, consider first the usual algorithm for deriving the binary representation of a number (say, 116). You start with the number and continually halve it until you get zero. While halving it, write the remainder of each division to the left of the number. The binary rep. is then read off from bottom to top: Remainder Halves --------- ------ 0 116 0 58 1 29 0 14 1 7 1 3 1 1 0 ^ | \---- Binary rep. of 116 is 1110100. Now consider the longhand multiplication of two numbers in binary (say, 116 x 3011): 101111000011 (= 3011) x 1110100 (= 116) ------------ 0 0 101111000011 0 101111000011 101111000011 101111000011 ------------------ 1010101010001011100 (= 349276 = 116 x 3011) Note that each time there is a 1 in the rep. of 116, the rep. of 3011 is added in after being shifted left the appropriate amount. Since each one- digit shift left in binary represents a doubling of the number, the product can be obtained by doubling 3011 and adding those multiples corresponding to rows where there is a 1 in the rep. of 116. Since these are just the rows with odd submultiples of 116, the algorithm in the game follows easily. Ted Hopp seismo!rlgvax!cvl!umcp-cs!nbs-amrf!hopp National Bureau of Standards Metrology A127 Washington, DC 20234 301/921-2461