Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Difference engine
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Method of differences == The principle of a difference engine is [[Newton polynomial|Newton's method]] of [[divided differences]]. If the initial value of a polynomial (and of its [[finite difference]]s) is calculated by some means for some value of '''''X''''', the difference engine can calculate any number of nearby values, using the method generally known as the '''method of finite differences'''. For example, consider the quadratic [[polynomial]] : <math>p(x) = 2x^2 - 3x + 2 \,</math> with the goal of tabulating the values ''p''(0), ''p''(1), ''p''(2), ''p''(3), ''p''(4), and so forth. The table below is constructed as follows: the second column contains the values of the polynomial, the third column contains the differences of the two left neighbors in the second column, and the fourth column contains the differences of the two neighbors in the third column: {| class="wikitable" |- ! x !! ''p''(''x'') = 2''x''<sup>2</sup> β 3''x'' + 2 !! diff1(''x'') = ( ''p''(''x'' + 1) β p(''x'') ) !! diff2(''x'') = ( diff1(''x'' + 1) β diff1(''x'') ) |- | 0 || 2 || β1 || 4 |- | 1 || 1 || 3 || 4 |- | 2 || 4 || 7 || 4 |- | 3 || 11 || 11 || |- | 4 || 22 || || |} The numbers in the third values-column are constant. In fact, by starting with any polynomial of degree ''n'', the column number ''n'' + 1 will always be constant. This is the crucial fact behind the success of the method. This table was built from left to right, but it is possible to continue building it from right to left down a diagonal in order to compute more values. To calculate ''p''(5) use the values from the lowest diagonal. Start with the fourth column constant value of 4 and copy it down the column. Then continue the third column by adding 4 to 11 to get 15. Next continue the second column by taking its previous value, 22 and adding the 15 from the third column. Thus ''p''(5) is 22 + 15 = 37. In order to compute ''p''(6), we iterate the same algorithm on the ''p''(5) values: take 4 from the fourth column, add that to the third column's value 15 to get 19, then add that to the second column's value 37 to get 56, which is ''p''(6). This process may be continued ''[[ad infinitum]]''. The values of the polynomial are produced without ever having to multiply. A difference engine only needs to be able to add. From one loop to the next, it needs to store 2 numbersβin this example (the last elements in the first and second columns). To tabulate polynomials of degree ''n'', one needs sufficient storage to hold ''n'' numbers. Babbage's difference engine No. 2, finally built in 1991, can hold 8 numbers of 31 decimal digits each and can thus tabulate 7th degree polynomials to that precision. The best machines from Scheutz could store 4 numbers with 15 digits each.<ref>{{Cite book |url=https://books.google.com/books?id=QqrItgm351EC&pg=PA201 |title=A Brief History of Computing |last=O'Regan |first=Gerard |date=2012 |publisher=Springer Science & Business Media |isbn=978-1-4471-2359-0 |page=201 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)