|
|
|
|
|
by amluto
486 days ago
|
|
I think that, if you are restricted to a finite list of n-ary functions, n>=2, each returning a single value, then you can’t do it, as you will only have finitely many valid expressions. This may be easier to see in a stack machine / RPN model. An expression is a list of operations, drawn from a finite set, each of is either “push the number 2” or something that decreases the stack size by at least 1. And you need exactly 4 pushes. So a valid expression has four pushes and at most 3 other operations, because otherwise the stack would underflow. This gives a finite number of possible expressions, but there are an infinite number of integers, so it can’t work. |
|