# Percentages and Proportions

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$?

-
I don't think so but you can generally say $y=z-x$. –  Danis Fischer 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 ….

-
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?)

-