1. The function machine

The function machine

A function machine is built in order to complete a certain task. The machine always operates according to a certain rule. An example of a function machine can be a vending machine that converts coins into a certain amount of chewing gum.

Example 1

Consider a function machine that first multiplies the numbers entered into it by two, then adds number one to the result, and gives the final result as its output. For example, if the machine is given the number three as the input, the resulting output will be the number seven.



It is intended that this function machine is limited, so that it can only receive the numbers [[$ 0 $]], [[$ 1 $]], [[$ 2 $]], [[$ 3 $]] and [[$ 4 $]] as its input. It can give any integer from zero to nine as its output.

The process where the input is converted into the output can be marked with an arrow:

[[$ 0 $]]​ [[$ \rightarrow $]]​ [[$ 1 $]]​

“Zero becomes one” or “zero is described as one ”

[[$ 1 $]]​ [[$ \rightarrow $]] [[$ 3 $]]​ "One is described as three "
[[$ 2 $]]​ [[$ \rightarrow $]] [[$ 5 $]]​ "Two is described as five "
[[$ 3 $]]​ [[$ \rightarrow $]] [[$ 7 $]]​

"Three is described as seven "

[[$ 4 $]]​ [[$ \rightarrow $]] [[$ 9 $]]​ "Four is described as nine "

In general, the mode of operation of a function machine can be described as description.

In other words, "[[$ x $]] is described as an expression
[[$ x \rightarrow 2x + 1 $]]​"

There can be many different types of function machines, all of which work differently. However, they all function strictly according to the same basic principles.

The operating principles of function machines

  1. The allowed input of the function machine is always predefined.
  2. Allowed inputs start the function machine and are converted to output.
  3. The same input is always converted to the same output.

Peda.net käyttää vain välttämättömiä evästeitä istunnon ylläpitämiseen ja anonyymiin tekniseen tilastointiin. Peda.net ei koskaan käytä evästeitä markkinointiin tai kerää yksilöityjä tilastoja. Lisää tietoa evästeistä