Let f(x)=x+1andg(x)=2x. We will, for example, write fg to denote the function “perform g then perform f” so that fg(x)=f(g(x))=2x+1. If i≥0 is an integer we will, for example, write fi to denote the function which performs fi times, so that fi(x)=fff......fitimes(x)=x+i.
Show that f2g(x)=gf(x).
Note that gf2g(x)=4x+4. Find all the other ways of combining f and g that result in the function 4x+4.
Let i,j,k≥0 be integers. Determine the function figfjgfk(x).
Let m≥0 be an integer. How many different ways of combining the functions f and g are there that result in the function 4x+4m?
Suggestion
Can we use part (iii) of this question here? How many times do we need to do g? And f?
When a question asks for all ways of doing something, or all solutions, we need to find a way to show we haven’t missed any. Also, question parts are often closely related and the earlier parts can be very useful for answering the later parts.
Since we need to make 4x+4, we must need two gs and between one and four fs in some order. Using the equation from part one, we have gf2g(x)=g(f2g)(x)=g(gf)(x)=g2f(x) and gf2g(x)=(gf)fg(x)=(f2g)fg(x) which gives f2gfg(x)=f2(gf)g(x)=f2(f2g)g(x)=f4g2(x) and any more rearrangements would just take us back to one of these options.
Therefore the four possible ways are: gf2g(x),g2f(x),f2gfg(x),f4g2(x) and nothing else.
The four ways are shown in this diagram in green, blue, orange and purple.
From the example in the question, fi(x)=x+i, so, figfjgfk(x)=2(2(x+k)+j)+i=4x+i+2j+4k
For any m, there will still only be two gs.
Thus any function will be of the form figfjgfk(x) with integers i,j,k≥0 as in part (iii) with i+2j+4k=4m
Approach 1
Since i,j≥0, the value of k is constrained by 0≤k≤m.
Then, given k, the value of j is constrained by 0≤j≤2m−2k, since i≥0 and i+2j=4m−4k.
Once
j
and
k
are determined,
i=4m−4k−2j,
so
i
is also uniquely determined. Therefore the number of possible solutions is: