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.

I have set of inequalities in two dimension space which represent relation between $X$ and $Y$. now I want a function whose input is $X$ and output is $Y$. In other words, I want $F$ such that $F(X)=Y$ satisfying given inequalities. for example $ X >= 0, Y>=0, X<=63, Y<=15, X>=4Y, X<=4Y+3$

Now in above case if I input X, function should return Y. Hence, for example, in above case $F(0)=0$ and $F(4)=1$ and so on... You can plot these function on WolframAlpha and see how it gives integer solutions. But I'm looking for a function which maps X to Y.

Is it possible to get such function?

share|improve this question
Do you want any function with graph in that area? Surely you must see that $F(4)$ could be anywhere in $[0.25, 1]$ and still satisfy the inequalities. –  Karolis Juodelė Dec 8 '12 at 18:31
Ok..even if function returns anything in some range, I can take ceil value of it..basically I want both X and Y to be integers..on WolframAlpha page have a look at Integer solutions section.. –  user997704 Dec 8 '12 at 18:40
So you want integers that satisfy the inequality? You should really say so. In general this has nothing to do with functions. In this case, just take $F(x) = \lfloor x/4 \rfloor$. –  Karolis Juodelė Dec 8 '12 at 20:36
Yes I figured out that but is there any library that can do it for me? –  user997704 Dec 8 '12 at 20:44
Library? Are you talking about programming? Most languages have a floor() in their standard libraries... –  Karolis Juodelė Dec 8 '12 at 20:52

Your Answer


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

Browse other questions tagged or ask your own question.