Babylonian Algorithm, Confused by Formula Derived From Problem

113 Views Asked by At

In my history class we have been tasked with choosing a specific topic and writing a report. As a computer science student, I was interested in finding out what the oldest algorithms were and how they were applied. After some research I came across the Babylonians and based my paper on that.

In one of the articles I found, they transcribed an algorithm for calculating length and width, set up with steps and answers

Image of algorithm from document

They used a sexagesimal position based number system, single digit number (ex. 50) is converted by dividng by 60 so it would be $\frac{5}{6}$

Two and three digit numbers are calculated in the sense $a + b/60 + c/3600$ and so on. (ex. $27, 46, 40 = 27 + \frac{46}{60} + \frac{40}{3600} = \frac{250}{9}$)

(If you cannot see the last numbers when they reveal the answer they are $3 \frac{1}{3} and 2 \frac{1}{2}$)

In the paragraph after the algorithm, the author says that the formula used to achieve the answer is:

$$\sqrt{(\frac{d}{2})^2 + p} \pm \frac{d}{2}$$

As for my attempt to solve this, I have gotten as far as dividing height by volume to get the length times the width and to me it seems like they complete the square somehow but no matter what I try I cannot get the same answer they get.

Any insight into this would be greatly appreciated.

1

There are 1 best solutions below

4
On BEST ANSWER

Let the unknown width and width be $x$ and $y$. The calculation proceeds as follows.

  • First obtain $xy$ by multiplying the given volume by the reciprocal of the given height.
  • Then calculate $\left(\frac{x-y}2\right)^2$.
  • Add $xy$ to this to get $\left(\frac{x-y}2\right)^2+xy$.
  • Take the square root to get $\sqrt{\left(\frac{x-y}2\right)^2+xy}$.
  • The length and the width will then be $$\sqrt{\left(\frac{x-y}2\right)^2+xy}+\frac{x-y}2$$ and $$\sqrt{\left(\frac{x-y}2\right)^2+xy}-\frac{x-y}2\;.$$

We can check this:

$$\begin{align*} \sqrt{\left(\frac{x-y}2\right)^2+xy}+\frac{x-y}2&=\frac12\left(\sqrt{(x-y)^2+4xy}+x-y\right)\\ &=\frac12\left(\sqrt{(x+y)^2}+x-y\right)\\ &=\frac12(2x)\\ &=x\;, \end{align*}$$

and a similar calculation verifies that $\sqrt{\left(\frac{x-y}2\right)^2+xy}-\frac{x-y}2=y$.

If we now set $d=x-y$ and $p=xy$, these expressions become

$$\sqrt{\left(\frac{d}2\right)^2+p}\pm\frac{d}2\;,$$

as claimed.

Note that when you actually carry out a numerical calculation, you have to keep track of the radix point on your own, since the Babylonians notation $8,20$, for instance, represented any of the numbers $500\cdot60^n$ with $n\in\Bbb Z$.

Added: Here is a possible line of reasoning leading to the formula. Let $u=\frac{x+y}2$ be the average of the length and width, and assume that $x>y$. Then $x=u+\frac{d}2$, and $y=u-\frac{d}2$, so

$$xy=\left(u-\frac{d}2\right)\left(u+\frac{d}2\right)=u^2-\left(\frac{d}2\right)^2\;,$$

and

$$u=\sqrt{\left(\frac{d}2\right)^2+xy}\;.$$

The idea of finding the midpoint between $x$ and $y$ and then adding and subtracting half the distance between them is straightforward, and although they did not have a symbolic algebraic notation, the Babylonians must have known the factorization $a^2-b^2=(a-b)(a+b)$, which is really the only other tool needed.