Here's a puzzle of mine that I created around 2 hours ago:
Let $f(x):=x^2$ and $g(x):=x-4$. Starting with x=0, what is the least amount of times you need to apply the functions $f$ and $g$ so that at some point, the output is $1024$?
Restrictions
Negative numbers less than $-8$ are not allowed.
I wanted to try my hand at getting the most efficient solution to this, so here is my most efficient attempt so far (my second attempt, first attempt used up a total of 60 functions):
Total functions: 14$$f(g(g(g(g(g(g(g(g(f(g(g(f(g(0))))))))))))))$$
- Apply $g(x)$ and then $f(x)$ to get $16$ (total of $2$ functions right now)
- Apply $g(x)$ twice to get $8$ and then apply $f(x)$ to get $64$ (total of $5$ functions right now)
- Apply $g(x)$ a total of $8$ times to get $32$ and then apply $f(x)$ to get $1024$ (total of $14$ functions)
However, my question is: Is this truly the most efficient solution to my puzzle, or can YOU find a solution that is more efficient?
unsure if I need more tags or not or if tags need to be changed/removed
Of course I know the most efficient solution, I'm just seeing if you can find it :)