Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is it possible to get any give number with a minimum value and a maximum value?

to output any number you desire?

for example

x ? y = z

x = any number between 0 and 9
? = any operator [+,-,/,*, square root, power of,etc...]
y = any number between 0 and 9
z = outcome is any number between 0 and 10,000 (ten thousand)

My second question is: is there a way or formula to do it in reverse for example,

578 = x ? y

So if I know what Z (or outcome is) can I calculate what the other factors can be to give me that outcome using a formula or algorithmic method?

Please ask away if you need further clarifications to my questions I will try my best to explain it further more.

share|improve this question
1  
There are $10$ choices for $x$ and $10$ choices for $y$. Let's say you allow $10$ possible operators. Then you can only get at most $10\times10\times10 = 1000$ different results. So the answer is no. –  Rahul Oct 25 '12 at 23:59
    
If I suppose increase the number of operators to lets say 252 or more, (I know you are thinking WTH) but an operator could also be replace with a function (I am thinking in computer terms here not so much in maths) in theory this is possible? right? –  Val Oct 26 '12 at 0:11
add comment

2 Answers

This is a vague question. I'll restrict myself to power, roots and the standard binary operations.

If you restrict yourself to the integers (i.e. $x,\ y,\ z \in \mathbb{Z}$) then it's not too difficult to see that any prime larger than $18$ will not be representable. There's also the multiplicity argument given by Rahul Narain in the comments.

On the other hand, if we allow $x,\ y,\ z\in \mathbb{R}$ then any number between $1$ and $387420489 = 9^9$ will be representable by simply taking $x=9$ and varying $y$ from $0$ to $9$. The power function is continuous and any real number between the indicated limits will have a representation in the form of $x^y$. For numbers between $0$ and $1$ there are many representations. You can simply take for example $x=z$ and $y=0$ with addition.

share|improve this answer
add comment

First question's answer: if your input is between $0,9$ then assuming operations of (+,-,* and ^)

let $v = 4.19180654858$ $$ z \leq (9+9=18)\leq(9*9=81)\leq(9^v=10,000) $$

you can use symmetry to get the left hand side the following inequality:

$$-9^v \leq z \leq 9^v$$

So the answer of your first question is 'yes' but with the restriction shown above, that is many values of $x,y$ would result in values of $z>10,000$. For example $(x=1,y=9^7)$.

Second question's answer: Yes you can find $x,y$ however, you will get several value pairs of $(x,y)$ for a given $z$, so $x,y$ is not unique all the time. For example:

$$z=3$$

has the following pairs as a solution (this is a sample set): $(x=1, y=3)$, $(y=3,x=1)$, $(x=3,y=\frac{1}{3})$.

Even if you are looking for integer solutions only, you could get more than one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.