Presentation is loading. Please wait.

Presentation is loading. Please wait.

..

Similar presentations


Presentation on theme: ".."— Presentation transcript:

1 .

2 The ENIAC’s 1949 Determination of π
Brian Shelburne Sinclair Community College November 14, 2014

3 Mathematics exists in context

4 The ENIAC’s 1949 Determination of π
Abstract: In January 1950, George W. Reitwiesner published “An ENIAC Determination of π and e to more than 2000 Decimal Places” in Mathematical Tables and Other Aides to Computation describing the first use of a computer, the ENIAC, to calculate the decimal expansion of π. Because the history of π stretches back over thousands of years, the use of the ENIAC to determine π is an important historical and technological milestone. The ENIAC was not designed to perform this type of calculation; it could only store 200 decimal digits while the determination of e and π required manipulating numbers digits long. Starting with Reitwiesner’s description of the calculation, the known architecture of the ENIAC, how it was programmed, and the mathematics used, we examine why the calculation was undertaken, how it had to be done, and what was subsequently learned.

5 Mathematical Tables and Other Aids to Computation, Vol. 4, No. 29 (Jan

6 Mathematical Tables and Other Aids to Computation, Vol. 4, No. 29 (Jan

7 Overview How I Got Interested in the question A brief history of π
The ENIAC How it was programmed in 1949 Why was the calculation done and why did Reitwiesner became interested in it? Three (or 4) reasons why! Why von Neumann and others got interested in it Reverse engineering the calculation - how the determination of π was (most likely) done What was learned

8 Why I Got Interested in it The converse of “research informs teaching” Math 460: Senior Seminar: Journey Through Genius, Chapter 4: Archimedes’ Determination of Circular Area A sentence in the book reads: “Finally in 1949 the computer fundamentally revolutionized the calculation [of the determination of π].In that year the Army’s ENIAC computer found π to 2037 places.” (Journey Through Genius p 111.) Huh?

9 A brief history of π – Finding the area of a circle
Famous Ancient Estimates The Archimedean method using inscribed / circumscribed polygons Infinite Series Expansions –Arctan Series Formula Gregory -Leibniz Series for π/4 Machin’s formula for π/4 Determinations of π The Computer!

10 1 - Ancient Estimates Rhind Papyrus (1650 BCE)
conjectured by H. Engels “Example of a round field of diameter 9 khet. What is its area? Take away 1/9 of it, namely 1: the remainder is 8. Multiply 8 times 8; it makes 64; the amount of it, this is in area 64 setat”

11 Rhind Papyrus (1650 BCE) conjectured by H. Engels 𝐴𝑟𝑒𝑎≈ 8 9 𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 2
𝐴𝑟𝑒𝑎≈ 𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 2 𝜋≈ ≈3.1605

12 2 - Archimedean Methods using 96–sided inscribed and circumscribed
polygons ≈ <𝐴𝑟𝑒𝑎<3 1 7 ≈ Detail of an engraving by M. Weber of a painting by the Italian artist Niccolò Barabino ( ).

13 Archimedes’ Area of Circle =
Radius ← circumference →

14 Using the Archimedean method Ludolph Van Ceulen (1540 – 1610) computed π to 35 digits.
A replica of the Van Ceulen tombstone, installed at the Leiden pi day (7/5/2000).

15 Newton’s Pi (Methodus Fluxionum et Seriersum Infinitarum – written 1671)
expand by binomial theorem area of the triangle 1/6 of a circle of radius 1/2 Dunham p. 174

16 Newton’s pi Newton computed pi to 15 digits writing later
"I am ashamed to tell you to how many figures I carried these computations, having no other business at the time."[

17 3 - Infinite Series (mid 17th Century) Arctan Formula 𝑎𝑟𝑐𝑡𝑎𝑛 𝑥 = 0 𝑥 1 1+𝑡 2 𝑑𝑡= 𝑘=0 ∞ −1 𝑘 𝑥 2𝑘+1 2𝑘+1 Gregory-Leibniz Series 𝑎𝑟𝑐𝑡𝑎𝑛 1 = 𝜋 4 =1− − 1 7 +… Machin’s Formula 𝜋 4 =4 𝑎𝑟𝑐𝑡𝑎𝑛 1 5 ⁡−𝑎𝑟𝑐𝑡𝑎𝑛 1 239 converges very slowly

18 Arctan Series Formula (Details)
1. 2. 3.

19 Gregory (1638-1675) - Leibniz (1646 – 1716) Formula John Machin’s (1680 – 1751) Formula
Converges too slowly Converges much faster

20 1853: William Shanks determines π to 707 digits
1853: William Shanks determines π to 707 digits! Augustus DeMorgan ( ) notices a smaller number of appearances of the digit 7 in Shanks’ determination. Later on it was discovered that there was an error beginning at the 528 digit of Shanks’ calculation Question! Do all ten digits in the decimal expansion of π occur approximately 1/10th of the time? Hmm…

21 Is π “normal”? “A number is said to be simply normal to base b if its base-b expansion has each digit appearing with average frequency tending to b-1.” - Wolfram MathWorld Is π “simply normal base 10”? “A number that is b-normal for every b=2, 3, ... is said to be absolutely normal (Bailey and Crandall 2003)”.

22 More things that make you go “Hmm…” The Dutch mathematician L. E. J
More things that make you go “Hmm…” The Dutch mathematician L.E.J. Brouwer (1882 – 1966) also posed the question of whether 1000 consecutive zeroes appear in the decimal expansion of π (see Eves, In Mathematical Circles: A Selection of Mathematical Stories and Anecdotes p. 31). If it could be established that numbers like e and π are normal in the sense that the statistical distribution of their digits is uniform, then one could make that case that given a long enough sequence of digits for e or π, odds are the answer is yes

23 Moreover …. In Carl Sagan’s novel Contact, the protagonist Ellie discovers a sequence of 0’s and 1’s in the base 11 expansion of π (1020 digits out) which when arranged in a square form a rasterized circle. The sequence’s length is a product of 11 primes. Is information hidden in the expansion of π?

24 The ENIAC Started during WWII in 1943 Completed 1946

25 4. The ENIAC Started during WWII in 1943 Completed 1946 Move to BRL, Aberdeen MD 1947

26 Project PX: The ENIAC Project: 1943-1946
Constructed to do ballistic computations for the Army! 30 units (40 panels - room sized) including 20 Accumulators each capable of storing a signed 10 digit decimal number (200 digits of storage) Capable of 5000 additions/second (200 μsec) ~18,000 vacuum tubes 30 tons ft KW power Cost ~$500,000.00 Programming: Hardwired! Decentralized Control! Used punch cards for I/O

27 The People J. Presper Eckert Jr. John W. Mauchly 1907 – 1980

28 H.H. Goldstine John von Neumann

29 Project PX – the “ENIAC” - proposed 1942,
contract signed 1943, delivered 1946

30 "ENIAC OFFICIALS" From left to right: J. Presper Eckert, Jr
"ENIAC OFFICIALS" From left to right: J. Presper Eckert, Jr., Chief Engineer; Professor J. G. Brainerd, Supervisor; Sam Feltman, Chief Engineer for Ballistics, Ordnance Department; Captain H. H. Goldstine, Liaison Officer; Dr. J. W. Mauchly, Consulting Engineer; Dean Harold Pender, Moore School of Electrical Engineering, University of Pennsylvania; General G. M. Barnes, Chief of the Ordnance Research and Development Service; Colonel Paul N. Gillon, Chief, Research Branch of the Army Ordnance Research and Development Service.

31 View of ENIAC accumulators
View of ENIAC accumulators. Standing: Ester Gerston; crouching: Gloria Ruth Gorden. (US Army Photo; mil/ftp/historic-computers/png/eniac4.png.) The ENIAC: Built By Men – Programmed by Women

32 Functional Diagram of the ENIAC
• 20 Accumulators × Multiplier ÷ Divider/Square Rooter c Constant Transmitter M Master Programmer FT Function Tables Card Punch Card Reader card reader card punch

33 The Accumulators

34 The Computational Unit How an ENIAC Accumulator “worked” Stores a signed 10 decimal digit number Could transmit (multiple times) that number or its negative Could receive a number and add it to its contents Example: Add 3 times

35 A Sample Calculation: squares and cubes
AC18: n AC19: n2 AC20: n3 Example taken from The Electronic Numerical Integrator and Computer (ENIAC) by H.H. Goldstine and Adele Goldstine; MTAC 1946; Reprinted in IEEE Annals of the History of Computing, Vol 18, No , pp

36 Example: How the ENIAC calculated squares and cubes A1: AC19 (n2) transmits 3 times; AC20 (n3) receives 7 times A2: AC18 (n) transmits 3 times; AC19 (n2) receives 2 times A3: Constant Transmitter transmits 1; AC18 (n) and AC19 (n2) receives 1 time AC20: n3+3n2 AC19: n2+2n; AC20: n3+3n2 +3n AC18: n+1; AC19: n2+2n+1; AC20: n3+3n2 +3n+1

37 ENIAC at BRL: (left to right) Homé McAllister, Winifred (Wink) Smith, George Reitwiesner, and Ruth Lichterman

38 Why George Reitweisner got interested in it
“Early in June, 1949, Professor John von Neumann expressed an interest in the possibility that the ENIAC might sometime be employed to determine the value of π and e to many decimal places with a view toward obtaining a statistical measure of the randomness of the distribution of the digits … Further interest in the project on π was expressed in July by Dr. Nicholas Metropolis who offered suggestions about programming the calculations” -“An ENIAC Determination of π and e to more than 2000 Decimal Places” in Mathematical Tables and Other Aides to Computation Vol 4 No. 29 (Jan 1950 )

39 George Reitweisner & Homé McAllister

40 Why was the calculation done?
Possibility of applying new computer technology to solving problems in theoretical and not just applied mathematics

41 In a letter to von Neumann dated 2/8/1946, M. H. A
In a letter to von Neumann dated 2/8/1946, M.H.A. Newman a mathematician at Manchester University wrote “with the development of fast machine techniques mathematical analysis itself may take a new slant, apart from the developments that may be stimulated in symbolic logic and other topics not usually in the repertoire of engineers or computing experts; and that mathematical problems of an entirely different kind from those so far tackled by machines might be tried, e.g. testing out, the 4-colour problem or various theorems on lattices, groups, etc., for the first few values of n.” Historical Footnote: 30 years later in 1976 the Four Color Theorem was proved by K. Appel and W. Haken at the University of Illinois-Urbana using a computer.

42 Why was the calculation done?
Possibility of applying new computer technology to solving problems in theoretical and not just applied mathematics Interest in Monte Carlo methods & random number generation (1949)

43 In the late 1940’s J. von Neumann, N
In the late 1940’s J. von Neumann, N. Metropolis and Stanislaw Ulam developed Monte Carlo methods (neutron diffusion problem in nuclear fission research) Metropolis’ and Ulam’s seminal paper on the Monte Carlo method came out in September 1949 “Monte Carlo methods … are a class of computational algorithms that rely on repeated random sampling to compute their results. Monte Carlo methods are often used in computer simulations of physical and mathematical systems. These methods are most suited to calculation by a computer and tend to be used when it is infeasible to compute an exact result with a deterministic algorithm.” Wikipedia: Monte Carlo method

44 Monte Carlo π +1 Randomly generate N ordered pairs of points (x,y) where -1 ≤ x ≤ 1 and -1 ≤ y ≤ 1 Let C = count of ordered pairs that are w/in the unit circle Then π ≈ 4C/N -1 +1 -1 [w]hen random numbers are to be used in fast machines, numbers will usually be needed faster. More significant is the fact that because longer sequences will be used, one is likely to have more elaborate requirements about what constitutes a satisfactory sequence of random numbers – J. von Neumann

45 “Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin” – von Neumann

46 Why was the calculation done?
Possibility of applying new computer technology to solving problems in theoretical and not just applied mathematics Interest in Monte Carlo methods & random number generation (1949) Augustus DeMorgan’s discovery of an error in Shanks 1853 determination of π - is π base 10 normal? A mathematician’s fascination with numbers

47 “A Logical Coding System Applied to the ENIAC”
Because re-wiring the ENIAC to perform a new calculation took so long the ENIAC was modified so that it could be programmed using two-digit codes stored in its Function Tables giving it a read only memory for instructions.

48 The ENIAC was re-configured to be a computer with a ROM for code and a small RAM for data

49 A Logical Coding System Applied to the ENIAC R.F. Clippinger
29 September 1948 A set of 60 Order Codes for programming the ENIAC

50 BLR Technical Note No. 141 November 1949 Description and use of The Eniac Converter Code This was an expanded set of 100 Converter Codes

51 An Overview of the ENIAC Order/Converter Codes 2 digit codes packed 6 to a line stored in the Function Tables (12 digits/line); codes very unlike those of today’s computers! 19 codes cleared AC α then transmits AC 15 to AC α - Listen 19 codes transmit AC α to AC 15 (Add) - Talk AC 6 contains the current code line (~ program counter) which could be altered (unconditional branch).

52 Codes to clear AC 15 (15) multiply AC 15 by AC 11 (57) negate AC 15 (41) drop sign AC 15 (46) shift AC 15 left or right (10 codes) double shift AC 15 AC12 pair left or right (10 codes) , square root of AC 15 (64) branch on positive or zero: conditional branching (69) divide AC 15 by AC 7 (63)

53 10 digit numbers plus sign; all numbers had assumed decimal points (scaling was necessary!) Of 20 accumulators, 8 were allocated for tasks Example division 63 used AC 5 (remainder), AC 7 (denominator), AC 15 (numerator/quotient), AC 13 Only 12 accumulators remained for “working” storage

54 Read : Code 44 : Read eight 10 digit numbers from 80-column punch card to locations A – H of the Constant Transmitter 80 column punch card | | | | | | | | A B C D E F G H Codes 50 – 53 transferred CT locations AB, CD, EF and GH to AC11 and AC15. Print: Code 45: Punched AC1, AC2 and AC15 – AC20 onto columns 1 – 80 of a punch card. AC1 AC2 AC15 AC16 AC17 AC18 AC19 AC20

55 ENIAC Punch Card A AC1 B AC2 C AC15 D AC16 E AC17 F AC18 G AC19 H AC20
A – H refers to locations in the Constant Transmitter

56 How the calculation was (most likely) done
What formulas were used for e and π? Determine e and π on a modern computer Given Reitwisener’s description, the mathematics for determining e and π, the modern program for determining e and π (see step 2) and the Order/Converter Code used on the ENIAC, reverse engineer the process. Did e first; π second. Build an ENIAC simulator and program the calculations!

57 The mathematical formulas (2000+ digit accuracy
The mathematical formulas (2000+ digit accuracy!) Calculation for e Calculation for π 1400+ terms needed

58 Why these calculations could be done on the ENIAC If one term of the series was known the next term could be obtained from it If you could calculate then was divided by 5 Same was true for

59 Technical Issues Representing/Storing 2000+ Digit Numbers
Implementing High Precision Division How does ENIAC Division work? High Precision Addition/Subtraction Program Control

60 Capacity: Eight signed 10 digit numbers
Storing 2000 Digit Numbers 80 Column Punch Card Capacity: Eight signed 10 digit numbers

61 Internal Storage: Only 12 Accumulators available for “working storage” Two sets of five accumulators (decades 6…2): AC 16 – AC 20 AC 3, AC 4, AC 9, AC 10, AC 14 Alignment with AC 16 – AC 20 and Punch Card columns 31 – 80 | AC01 | AC02 | AC15 | AC16 | AC17 | AC18 | AC19 | AC20 |

62 ENIAC Punch Card AC1 AC2 AC15 AC16 AC17 AC18 AC19 AC20

63 The program processed 25 digits at a time using 5 accumulators
High Precision Division: Suppose you could only divide 5 digit numbers. How would you divide a 10 digit number? The program processed 25 digits at a time using 5 accumulators 3. ENIAC Division – gives you the quotient and the remainder

64 ENIAC Division Example: 7. 94 divided by 3
ENIAC Division Example: 7.94 divided by 3.0 with assumed decimal points between 8th and 9th decades Denominator Numerator Quotient ↓ sign change! ↓- shift decrement sign change!

65 ENIAC Division Example (cont): 7. 94 divided by 3
ENIAC Division Example (cont): 7.94 divided by 3.0 with assumed decimal points between 8th and 9th decades Denominator Numerator Quotient ↓+ shift increment sign change! Denominator Numerator Quotient ↓- shift decrement sign change! remainder!

66 ENIAC had a branch on positive or zero instruction (code 69) 1 27182
High Precision Addition and Subtraction: How would you add (or subtract) 10 digit numbers if you could only add (or subtract) 5 digits at a time? Program Control ENIAC had a branch on positive or zero instruction (code 69) “End of Input” termination: Input Process Output 1 27182 +31515 ----- 58698 82828 +92653 ----- 175481

67 Putting It all Together
“The computation of e was completed over the July 4th week end as a practice job to gain experience and technique for the more difficult and longer project on π” It took 11 hours.

68 Initial Input Deck AC1 field – numerator AC2 field – denominator As each line is read, high precision division is used to generate 25 digits of the quotient in AC 16 – 20. Remainder written back to AC1. Assumed decimal points between the 6th and 7th decades | AC1 | AC2 | AC15 – 20 | 1 - 25 negative for “end of input”

69 Input Card Numerator Denominator AC1 AC2 AC15 AC16 AC17 AC18 AC19 AC20
Remainder

70 Then each quotient is added to the accumulating sum in AC3, AC4, AC9, AC10 & AC14 Contents of AC1, AC2, and AC15 – AC20 punched and next card read. At “end of input” contents of AC3, AC4, AC9, AC10 & AC14 also punched out | AC1 | AC2 | AC

71 Sum Card AC1 AC2 AC15 AC16 AC17 AC18 AC19 AC20

72 | AC01 | AC02 | AC15 | AC16 | AC17 | AC18 | AC19 | AC20 |

73 First not quite 25 digits of e
will be carry over from term to right

74 The sum card is removed from the output deck
The sum card is removed from the output deck. The output deck “turned around” and extended with the next set of denominators and numerators (plus an “end of input” card) and the program executed again. This will generate the next 25 digits of e. Repeat by “turning around” and extending the output decks until digits of e have been generated (25 digits at time).Finally total the summation cards (carry overs) to obtain e to digits.

75 The Calculation for π More difficult than e since the terms were more complicated. Required two programs, one to generate the terms for arctan(1/5) and arctan(1/239) and a second program to sum the terms. The calculation for π, performed over Labor Day week-end in 1949, took 70 hours.

76 The mathematical formulas (2000+ digit accuracy
The mathematical formulas (2000+ digit accuracy!) Calculation for e Calculation for π terms for e are “recursive” 1400+ terms needed terms are not quite as “recursive” as the terms for e

77 What Was Learned Recalling the reason for the calculation
“Only the following minor observation is offered at this time concerning the randomness of the distribution of digits. … A preliminary investigation has indicated that the digits of e deviate significantly from randomness (in the sense of staying closer to their expected values than a random sequence of this length normally would) while for π no significant deviations have so far been detected” χ2 test used !

78 The Search Goes On The ENIAC’s more than 2,000 digit record for π stood for five years until it was surpassed in 1954 by a 3,000-plus digit determination of π performed on the IBM built Naval Ordnance Research Computer (NORC). It took 13 minutes! In 1961 Shanks & Wrench computed 100,000 digits of π on an IBM It took 8 hours.

79 π: Some (Early) Computer Generated Milestones
1949: ENIAC digits (70 Hours) 1953: NORC – 3089 digits (13 minutes) 1958: IBM 704 – 10,000 digits (1 hr. 40 min.) 1959: IBM 704 – 16,167 digits (4.3 hours) 1961: IBM 7090 – 100,000 digits (8 hr. 43 min.) October 16, 2011 – 10,000,000,000 digits (371 days) Note: 1010 < 1020 the value mentioned in Contact

80 One Final Legacy “Values of the auxiliary numbers arccot 5 and arccot 239 [i.e. arctan(1/5) and arctan(1/239)] to 2035D are in the possession of the author and also have been deposited in the library of Brown University and the UMT file of MTAC.” The documents were found in the Mathematics of Computations Math Tables Collection at the Briscoe Center for American History, University of Texas, Austin

81 Summary 1. The determination of π is a very old problem. 2. The use of the ENIAC in 1949 was the first use of computer technology to determine π. It held the record for 5 years! 3. The ENIAC was not constructed to perform this type of high precision calculation yet it did – a tribute to the skill, ingenuity and abilities of its users. 4. We still don’t know if π is base 10 normal – we suspect it is but can we ever prove it?

82 The ENIAC’s 1949 Determination of π
Thank You Brian J. Shelburne Department of Mathematics and Computer Science Wittenberg University


Download ppt ".."

Similar presentations


Ads by Google