Large system of inequalities

• Sep 1st 2011, 05:06 AM
procyon
Large system of inequalities
Hi,

I have this system of equations

$\displaystyle x^2>x^2-4xy+2xz+2y^2-z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$

$\displaystyle x^2-4xy+2xz+2y^2-z^2>x^2-8xy+4xz+4y^2-2z^2\ \ \ \ \ \ \ \ \ (2)$

$\displaystyle x^2-8xy+4xz+4y^2-2z^2>x^2+2xy-2xz-y^2+z^2\ \ \ \ \ \ \ \ \ \ \ (3)$

$\displaystyle x^2+2xy-2xz-y^2+z^2>x^2-2xy+y^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (4)$

$\displaystyle x^2-2xy+y^2>x^2-6xy+2xz+3y^2-z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (5)$

$\displaystyle x^2-6xy+2xz+3y^2-z^2>x^2+4xy-4xz-2y^2+2z^2\ \ \ \ \ \ \ \ \ \ \ (6)$

$\displaystyle x^2+4xy-4xz-2y^2+2z^2>x^2-2xz+z^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (7)$

$\displaystyle x^2-2xz+z^2>x^2-4xy+2y^2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (8)$

$\displaystyle x^2-4xy+2y^2>0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (9)$

From here on I'm only working with +ve x, y and z integers where $\displaystyle \ \ \ \ \ \ \ x\ge4>z>y>0$

For any given x i've found the maximum value of y is

$\displaystyle x\left(1-\dfrac{1}{\sqrt{2}}\right)$

and that for y from 1 to this limit, z has a lower range and higher range of limits

$\displaystyle \dfrac{3x+3-\sqrt{3(3x^2-10xy+5y^2}}{3}\ \ \ \le\ z\ \le\ \ \ x-\sqrt{x^2-4xy+2y^2}$

and

$\displaystyle x+1+\sqrt{x^2-4xy+2y^2}\ \ \ \le\ z\ \le\ \ \ \dfrac{3x+\sqrt{3(3x^2-10xy+5y^2}}{3}$

but when x gets to 31622777 and y = 1 there are no valid values of Z that satisfy the equations.

There are valid values for z when x = 31622777 and y = 2

So somewhere in these equations I should be able to find this lower y limit

My problem? I can't :(

Any help would be greatly appreciated :D

Pro
• Sep 1st 2011, 07:59 PM
Wilmer
Re: Not for the faint-hearted
• Sep 1st 2011, 08:34 PM
CaptainBlack
Re: Not for the faint-hearted
Quote:

Originally Posted by procyon
Hi,

I have this system of equations
:
:

:
Any help would be greatly appreciated :D

Pro

It might be helpful if you told us how this set of inequalities has arisen.

It would also be helpful if you simplified the inequalities.

CB
• Sep 1st 2011, 08:40 PM
TheChaz
Re: Not for the faint-hearted
Quote:

Originally Posted by CaptainBlack
It might be helpful if you told us how this set of inequalities has arisen.

It would also be helpful if you simplified the inequalities.

CB

Indeed. Aren't (7) and (8) equivalent?
And can't you cancel x^2 from almost all the equations??
• Sep 2nd 2011, 02:08 AM
procyon
Re: Large system of inequalities
Hi,

First my apologies for not using a relevant title.

Yes, all of the equations can have $\displaystyle x^2$ factored out and yes, some of them are equivalent. I presented them in their entirety so I could be sure I hadn't misfactored somewhere along the way.

Anyway, I have a feeling that the result I got could simply be a computer rounding error, so I'm off to find a pencil and piece of paper.

Thanks (Wink)
• Sep 2nd 2011, 03:20 AM
procyon
[solved] Re: Large system of inequalities
Yes,

Sorry folks, it was a rounding error (Headbang)

Excel reports

31622777^2=1000000025191730 not the correct 1000000025191729

Moral of the story; Don't trust Micro$oft with anything you care about (Rofl) Sigh, back to the grindstone Pro • Sep 2nd 2011, 07:19 AM CaptainBlack Re: [solved] Re: Large system of inequalities Quote: Originally Posted by procyon Yes, Sorry folks, it was a rounding error (Headbang) Excel reports 31622777^2=1000000025191730 not the correct 1000000025191729 Moral of the story; Don't trust Micro$oft with anything you care about (Rofl)

Sigh, back to the grindstone

Pro

I was about to say that this is a limitation of double precision floating point, since 16 decimal digits in the mantissa is close to the limit of double precision floating point, but checking 31622777^2 is just inside the limits for exact integer arithmetic in DP floating point, indeed Gnumeric gets this right.

(to some extent I am incredulous that MS can get this wrong since they are supposed to be implementing the IEEE floating point specification, and it is not a fault with the MS C/C++ compiler since I have a couple of applications built with that which get 31622777^2 right)

CB
• Sep 2nd 2011, 09:37 AM
procyon
Re: [solved] Re: Large system of inequalities
The laughable thing is that the bog-standard calculator that comes with Vista can even get it right :D
• Sep 2nd 2011, 06:48 PM
Wilmer
Re: Large system of inequalities
Quote:

Originally Posted by procyon

$\displaystyle x^2-4xy+2y^2>0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (9)$

From here on I'm only working with +ve x, y and z integers where $\displaystyle \ \ \ \ \ \ \ x\ge4>z>y>0$

For any given x i've found the maximum value of y is

$\displaystyle x\left(1-\dfrac{1}{\sqrt{2}}\right)$

Well, if your equation (9) is set to zero, and solved for y:
2y^2 - 4xy + x^2 = 0

y = x[2 - SQRT(2)] / 2

which is same as your y = x[1 - 1/SQRT(2)]

So there really was nothing to be "found"; all that's needed is set (9) to
zero and solve for y, as I'm showing; ...am I missing something?

I'm still perplexed by those first 8 equations of yours; there's really only 2:
10xy - 6xz - 5y^2 + 3z^2 < 0
-4xy + 2xz + 2y^2 - 1z^2 < 0

And I see nothing wrong with adding 'em up to get:
6xy - 4xz - 3y^2 + 2z^2 < 0
• Sep 3rd 2011, 03:15 AM
procyon
Re: Large system of inequalities
Quote:

Originally Posted by Wilmer
Well, if your equation (9) is set to zero, and solved for y:
2y^2 - 4xy + x^2 = 0

y = x[2 - SQRT(2)] / 2

which is same as your y = x[1 - 1/SQRT(2)]

So there really was nothing to be "found"; all that's needed is set (9) to
zero and solve for y, as I'm showing;

Exactly

Quote:

...am I missing something?
Not at all, that's exactly where I 'found' it :D

Quote:

I'm still perplexed by those first 8 equations of yours; there's really only 2:
10xy - 6xz - 5y^2 + 3z^2 < 0
-4xy + 2xz + 2y^2 - 1z^2 < 0
As I replied to TheChaz, I only included them all for completeness sake, in case I had overlooked something. It appears I hadn't (Wink)

Quote:

And I see nothing wrong with adding 'em up to get:
6xy - 4xz - 3y^2 + 2z^2 < 0
Again, you are quite right, nothing at all wrong with that :D

My problem was with the result I was getting at x=31622777, but as I updated, it turns out that Excel can't count and I can't read. I had the equations set up in Excel so it would indicate for a given x, y and z if they were all true. In this particular instance I took it on blind faith that it was correctly reporting one or more of them was false so looked to the equations for a reason. If I'd had the sense to look at Excel's output for the individual equations, I would have noticed that (31622777)² couldn't end with a zero (Doh)

Thanks,

Pro
• Sep 3rd 2011, 07:01 AM
CaptainBlack
Re: Large system of inequalities
Quote:

Originally Posted by procyon
Exactly

Not at all, that's exactly where I 'found' it :D

As I replied to TheChaz, I only included them all for completeness sake, in case I had overlooked something. It appears I hadn't (Wink)

Again, you are quite right, nothing at all wrong with that :D

My problem was with the result I was getting at x=31622777, but as I updated, it turns out that Excel can't count and I can't read. I had the equations set up in Excel so it would indicate for a given x, y and z if they were all true. In this particular instance I took it on blind faith that it was correctly reporting one or more of them was false so looked to the equations for a reason. If I'd had the sense to look at Excel's output for the individual equations, I would have noticed that (31622777)² couldn't end with a zero (Doh)

Thanks,

Pro

You might want to try Gnumeric, it strives for correct numerical algorithms, still has some rough edges but seems more reliable numerically than Excel (and its free)

CB
• Sep 3rd 2011, 07:30 AM
procyon
Re: Large system of inequalities
OK,

I must take a look at it.

Thanks for that Captain
• Sep 4th 2011, 06:18 AM
awkward
Re: [solved] Re: Large system of inequalities
Quote:

Originally Posted by procyon
The laughable thing is that the bog-standard calculator that comes with Vista can even get it right :D

The little Windows calculator is actually more sophisticated than it looks. It is good to 32 significant digits, well in excess of the 15 significant digits you get in Excel or double-precision floating point.
• Sep 4th 2011, 07:11 AM
Wilmer
Re: [solved] Re: Large system of inequalities