Real-World example of Non-Determinism

  Can you think of a Real-World example of Non-Determinism? By that I mean an example of something that can happen with more-than-one outcome from "state 1" given the occurrence of "condition A" (single condition occurs...but somehow - multiple outcomes then also occur)???

Sample Solution

     

Scenario: You're running late for work and stuck at a traffic light (State 1). The light turns green (Condition A). However, the outcome can be one of two possibilities:

  1. Smooth sailing: The light stays green long enough for you to proceed without encountering any other red lights or obstacles (Outcome 1).
  2. Red light roulette: The light turns green just as you're about to go, but then unexpectedly turns red again shortly after (Outcome 2). This could be due to a sensor detecting a car crossing the intersection on a yellow light, or a malfunction in the traffic light cycle.

In this example, the initial state is you being stuck at a red light. The single condition that occurs is the light turning green. But, due to factors beyond your control (other cars, traffic light malfunctions), there can be two different outcomes affecting your commute time.

Full Answer Section

     

Here's another non-determinism example you might encounter:

Scenario: You're baking cookies (State 1). You follow the recipe perfectly and put the cookies in the oven to bake (Condition A). However, the outcome can vary:

  1. Golden perfection: The cookies bake evenly and turn out delicious (Outcome 1).
  2. Burnt surprise: An unexpected oven malfunction causes the cookies to burn (Outcome 2).

Again, the initial state is the cookie dough ready for baking. The single condition is putting the dough in the oven. But, due to potential oven issues (undetected malfunction), there are two possible outcomes for your delicious treat.

IS IT YOUR FIRST TIME HERE? WELCOME

USE COUPON "11OFF" AND GET 11% OFF YOUR ORDERS