Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given two integer variables $x$ and $y$. We are given that each integer variable $x$ and $y$ can't be greater than a given integer $z$.

The problem: We are given the proportions $a$ and $b$ such that $a + b = 1$, $a = \frac x z$, and $b = \frac y z$. Is it possible to reverse solve $x$ and $y$?

share|cite|improve this question
I don't think so but you can generally say $y=z-x$. – user65985 Dec 3 '13 at 5:34
In the future, please try to use Mathjax to format your post, and avoid putting everything in backquotes. Please also let us know what you've tried so we can tailor our answers appropriately. Also, please try to find a more informative title—percentages aren't even involved. – dfeuer Dec 3 '13 at 5:54

Assuming you know $a$ and $z$:

From $a+b=1$, you can conclude ….

From $a=\frac x z$ you can conclude ….

From $b=\frac y z$ you can conclude ….

share|cite|improve this answer
yes but $a$ and $b$ will not be integers...if one chose to round them, it wont be consistently hold for all numbers – user1234440 Dec 3 '13 at 6:00
@user1234440, there isn't always a solution in integers. Can you come up with a description of just when there will be one? – dfeuer Dec 3 '13 at 6:05

Note: This isn't a rigorous answer, and is only meant to get you on the right track. Work out the 'Why?' parts I've mentioned below.

From the information you have provided, since $a + b = 1$, $x+y=z$ for a given $z$, along with the constraints $x \leq z$ and $y \leq z$. Also, note that if $x=0, y=z$ and that $x=z$, when $y=0$. Therefore, $x,y \in [0,z]$ (Why?). It's easy to see that there would be $(z+1)$ solutions counting all such $x,y \in \mathbb Z.$(Why?)

share|cite|improve this answer

Your Answer


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.