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.

How many solutions are there for this equation:

$(n+1)x-\lfloor nx \rfloor = c$

I can prove some basic properties of floors and ceiling, but here I'm stumped.

share|improve this question
2  
Are $n$ and $c$ both supposed to be fixed, given quantities, so that only $x$ is an indeterminate? –  Brian M. Scott Oct 10 '13 at 6:16
add comment

1 Answer

up vote 1 down vote accepted

Let $y_1(x) = (n+1)x$ and $y_2(x) = c + \lfloor nx \rfloor$. You want to find $x^*$ such that $y_1(x^*) = y_2(x^*)$. Let's look now to $y_2(x)$:

$$y_2(x) = k + c ~~ \forall x \in \left[\frac{k}{n}, \frac{k+1}{n}\right), k \in \mathbb{Z}$$

So you want to solve, for each $k$, the following equation: $$(n+1)x = k + c ~~ \forall x \in \left[\frac{k}{n}, \frac{k+1}{n}\right)$$ The solution is: $$x^* = \frac{k+c}{n+1}$$ This solution is feaseble if $x^*$ is in the set $\left[\frac{k}{n}, \frac{k+1}{n}\right)$. Then:

$$\frac{k+c}{n+1} \geq \frac{k}{n} \wedge \frac{k+c}{n+1} < \frac{k+1}{n}$$ Assuming that $n \in \mathbb{N}$, then: $$n(k+c) \geq k(n+1) \wedge n(k+c) < (k+1)(n+1)$$ $$k \leq nc \wedge k > nc-n-1$$ So you have solutions for each $k$ integer in the set $\left(nc-n-1, nc\right]$.

The length of this set is $n+1$, so you have $n +1$ solutions.

share|improve this answer
1  
Thanks you so very much! :) –  Arek Krawczyk Oct 10 '13 at 10:09
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.