1

With the equation defined as: $$\left\lfloor \frac {(x-1)(a_n-a_1)}{n-1}\right\rceil+\left\lfloor \frac {(y-1)(a_n-a_1)}{n-1}\right\rceil=N$$ How many integer values can $x$ and $y$ take as a $f(a_n,a_1,n,N)$ if $1\le x,y \le n$?

I have tried putting the equation into graphing software, but the graph was rather unaccurate (I hand checked an answer and it did not appear on the graph). The graph does look like a staircase with the length of the steps regular, maybe I was thinking that the $f(a_n,a_1,n,N)$ could have something to do with the number of steps within the square of boundary $1$ and $n$?

I have little to no knowledge of Diophantine equations, much less with the rounding function involved. I am not looking for a method of solving the equation, just a function that counts the number of solutions. Any help would be appreciated.


EDIT My previous question was answered very satisfactorily, but I was wondering if the same method provided by Arthur could still be used if the equation in turn was: $$\left\lfloor x(\ln(x\ln x))\right\rceil+\left\lfloor y(\ln(y\ln y))\right\rceil=N$$ Furthermore, as a greater challenge, is the method still valid for a more general equation: $$\sum _{i=1}^m \lfloor f(x_i) \rceil =N$$

GuPe
  • 7,318
  • Guacho Perez - "How many integer values can $x$ and $y$ take". Individually or in combination? –  Oct 23 '15 at 18:26
  • Guacho Perez - Does $\lfloor x \rceil$ indicate round $x$ away from $0$? i.e. $\frac{1}{2}$ to $1$ and $-\frac{1}{2}$ to $-1$? Can we assume $a_n - a_1 \gt 0$? –  Oct 24 '15 at 00:12
  • @arthur yes, rounding away from zero and you can assume $a_n-a_1 > 0$ as well as $n>1$. The values of $x$ and $y$ must be in combinations, i.e. plugging them in together should solve the equation – GuPe Oct 24 '15 at 01:02

1 Answers1

1

Let $L = \lfloor \frac{(x-1)(a_n-a_1)}{n-1} \rceil$ and $R = \lfloor \frac{(y-1)(a_n-a_1)}{n-1} \rceil$ so that $L+R = N$

For $L = \lfloor z \rceil$ , $L-\frac{1}{2} \le z \lt L+\frac{1}{2}$ where $L \ge 0$. Rounding toward the nearest integer and $\frac{1}{2} \rightarrow 1$.

$$L-\frac{1}{2} \le \frac{(x-1)(a_n-a_1)}{n-1} \lt L+\frac{1}{2} $$

$$\frac{(L-\frac{1}{2})(n-1)}{a_n-a_1} +1 \le x \lt \frac{(L+\frac{1}{2})(n-1)}{a_n-a_1} + 1$$

$$\left\lceil\frac{(L-\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil \le x \lt \left\lceil\frac{(L+\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil$$ The lhs could be a negative fraction so include the $1$ in the floor.

Must limit $x$ s.t. $1 \le x \lt n+1$. The rhs could exceed the maximum, $n+1$. The lhs could exceed the maximum and the minimum $1$.

$$min\left(max\left(\left\lceil\frac{(L-\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil ,1\right),n\right) \le x \lt min\left(\left\lceil\frac{(L+\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil,n+1\right)\ \ \ (1)$$

Let $f_x(a_n,a_1,n,L)$ be the number of $x$ integers that satisfy equation ($1$).

$$f_x(a_n,a_1,n,L) = min\left(\left\lceil\frac{(L+\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil ,n+1\right) - min\left(max\left(\left\lceil\frac{(L-\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil,1\right),n\right)$$

Similarly let $f_y(a_n,a_1,n,R)$ be the number of $y$ integers

$$f_y(a_n,a_1,n,R) = min\left(\left\lceil\frac{(R+\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil,n+1\right) - min\left(max\left(\left\lceil\frac{(R-\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil,1\right),n\right)$$

$f_x(a_n,a_1,n,L)$ and $f_y(a_n,a_1,n,R)$ are identical.

Let $f(a_n,a_1,n,N)$ be the number of points $(x,y)$ such that the objective equation is satisfied.

$f(a_n,a_1,n,N) = \displaystyle \sum_{k=0}^{N}f_x(a_n,a_1,n,k)f_y(a_n,a_1,n,N-k)$

  • Nice! Good stuff, it took me a while to understand it, however, I have tried it on the Desmos Graphing tool with values $a_n=8$, $a_1=1$ and $n=5$ and $f(8,1,5,5)=0$ however, I was able to get a pair of solutions for the equation, mainly $(4,1)$ and $(1,4)$. I have found other examples of this, is there a miscalculation by part of Desmos or is there a mistake in the formula? If you'd like, I can share the link to the graphs. – GuPe Oct 27 '15 at 02:40
  • I tried some numbers to test it, I'll have a look at your example. –  Oct 27 '15 at 02:44
  • https://www.desmos.com/calculator/gq15famm9y here's the link, in case you want to check it, I made some abbreviations, maybe the error is in one of them. I am really hoping I made a mistake, your answer is really nice. – GuPe Oct 27 '15 at 02:46
  • I think its the interpretation of rounding.

    Looking at (4,1), $y = 1$ so $R = 0.$ $L = \left\lfloor \frac {(x-1)(a_n-a_1)}{n-1}\right\rceil = \left\lfloor \frac {(4-1)(8-1)}{5-1}\right\rceil = \left\lfloor \frac {21}{4}\right\rceil = \left\lfloor 5.25\right\rceil$

    Rounding toward zero gives $R = 5$. Rounding away from zero gives $R = 6$

    –  Oct 27 '15 at 02:54
  • Hmmm, okay okay, that had me confused for a while. Could this be generalized to instead of using the rounding function, using the nearest integer function? – GuPe Oct 27 '15 at 03:05
  • 1
    Rounding toward the nearest integer gives $L = \lfloor z \rceil$ means $L-\frac{1}{2} \le z \lt L + \frac{1}{2}$. I can change the answer easily enough if this is the intended meaning. –  Oct 27 '15 at 03:11
  • I hope it is not much to ask... if you don't want to I'd understand, I am still very glad for your help. – GuPe Oct 27 '15 at 03:16
  • It should be right now. Tell me if you find a problem. I don't like unfinished work. cheers. –  Oct 27 '15 at 03:28
  • Wait the right hand limit needs to be a ceiling. e.g. $< 2.5 \rightarrow < 3$ –  Oct 27 '15 at 03:39
  • And the left is now a ceiling as well. e.g. $2.5 \le z \rightarrow 3 \le z$ –  Oct 27 '15 at 03:44
  • (4,1) and (1,4) work. –  Oct 27 '15 at 04:25
  • Hmmm, yes, but now for $f(8,1,5,7)=2$ and we have four solutions $(5,1)$ and $(4,2)$ and $(1,5)$ and $(2,4)$ maybe I am mistaken again? It does work for the previous numbers, but it also fails for some of the numbers after that. – GuPe Oct 27 '15 at 04:33
  • I'll check it too. –  Oct 27 '15 at 04:37
  • The problem is in: $x \lt min\left(\left\lceil\frac{(L+\frac{1}{2})(n-1)}{a_n-a_1}+1\right\rceil,n\right)$ it needs to $min(..,n+1)$. the LHS $0$ may have to be $1$. I'll check it as well. –  Oct 27 '15 at 05:03
  • 1
    I coded it up and it seems to work for f(8,1,5,7) and f(8,1,5,5). This insures $x$ stays in legal limits and can have a full range $1 \le x \lt n+1$ –  Oct 27 '15 at 05:17
  • Yes, double checked it, the $n+1$ was the problem, it works perfectly now, thanks for all the time and effort :) – GuPe Oct 27 '15 at 06:55