At a GAA club quiz, could swapping the order of two bonus rules change your score?
At a GAA club quiz, you start with two points. One bonus rule squares your score. The other doubles it and adds one. You have to use both rules. Would swapping their order change your final score?
You already know how a function machine works. Give it an allowed input, and its rule gives exactly one output. The allowed inputs make up its domain. For the two quiz rules, you can start with any real number.
Start with two. Send it through g, the squaring machine, and out comes four. Now pass that four into f. Double four and add one to get nine. The first machine’s output becomes the second machine’s input. That’s composition.
This time you start with four and use the squaring machine first. Before the second machine does anything, which number arrives at its input? Pick one answer.
On the left, read f composed with g, applied to x. On the right, you can see g of x inside f. Start with that inner rule, g, then use its output as the input to f.
For f of g of x, square x first. Then double x squared and add one. For g of f of x, double x and add one first. Then square that whole result. At two, the first order gives nine and the reverse order gives twenty-five.
Keep the same two rules and change the starting number to three. What is g of f of three? Decide which machine goes first, then pick your answer.
Both rules originally accept all real numbers. Now restrict f to zero through four, inclusive. With g first, two gives four, which f accepts. Three gives nine, which f rejects. With f first, three gives seven, which g accepts. Five cannot even enter f.
Watch the difference when you start at two. The circle tells you to feed g’s output, four, into f and get nine. If you replace the circle with a times sign, you work out f of two and g of two separately. Five times four gives twenty, a different answer.
A Leaving Cert question could ask for g of f of x in terms of x. Using the original rules, put two x plus one into g and square the bracket. For expanded form, multiply the two brackets and collect like terms: four x squared plus four x plus one.