Take this puzzle of mine that I created around a week ago:
Take these 3 functions: $f(x):=x+8,g(x):=x^2-3,h(x):=\sqrt x$
Starting from $x=0$,$$\color{black}{\text{How many times will you need to apply }f,g,\text{ and }h\text{ to get }78}?$$or is the puzzle simply impossible?
My attempt:
$$\begin{align}g(0)=-3\quad&(1\text{ function})\\g(g(0))=6\quad&(2\text{ functions})\\g(g(g(0)))=33\quad&(3\text{ functions})\\f(g(g(g(0))))=41\quad&(4\text{ functions})\\f(f(g(g(g(0)))))=49\quad&(5\text{ functions})\\h(f(f(g(g(g(0))))))=7\quad&(6\text{ functions})\\g(h(f(f(g(g(g(0)))))))=46\quad&(7\text{ functions})\\f(f(f(f(g(h(f(f(g(g(g(0)))))))))))=78\quad&(11\text{ functions})\end{align}\\\therefore11\text{ functions are needed to solve this puzzle}$$
However, my question is
Is this the most optimized solution there is, or can you find a more efficient solution?
Hint:
The title hints at a way of finding the most efficient solution. (if I have hinted at it correctly)