back to list

I need your help folks

🔗rick <rick_ballan@...>

7/15/2010 10:08:48 AM

Hi everyone,

I've managed to boil loads of work down to one simple problem. But my brain's gone offline. For any coprime or irrational interval a/b, and with j = 0,1,2,3,..., there is an integer k that always gives the *smallest* value of |k(a - b) - j(a + b)|. Now I 'know' that this integer is k = Round[j(a + b)/(a - b)]. But I'm at a loss to prove it.

Eg, 81/64 = a/b, j = 1 gives k = 9. j = 2 gives k = 17 etc...

The wave convergents are then easily obtained as p/q = (k + j)/(k - j).

(9 + 1)/(9 - 1) = 5/4, (17 + 2)/(17 - 2) = 19/15 etc...

Is this type of math using the round function familiar to anyone? It's the last remaining step before I can write a proper paper.

Thanks

-Rick

🔗Graham Breed <gbreed@...>

7/15/2010 10:38:34 AM

On 15 July 2010 18:08, rick <rick_ballan@...> wrote:
> Hi everyone,
>
> I've managed to boil loads of work down to one simple problem. But my brain's gone offline. For any coprime or irrational interval a/b, and with j = 0,1,2,3,..., there is an integer k that always gives the *smallest* value of |k(a - b) - j(a + b)|. Now I 'know' that this integer is k = Round[j(a + b)/(a - b)]. But I'm at a loss to prove it.

For real numbers, the smallest value of |x| is also the smallest value
of x^2 (x squared). So minimize

[k(a - b) - j(a + b)]^2

= k^2 (a-b)^2 + j^2(a+b)^2 - 2kj(a-b)(a+b)

To find the minimum point of this, differentiate and set to zero.

2k (a-b)^2 - 2j (a-b)(a+b) = 0

Assuming a and be are not equal,

k (a-b) - j (a+b) = 0

k = j (a + b) / (a - b)

You're then taking the nearest integer to this, which is a pretty good bet.

> Is this type of math using the round function familiar to anyone? It's the last remaining step before I can write a proper paper.

I feel safer with floor and ceil, but round is correct here. As it's
a quadratic function, the slope will be the same either side of the
minimum, and the nearest integer to that minimum will be the best one.

Graham

🔗rick <rick_ballan@...>

7/15/2010 9:02:15 PM

Oh of course. That's fantastic Graham, thanks very much. Now I can move on.

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> On 15 July 2010 18:08, rick <rick_ballan@...> wrote:
> > Hi everyone,
> >
> > I've managed to boil loads of work down to one simple problem. But my brain's gone offline. For any coprime or irrational interval a/b, and with j = 0,1,2,3,..., there is an integer k that always gives the *smallest* value of |k(a - b) - j(a + b)|. Now I 'know' that this integer is k = Round[j(a + b)/(a - b)]. But I'm at a loss to prove it.
>
> For real numbers, the smallest value of |x| is also the smallest value
> of x^2 (x squared). So minimize
>
> [k(a - b) - j(a + b)]^2
>
> = k^2 (a-b)^2 + j^2(a+b)^2 - 2kj(a-b)(a+b)
>
> To find the minimum point of this, differentiate and set to zero.
>
> 2k (a-b)^2 - 2j (a-b)(a+b) = 0
>
> Assuming a and be are not equal,
>
> k (a-b) - j (a+b) = 0
>
> k = j (a + b) / (a - b)
>
> You're then taking the nearest integer to this, which is a pretty good bet.
>
> > Is this type of math using the round function familiar to anyone? It's the last remaining step before I can write a proper paper.
>
> I feel safer with floor and ceil, but round is correct here. As it's
> a quadratic function, the slope will be the same either side of the
> minimum, and the nearest integer to that minimum will be the best one.
>
>
> Graham
>