Hares and Foxes
Time limit1sMemory limit128 MB
Given a linear recurrence matrix for hare and fox population differences, classify the long-term limiting behavior of the system into one of six fixed outcomes based on eigenvalue analysis.
- Level
Medium7 of 10
- Topics
- Math, Matrix, Simulation
- Solved
- No attempts yet
Problem
A theatre company stages a comedy in which many animals appear. To make the play as realistic as possible, a specialist studies how the animals behave, and he is currently interested in a two-species dynamic ecological system of hares and foxes. You are asked to build an automatic simulator that predicts the long-term fate of this system.
The system evolves according to the following standard model, a pair of difference equations:
Here and are the differences between the hare and fox populations in year and a reference count fixed at the start of the experiment. Their units are unknown, so and are treated as real numbers. Starting from the year-1998 values and , determine the long-term evolution of the system.
Input
The input contains test cases. The first line holds the single positive integer . Each case then gives six real numbers in this order, on three lines with two numbers per line, separated by one or more spaces. Each number uses the classical format (an optional sign, a sequence of digits, an optional decimal point, and an optional sequence of digits), and its text form is at most 10 characters long.
Output
For each case, print exactly one of the following sentences:
Ecological balance will develop.— if, after a sufficiently long time, both populations approach the reference count with arbitrary given precision, that is and .Hares will die out while foxes will overgrow.— if and .Hares will overgrow while foxes will die out.— if and .Both hares and foxes will die out.— if and .Both hares and foxes will overgrow.— if and .Chaos will develop.— if none of the above descriptions fits.