# A brief foray into determinism

A deterministic system is one where some piece of information determines another. This is most commonly the case in Math and input-less programming:

def f(x):
return x * x


or
$y = f(x) = x^2$

In this example, the result of the function, y, is determined by x. If you know the value of x, you immediately know the value of y. Is the reverse true, however? If you know y, you only know the absolute value of x. x itself could be positive or negative. However, x is still determined from y: x can't be anything. y is determined by x: if you stick in the same x, over and over again, the same y will still pop out. Two possible values of x are determined by y: if you stick in the same y, over and over again, the same two possibilities will pop out.

An indeterministic system is one where nothing determines anything else. The most common case is system input, and random numbers.

def f(msg):
return raw_input(msg)


What is result of f("Type something! ")? You don't know. It could be "Foo". Let's say we ran this, and out came "Foo". Then we ran it again, and out came "Bar". Run it again, "Paris". Run it again, "pneumonoultramicroscopicsilicovolcanoconiosis" pops out.

How about f("Type 'blah': ")? Well, "blah" could come back, or maybe "2398sflkj", or maybe "Foo" again. We have no idea! And if we take one of our outputs, say "Foo", what was the input? It could have been anything as well.

Let's consider this binary, compiled for 64-bit Linux. Right now, without invoking a hexedit or anything, you have no idea what's in it. If you can run it, you won't see anything. But you keep trying dumb things, and lo-and-behold: