🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #1236

Re: Discrete hyperbolic problem

#1236
From: Paul Nulsen
Date: Thu, 03 Jun 1999 00:00
32 lines
2671 bytes
Ricky Laksanadjaja <lricky@earthcorp.com> writes:
>Hi,
>Does anybody know if there is a fast algorithm to solve the following
>problem?
>Equation:  x^2 - y^2 = z  , where  x is a positive integer, y is a
>positive integer, and  x > y, and z is a large positive integer (>200
>digit number).  For a given Zt, can you find Xn, where Xn is the first
>integer which is greater or equal to SQRT(Zt), i.e. Xn >= SQRT(Zt),
>which gives an integer Ym, which will satisfy the above hyperbolic
>equation? I can do it by testing the equation with each integer x
>greater than sqrt(Zt), but it could take million years to find Xn, if Zt
>is a large integer number.  Does anyone have a better solution?

This does not solve your problem, but it might save some wasted time:

Since x^2 - y^2 = (x + y)(x - y), any solution gives a factorization of z.
So, if z = p q with p > q, then x = (p + q)/2 and y = (p - q)/2 give a
solution (not necessarily integral).

Now if z has only one factor of 2, ie z = 2 a, with a odd, then exactly one
of p and q is always even and the other one must be odd, which means that
both x and y given above have to be half integral.  In other words, there
can be no integral solutions for x and y in this case, so you can forget it.

There are always some solutions if z is odd [eg x = (z + 1)/2, y = (z - 1)/2]
or if z is a multiple of 4 [eg x = z/4 + 1, y = z/4 - 1].  Your problem
reduces to finding the factorization z = p q that minimises p - q.  If you
already have a complete factorization of z, this should be straightforward.
However, since factorization is notoriously difficult, I doubt that it will
help you much.

Paul Nulsen
Technical Details
Message-ID: <pejn.928370163@wumpus>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37558EA7.D17E1699@earthcorp.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d67e,ab68dac0560b9fa8
X-Google-Attributes: gid10d67e,public
X-Google-Thread: 10d29f,ab68dac0560b9fa8
X-Google-Attributes: gid10d29f,public
X-Google-Thread: 107079,ab68dac0560b9fa8
X-Google-Attributes: gid107079,public
X-Google-Thread: 109d8a,ab68dac0560b9fa8
X-Google-Attributes: gid109d8a,public
From: pejn@uow.edu.au (Paul Nulsen)
Subject: Re: Discrete hyperbolic problem
Date: 1999/06/03
Message-ID: <pejn.928370163@wumpus>
X-Deja-AN: 485122697
Approved: Daniel Grayson, dan@math.uiuc.edu, moderator for sci.math.research
References: <37558EA7.D17E1699@earthcorp.com>
X-Complaints-To: usenet@wyrm.its.uow.edu.au
X-Trace: wyrm.its.uow.edu.au 928371519 166 130.130.68.12 (3 Jun 1999 00:58:39 GMT)
Organization: University of Wollongong, Australia
NNTP-Posting-Date: 3 Jun 1999 00:58:39 GMT
Newsgroups: sci.math.num-analysis,sci.math.research,sci.math,aus.mathematics
Originator: dan@orion.math.uiuc.edu