Fortune Telling Collection - Comprehensive fortune-telling - How to calculate the fortune-telling chicken rabbit cage _ how to calculate the chicken rabbit cage

How to calculate the fortune-telling chicken rabbit cage _ how to calculate the chicken rabbit cage

Chicken-rabbit cage algorithm

The algorithm of chicken and rabbit in the same cage is as follows:

(number of rabbit feet × total number of feet-total number of feet) ÷ (number of rabbit feet-number of chicken feet) = number of chickens, and total number of chickens = number of rabbits.

Chickens and rabbits caged together is one of the famous anecdotes in ancient China. About 65,438+0,500 years ago, this interesting question was recorded in Sun Tzu's mathematical classics. The book wrote: "There are chickens and rabbits in the same cage, with 35 heads above and 94 feet below. What are the geometric shapes of chickens and rabbits?

These four sentences mean: there are several chickens and rabbits in a cage, counting from the top, there are 35 heads; It's 94 feet from the bottom. How many chickens and rabbits are there in each cage? In Yunnan civil service examinations over the years, the problem of chickens and rabbits in the same cage has also appeared many times.

The calculation method of Sun Tzu's Art of War is introduced as follows:

Sunzi suanjing was written in the 4th ~ 5th century. The author's life and the year of writing are unknown. The book is divided into three volumes: the first volume discusses the units of measurement in detail, and discusses the calculation system and method for the first time; The middle part is mainly about the application of fraction, including the calculation of area, volume and equal proportion series; The second volume has the most profound influence on later generations. For example, title 3 1 in volume 2, the famous problem of "chickens and rabbits in the same cage", was later spread to Japan and changed to "crane and turtle calculation".

This book, written in the 4th century AD, is divided into three volumes, the author of which is unknown. The book systematically records the counting system and the rules of calculation, multiplication and division. It is an arithmetic enlightenment book, which records the problem of "chickens and rabbits in the same cage", especially the problem of "unknown things". It is the first congruence problem in China's ancient mathematical works and has become the source of the famous "China's skill".

According to legend, The Art of War was written by Sun Wuzi in the Spring and Autumn Period, and he wrote thirteen art of war. However, because the original work has been lost in the Ming Dynasty, it is impossible to verify who the author "grandson" is. The Sutra of suan Zi, which we see now, was compiled by Dai Zhen, an Anhui mathematician, from Yongle Grand Ceremony in Qianlong period of Qing Dynasty.