Function machines and reversing operations · Higher
Introduit| English | Sens |
|---|---|
| input/ˈɪnpʊt/ | valeur d'entrée |
Caesar's cipher
- Julius Caesar sent secret messages by shifting each letter 3 places: A → D, B → E. To read them, shift back 3. Encoding is a function; decoding is its inverse.
- Function machines make rules like this exact.
Machines and expressions
- An input 输入值 $x$ through $\times 2$, $+3$ gives $2x + 3$: input 4 gives 11.
- Inputs $-1, 0, 1$ give $1, 3, 5$ — a linear pattern.
Entrée $x$: $-1$, then $\times 4$, then $+2$. What is the output?
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
Keep the order with brackets.
Reversing
- Use inverse operations in reverse order: 11 → $-3$ → 8 → $\div 2$ → 4.
- The reverse machine for $y = 2x + 3$ gives $x = \dfrac{y - 3}{2}$.
Machine: $\times 5$, $-7$. The output is 38. Find the input.
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$45 \div 5$.
Worked example: two machines in a row
Machine A: $\times 2$, $+3$. Machine B: square the input.
- A then B with input 4: A gives 11, B gives $11^2 = 121$.
- B then A with input 4: B gives 16, A gives $2 \times 16 + 3 = 35$.
- Order matters: $121 \ne 35$. As expressions, $(2x + 3)^2$ and $2x^2 + 3$.
Function machines and reversing operations
Follow the operations in their stated order
Compare the model with the worked case and explain one change.
Machine A: $+1$. Machine B: $\times 3$. Input 5 through B, then A. Output?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$15 + 1$.
Same machines; input 5 through A, then B. Output?
Difficulté 2/5 · 140 pièces + un petit bonus lors de la première réussite aujourd'hui
$6 \times 3$.
When a machine has no unique reverse
- Squaring sends both 3 and $-3$ to 9, so "reverse square" has two possible inputs.
- If the output is 25 after squaring, the input was 5 or $-5$.
A machine squares, then adds 1. The output is 50. What could the input be?
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
$x^2 = 49$.
Back to Caesar
- Encoding with letters as numbers 0–25: $y = x + 3$. Decoding: $x = y - 3$.
- Two shifts in a row, $+3$ then $+5$, act like one shift of $+8$.
$(2x + 3)^2$ is not $2x^2 + 3$. Squaring after the machine is not the same as squaring first. Keep the order of the machines and use brackets.
Putting a number through machine A then B always gives the same answer as B then A.
Difficulté 1/5 · 100 pièces + un petit bonus lors de la première réussite aujourd'hui
121 vs 35 in the example.
A machine's output is an expression in its input. Reverse it with inverse operations in reverse order. Joining machines depends on order, and a squaring step can have two reverse inputs.
Machine A is $\times 3$, $-2$. Write the reverse machine as a rule, then find the input that gives 25.
Inverse machine.