Im a student with not such a knowledge to solve equations with floor functions. I want to ask, if it is even possible and if it so, how is possible to prove this equation to be true.

- ⌊(n+m)/G⌋ = ⌊(2g-n-m)/G⌋-1

and where :

  G= b^r 
  g= b^r - 1 

when needed , r and b can be replaced by any natural number

Edit1 : I only need to prove it when G= 2^r and g = 2^r-1 where r is variable

Edit2 : One of the variables, n or m can be fixed.

  • $\begingroup$ What is n,m,a,b,g,G,r? All different variables? There are way too many variables for this to be remotely solvable. $\endgroup$ – Don Thousand Mar 31 at 13:20
  • $\begingroup$ I already changed it , there are just variables n,m,G and g . But i only need to prove it when G= 2^r and g = 2^r-1 where r is variable $\endgroup$ – Patrik Bašo Mar 31 at 13:22
  • $\begingroup$ also it is possible to fix one of the variable so for example n=0 $\endgroup$ – Patrik Bašo Mar 31 at 13:22

If $G=2^r$; $g=2^r-1$ and $n+m=k$ then we have $$- \Big\lfloor\frac{k}{2^r}\Big\rfloor = \Big\lfloor\frac{2^{r+1}-2-k}{2^r}\Big\rfloor-1$$ $$\Big\lfloor\frac{k}{2^r}\Big\rfloor+\Big\lfloor\frac{2^{r+1}-2-k}{2^r}\Big\rfloor=1$$ $$\Big\lfloor\frac{k}{2^r}\Big\rfloor+\Big\lfloor2-\frac{k+2}{2^r}\Big\rfloor=1$$ As $k\gt0$ we need one of the floor expressions to evaluate to $0$ and the other evaluate to $1$ in order for this to be true. This occurs when $$2^r\le k\le2^{r+1}-2$$ So a valid solution is any values of $n,m$ such that $$G\le n+m\le2g$$ If you fix one of the variables, for example $n=0$ then we have a range of solutions $$G\le m\le2g$$

  • $\begingroup$ thank you so much, now I know I did some error before this conclusion, because it is not fitting to my case, I think I will make another thread completely describing my case, but anyways, thank you man $\endgroup$ – Patrik Bašo Mar 31 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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