- #1
Rafajafar
- 4
- 0
Hello,
I'm trying to create my own version of the Sieve of Atkin for my Algorithm class final project, but ran into a wall. I want to be able to create a method of algorithmically finding the number of integer coordinate pair solutions such that x > 0 and y > 0 for the following equations:
4x^2 + y^2 = n.
3x^2 + y^2 = n.
3x^2 - y^2 = n.
For a set of particular n determined earlier in the program. This is NOT a set of related equations. Each equation is separate from each other as different cases.
Now, I know how to do this analytically, but telling a computer to do this without using the brute force method of checking each and every number combination (which slows down the program by the order of N^2) is posing a problem.
I was wondering if perhaps anyone here knows of a technique in linear algebra that could speed this process up? Perhaps some matrix algebra manipulation I could apply to each equation to find the number of coordinate pair solutions faster?
Please, any help would be much appreciated.
I'm trying to create my own version of the Sieve of Atkin for my Algorithm class final project, but ran into a wall. I want to be able to create a method of algorithmically finding the number of integer coordinate pair solutions such that x > 0 and y > 0 for the following equations:
4x^2 + y^2 = n.
3x^2 + y^2 = n.
3x^2 - y^2 = n.
For a set of particular n determined earlier in the program. This is NOT a set of related equations. Each equation is separate from each other as different cases.
Now, I know how to do this analytically, but telling a computer to do this without using the brute force method of checking each and every number combination (which slows down the program by the order of N^2) is posing a problem.
I was wondering if perhaps anyone here knows of a technique in linear algebra that could speed this process up? Perhaps some matrix algebra manipulation I could apply to each equation to find the number of coordinate pair solutions faster?
Please, any help would be much appreciated.