ABSTRACT

This chapter introduces three kinds of simulations: simulation of direct statement, simulation by sieve method and construction simulation. In the real world, there are many problems that people can solve by simulating their processes. For these problems, solution procedures or rules are shown in problem descriptions. Programs must simulate procedures or implement rules based on descriptions. Programmers must read such problems carefully, and simulate processes based on descriptions. A problem for simulation of direct statement becomes harder as the number of rules increases. The hardest situation Caesar ever faced was keeping himself alive. The output file contains one line for each line in the input file. This line contains the minimal number of parcels into which the order from the corresponding line of the input file can be packed. The output should contain one line more than the number of solutions.