Integer Factorization Algorithm

In summary, the conversation is about an integer factorization algorithm that the person has developed and is seeking feedback on potential flaws. They mention a quadratic equation and explain that it is an extension of Fermat's factoring method. There is a discussion about using a "generic two integer variable equation solver" and the use of the quadratic formula. The conversation ends with a discussion about finding an analytical square in R[x, y].
  • #1
visu
4
0
I am posting an integer factorization algorithm that I have developed. I am hoping for feedback on any obvious flaws that I might have missed before writing a computer programme to test it out.

Thanks in advance

Visu
 

Attachments

  • Prime_Factoring_Algorithm_Updated_Ver1_1_2.pdf
    80.8 KB · Views: 297
Physics news on Phys.org
  • #3
On the bottom of the first page, you write:

1/2(d6)x2 + (d4-(1/2d6))x + d1 = y2

Is this
[tex]\frac12d_6x^2+(d_4-\frac12d_6)x+d_1=y^2[/tex]
or
[tex]\frac{1}{2d_6}x^2+\left(d_4-\frac{1}{2d_6}\right)x+d_1=y^2[/tex]
or something else?

Also, where does this quadratic come from? Does x have some value (it isn't used before the equation) or is this simply a member of R[x]? *Why* do we want the left to be a square?
 
  • #4
CRGreathouse said:
On the bottom of the first page, you write:

1/2(d6)x2 + (d4-(1/2d6))x + d1 = y2

Is this
[tex]\frac12d_6x^2+(d_4-\frac12d_6)x+d_1=y^2[/tex]
or
[tex]\frac{1}{2d_6}x^2+\left(d_4-\frac{1}{2d_6}\right)x+d_1=y^2[/tex]
or something else?

Also, where does this quadratic come from? Does x have some value (it isn't used before the equation) or is this simply a member of R[x]? *Why* do we want the left to be a square?


The first of the two equations you wrote.Apologies for not being clear.

x is an unknown and so is y.What I am doing is an extension of Fermat's factoring method.In Fermat's method, we express the number to be factorised as the difference of 2 squares.Let's say the number we want to factorise is N. So we want to find a^2 - N = b^2.
If "a" doesn't work we try a+1, a+2 and so on until we find (a+n)^2 - N = b^2,so we can factorise N by the difference of squares.

Now the LHS of the equation is already a quadratic equation, so in the next step, I am applying the calculus of finite difference http://mathworld.wolfram.com/FiniteDifference.html to obtain the another quadratic equation which is the one that you mention.
Actually this is the same as expanding out (a+n)^2-N=b^2 with n and b as the unknowns and replacing a and N with their known values.

Hopefully this should also explain you other question of why we want the LHS to be square.
 
Last edited:
  • #5
Your "integer factorization algorithm" depends on the "generic two integer variable equation solver", which depends on prime factoring of integers,etc...:yuck:

Six of one, half-dozen of the other...
 
  • #6
Kittel Knight said:
Your "integer factorization algorithm" depends on the "generic two integer variable equation solver", which depends on prime factoring of integers,etc...:yuck:

Six of one, half-dozen of the other...

Actually it doesn't depend on the "generic two integer variable equation solver".I am actually aware that this is not very clear and am working on an improved draft.

I was just using the "generic two integer variable equation solver" to illustrate the point that any semiprime has only 2 sets of solutuons for the given quadratic equation.
 
  • #7
visu said:
The first of the two equations you wrote.Apologies for not being clear.

Not a problem. I'll note that [itex]1/2\cdot d_6=1[/itex] since d6 is always 2, so the equation
[tex]\frac12d_6x^2+\left(d_4-\frac12d_6\right)x+d_1=y^2[/tex]
simplifies to
[tex]x^2+(d_4-1)x+d_1=y^2[/tex]
which has roots
[tex]2y=1-d_4\pm\sqrt{d_4^2-2d_4+1-4d_1}[/tex]
 
Last edited:
  • #8
CRGreathouse said:
Not a problem. I'll note that [itex]1/2\cdot d_6=1[/itex] since d6 is always 2, so the equation
[tex]\frac12d_6x^2+\left(d_4-\frac12d_6\right)x+d_1=y^2[/tex]
simplifies to
[tex]x^2+(d_4-1)x+d_1=y^2[/tex]
which has roots
[tex]2y=1-d_4\pm\sqrt{d_4^2-2d_4+1-4d_1}[/tex]

[tex]2y=1-d_4\pm\sqrt{d_4^2-2d_4+1-4d_1}[/tex]

Referring to this equation I think you mean 2x on the LHS which is the quadratic formula. You can't use the quadratic formula in this case because both x and y are unknown whereas in the case where you can use the quadratic formula only x is unknown. The equation I have given is a 2nd order Diophantine equation.In other words what you are doing is correct only if
[tex]x^2+(d_4-1)x+d_1=0[/tex].
 
  • #9
Must have been confusing it with one of the other problems on the boards, sorry.

I found it useful when looking over this problem to define [itex]\epsilon=\sqrt n-\lceil\sqrt n\rceil+1\in(0,1].[/itex] Then many of the terms can drop out of the equations, and the magnitude of each term is more clear.

So
[tex]a_1=\sqrt n+\epsilon[/tex]
[tex]k_1=2\epsilon\sqrt n+\epsilon^2[/tex]
[tex]d_1=2(\epsilon+1)\sqrt n+(\epsilon+1)^2[/tex]
[tex]d_2=2(\epsilon+2)\sqrt n+(\epsilon+2)^2[/tex]
[tex]d_3=2(\epsilon+3)\sqrt n+(\epsilon+3)^2[/tex]
[tex]d_4=\sqrt n+2\epsilon+3[/tex]
[tex]d_5=\sqrt n+2\epsilon+5[/tex]
[tex]d_6=2[/tex]
[tex]y^2=x^2+(d_4-1)x+d_1=x^2+(\sqrt n+2\epsilon+2)x+d_1=x^2+(\sqrt n+2\epsilon+2)x+2(\epsilon+1)\sqrt n+(\epsilon+1)^2[/tex]
 
Last edited:
  • #10
You won't be able to find an analytical square in R[x, y], since if you could it would be of the form [tex]x^2+2\alpha x+\alpha^2[/tex] and you could equate coefficients:
[tex]\sqrt n+2\epsilon+2=2\alpha[/tex]
[tex]2(\epsilon+1)\sqrt n+(\epsilon+1)^2=\alpha^2[/tex]

[tex]4\alpha^2=8(\epsilon+1)\sqrt n+4(\epsilon+1)^2=n+(4\epsilon+4)\sqrt n+(2\epsilon+2)^2[/tex]
[tex]8(\epsilon+1)\sqrt n=n+(4\epsilon+4)\sqrt n[/tex]
[tex](4\epsilon+4)\sqrt n=n[/tex]
[tex]n=(4\epsilon+4)^2[/tex]

Not that this really tells you anything.
 

What is an Integer Factorization Algorithm?

An Integer Factorization Algorithm is a mathematical method used to find the prime factors of a given integer. It is also known as integer decomposition or prime factorization.

Why is Integer Factorization important?

Integer factorization is important in cryptography and security as it is used to break down large numbers into their prime factors, which is crucial for certain encryption methods. It is also useful in solving mathematical problems involving integers.

What are the different types of Integer Factorization Algorithms?

There are several types of Integer Factorization Algorithms, including trial division, Pollard's rho algorithm, quadratic sieve, and the general number field sieve. Each algorithm has its own strengths and weaknesses, and the choice of which one to use depends on the size and complexity of the number to be factored.

How does the General Number Field Sieve work?

The General Number Field Sieve is the most efficient algorithm for factoring large integers. It involves finding a polynomial with integer coefficients that has a certain number as a root, and then using complex mathematical techniques to reduce the problem to solving a system of linear equations. This algorithm is very complex and requires a lot of computational power.

What are the applications of Integer Factorization Algorithms?

Integer factorization algorithms have various applications, including in cryptography, number theory, and computer science. They are used in encryption methods such as RSA and Diffie-Hellman, and also in solving mathematical problems involving integers, such as finding the greatest common divisor or solving diophantine equations.

Similar threads

Replies
23
Views
1K
  • Quantum Physics
Replies
13
Views
879
  • Linear and Abstract Algebra
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
13
Views
707
Replies
9
Views
1K
  • Programming and Computer Science
Replies
6
Views
970
  • Programming and Computer Science
Replies
8
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
1K
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Back
Top