A computer game generates ‘1s’ and ‘0s’. These are associated with awards. The first ‘1’ (i.e. the first 1 of an uninterrupted sequence of 1's obtained by continuously running the program several times such that each execution generates a 1 output in that set of executions) results in 4 awards but the remaining 1’s do not result in any award. On the other hand, each odd numbered 0 results in 2 points and each even numbered 0 does not get any award. For the output 011100001011.. of executions results in awards 2400202024240……
Is the above activity mentioned in the game, combinational or it must be sequential?
(Developed by self)
- No equations
Its sequential because we have to keep the count of 0s whether they are odd or not.