Donald Knuth 从巴比伦泥板 锲形文字里发现了一个古老的算法

2018-06-05 07:25:27 +08:00
 est
http://steiner.math.nthu.edu.tw/disk5/js/computer/1.pdf


A (rectangular) cistern.
The height is 3,20, and a volume of 27,46,40 has been
excavated.
The length exceeds the width by 50. (The object is to find the
length and the width.)
You should take the reciprocal of the height, 3,20, obtaining 18.
Multiply this by the volume, 27,46,40, obtaining 8,20. (This
is the length times the width; the problem has been reduced
to finding x and y, given that x -- y = 50 and xy = 8,20.
A standard procedure for solving such equations, which
occurs repeatedly in Babylonian manuscripts, is now used.)
Take half of 50 and square it, obtaining 10, 25.
Add 8,20, and you get 8,30, 25. (Remember that the radix point
position always needs to be supplied. In this case, 50 stands
for 5/6 and 8,20 stands for 8], taking into account the
sizes of typical cisterns!)
The square root is 2,55.
Make two copies of this, adding (25) to the one and subtracting
from the other.
You find that 3,20 (namely 3-~) is the length and 2,30 (namely
2½) is the width.
This is the procedure.


简单翻译一下,注意古巴比伦用的是 60 进制。这里每位数之间用半角逗号分隔。

一个装水的容器,高 3,20,一共装了 27,46,40 这么多水。
已知长 比 宽 多出 50,求长宽各是多少。。。
2285 次点击
所在节点    分享发现
9 条回复
wjm2038
2018-06-05 08:08:26 +08:00
这答案都不对啊
jjianwen68
2018-06-05 08:10:43 +08:00
60 进制?是不是太蛋疼了
wjm2038
2018-06-05 08:11:29 +08:00
如果是 60 进制 200*150*200=60000
27*3600+46*60+40=100000
xiaket
2018-06-05 08:15:56 +08:00
aka 一元二次方程在特殊条件下的解:

( (x - y) / 2 ) ** 2 + x*y == ( (x + y) / 2 ) ** 2, 算出 x 和 y 的平均值后就简单了
xiaket
2018-06-05 08:17:04 +08:00
`base10 = lambda x: sum((60**(x.count(",") - i) * int(d)) for i,d in enumerate(x.split(",")))`

方便熟悉 py 的同学玩, 不过真的不需要
est
2018-06-05 08:38:44 +08:00
@wjm2038 怎么不对。。。

长宽高:
250 x 200 x 200 == 100000
3,20 x 2,30 x 3,20 == 27,46,40
wjm2038
2018-06-05 08:42:09 +08:00
@est #6 哪里来的 250... 3*60+20 不是 200 么
est
2018-06-05 09:54:39 +08:00
@wjm2038 啊哈哈,的确算错了。
iceheart
2018-06-06 10:07:04 +08:00
x*(x+50)*3,20=27,46,40
x*(x+50)=27,46,40/3,20
x*(x+50)=100000/200
x*(x+50)=500
(x+25)^2=500+625
x=sqrt(1125)-25

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/460422

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX