Example 1 — Run a rumor simulation
Show the steps and the answer
Set the state: day 0, knowers = 5.
The state is the one number this model tracks; everything else about the school is left out.
Write the rule: each day, knowers = knowers + 2 × knowers = 3 × knowers, but never more than 400.
Each knower adds 2 new people, and there are only 400 students to tell.
Run it: day 1: 15; day 2: 45; day 3: 135; day 4: 3 × 135 = 405, capped at 400.
Each day's state is computed from the day before, so the steps must be done in order.
Read the prediction: after day 3, 400 − 135 = 265 students still have not heard; by day 4 everyone has.
The answer is whatever the state has become when the question's condition is first met.
Answer: 5, 15, 45, 135, then all 400 students on day 4.
Takeaway: A simulation is a state plus a rule applied again and again; its prediction is whatever the state turns into.