"Chicken and rabbit Problem" is a classical mathematical problem, originated from the ancient Chinese four or five-century mathematical works "grandson Count". The 31st of the books is entitled: "There are pheasants, rabbits and cages, with 35 heads and 94 feet below." How about the pheasant and the rabbit geometry? The solution to the original works is: "On the head of the department, the foot is placed." Half a foot, to the head to remove the foot, to the foot to remove the head, that is. "The specific solution namely: the total number of heads (35) and the total foot (94), the total number of feet divided by two, and then subtract the total number of head (94÷2-35), the number of rabbits to 12, total head minus the number of rabbits 35-12 to get the number of chickens 23."
The chicken rabbit problem itself is not difficult, using the 2-yuan 1-time equations of the elimination algorithm, you can quickly get the answer. We can try to use Excel to provide a variety of computing tools to calculate, not only fun, but also to deepen the integration of Excel features, for the teaching of Excel teachers, is a typical problem more than the solution of the material.
First, using the IF function to test the solution
As shown in Figure 1, create a two-dimensional table, assuming that the number of chickens is B2 as the cell that requires solution, the total head number and the number of feet of the chicken Rabbit were written into D2 and D3 cells respectively, and the formula was written in other cells using the known conditions: the number of rabbit heads = Total number of heads-head count, so the =d2-b2 in C2 cells; chicken feet = number of chickens * 2, the B3 cell is written to =b2*2, the number of rabbit feet = Rabbit head number *4, so C3 cell write =c2*4.
Next we enter a judgment formula in any other cell (using the F1 cell in this example), the formula is =if (D3=B3+C3, "positive solution!", IF (D3>B3+C3, "High", "low")). The essence of the formula is to judge the relationship between the number of chicken feet + the number of feet and the total number of feet, if the expression d3=b3+c3 result is true, it means that we have got the correct answer.
Finally, an arbitrary integer in the B2 of 35 is applied to the heuristic solution. If the input value is higher than the positive solution, the Judge cell F1 will prompt "high", if the value is less than the positive solution prompts "low", the user prompts to continue to enter another number, until the correct answer 23,f1 cell will display "positive solution!".
This method is more intuitive, but very clumsy, requires manual intervention. Even if the user is smart enough to use the split test, it requires multiple inputs to solve the problem, which is almost impossible for a larger problem.
Fig. 1 using the IF function to test the solution