程大位与剩余定理

  • 时间:2020-04-07 13:55:18
  • 分类:数学世界
  • 阅读:125 次

无论是《韩信点兵》的数学问题,还是《孙子算经》中“今有物不知其数,三三数之余二,五五数之余三,七七数之余二,问物几何?”都用到了被称为“中国剩余定埋”的解题方法,人们又叫它孙子问题。

到了明代,数学家程大位把《孙子算经》中的这个问题的算法编成了四句歌诀:

三人同行七十稀,

五树梅花廿一枝,

七子团圆正半月,

除百零五便得知。

用现在的话来说就是:一个数用3去除,除得的余数乘70;用5去除,除得的余数乘21;用7去除,除得的余数乘15,最后把这些乘积加起来再减去105的倍数,就知道这个数是多少。算式是:

70×2+21×3+15×2=233

233-105-105=23

所以,这些物品最少有23个。根据上面的算法,我们可以知道,韩信点兵时,必须知道部队的大概人数,否则也是无法算出准确人数的。

推荐阅读:
Using the External Fan to Cool the Hot AMD Radeon HD 6700 Graphi  Algorithms to Compute the Dot Product of Two Sparse Vectors  Algorithms to Compute the Largest Time for Given Digits  How to Use Hash Map to Count the Frequencies of Values and Itera  Ordered Three 2TB WD HDD to prolong the life expectancy of HPZ80  HPZ800 Server Does Not Support Hard Drives Larger Than 2TB  Fresno Blogger Changing The Vegan Blogging Scene  Russian ‘Pokemon Go’ Blogger Goes On Trial  Starting a Blog? 5 Topics People Care About in 2017  6 Strategies To Grow Your Facebook Page 
评论列表
添加评论