Informatics I / Computers and Programming 5 / 6

Modeling and Simulation

When it is difficult to experiment with a real-world problem exactly as it is, there is a way to create a “model” inside a computer and test it. Something simplified by extracting only the essential features of a subject is called a model, and a simulated experiment using a model is called a simulation. Weather forecasts, traffic congestion predictions, and infectious disease outbreak predictions are all carried out using this method.

What Is Modeling?

Modeling means extracting only the elements necessary for a purpose from a complex real-world subject and representing them simply. A map is a model that omits “changes in land elevation and details of buildings” and represents only positional relationships, while a railway route map is a model that extracts only the connections between stations. Which elements are kept and which are omitted changes according to the purpose, and this is the essence of modeling.

Classification of Models

Models can be classified according to their form of representation into physical models (such as scale models that are smaller or larger than the real object), diagrammatic models (such as route maps and flowcharts), and mathematical models (formula models) (models that represent relationships using formulas).

They can also be classified as follows according to the characteristics of the subject.

・Static model / dynamic model: Whether the passage of time is not considered or is considered.
・Deterministic model / probabilistic model: Whether the result is uniquely determined or includes elements of chance (random numbers), such as a die.

Example A situation in which “you initially have 5,000 yen and save 2,000 yen every month” can be represented by the mathematical model y = 2000x + 5000, where y is the amount of savings in yen after x months. By substituting x=12, the amount of savings after one year can be predicted as 2000×12+5000 = 29,000 yen. Since this includes time, it is a dynamic model, and since it has no element of chance, it is a deterministic model.

Steps in a Simulation

In general, a simulation is carried out in the following steps: ① Decide the purpose → ② Create a model → ③ Run the simulation → ④ Evaluate the results → ⑤ Modify the model and repeat. Since a model is a simplified version of reality, it is essential to verify whether the results agree with reality and improve the model.

Simulation Using Random Numbers

Phenomena that include elements of chance are reproduced using random numbers generated by a computer. A method of finding an approximate solution by using a large number of random numbers is called the Monte Carlo method. A well-known example is estimating the value of pi. Random points are placed inside a 1×1 square, and multiplying by 4 the proportion of points that fall within a distance of 1 from the origin (inside a quarter circle) gives an approximate value of pi π. The more points used, the greater the accuracy. In addition, queuing simulations, which use random numbers for the number of arriving customers to investigate how long a checkout line will become, are actually used when deciding the number of checkout counters in convenience stores and the number of service windows in hospitals.

Key Point
  • Modeling = extracting only the elements necessary for a purpose and simplifying them.
  • The axes of classification are “physical, diagrammatic, and mathematical,” “static and dynamic,” and “deterministic and probabilistic.”
  • Advantages of simulation: Dangerous experiments, costly experiments, and experiments that are impossible in reality can be safely tried repeatedly.
  • Phenomena that include chance are reproduced using random numbers (the Monte Carlo method).
  • Because models are simplified, they differ from reality. The cycle of verification and improvement is important.

Practice Problems

  1. Answer whether a simulation of a board game in which a player moves according to the number shown on a die is a deterministic model or a probabilistic model.
  2. Using the model y = 2000x + 5000 for “initially having 5,000 yen and saving 2,000 yen every month,” find the amount of savings after 18 months.
  3. Give two advantages of conducting a simulation on a computer without experimenting with the real object.

Answers and Explanations

  1. Answer: Probabilistic model
    Explanation: It includes the element of chance (random numbers) represented by the number shown on the die. Even when run under the same conditions, the result may change each time.
  2. Answer: 41,000 yen
    Explanation: Substitute x=18: 2000×18+5000 = 36000+5000 = 41000 yen.
  3. Answer: (Example) ① Dangerous experiments and events that cannot be reproduced, such as disasters, can be tested safely. ② It costs less time and money than creating a real object, and the simulation can be repeated any number of times with different conditions.
    Explanation: Other correct answers include “Time can be fast-forwarded to investigate long-term changes in a short period of time.”

Read the rest with a free account

A free account unlocks the rest of this lesson and the learn-by-teaching-AI feature.

Create a free account Log in

Questions and answers for this lesson

Loading...