Factoring bi-primes with Orion Dr. William Macready, Vice-President, Product Development July 14 2005.

Slides:



Advertisements
Similar presentations
Factoring Polynomials
Advertisements

Complex Roots of Polynomials
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
CRASH COURSE IN QUADRATICS In preparation for the Algebra CST -b + b 2 – 4ac 2ac √ (x+4)(x-3)=0 (x+1)(x+2) X 2 – 5x +4 F O I L Complete The Square.
Optimization in Engineering Design 1 Lagrange Multipliers.
Quantum Computation and Error Correction Ali Soleimani.
Constrained Optimization Rong Jin. Outline  Equality constraints  Inequality constraints  Linear Programming  Quadratic Programming.
Lecture 10: Support Vector Machines
6.5 & 6.6 Theorems About Roots and the Fundamental Theorem of Algebra
11 -1 Chapter 11 Randomized Algorithms Randomized algorithms In a randomized algorithm (probabilistic algorithm), we make some random choices.
Constrained Optimization Rong Jin. Outline  Equality constraints  Inequality constraints  Linear Programming  Quadratic Programming.
Warm Up #4 1. Evaluate –3x – 5y for x = –3 and y = 4. –11 ANSWER
Solving Systems Using Elimination Objective: To solve systems of equations algebraically.
3.5 Solving systems of equations in 3 variables
Factoring Polynomials
MATH!!! EXAM PREP!!!! ConoR RoweN. Addition Property (of Equality) Multiplication Property (of Equality). If the same number is added to both sides of.
Warm - up 6.2 Factor: 1. 4x 2 – 24x4x(x – 6) 2. 2x x – 21(2x – 3)(x + 7) 3. 4x 2 – 36x + 81 (2x – 9) 2 Solve: 4. x x + 25 = 0X = -5.
(c) MathScience Innovation Center 2007 Solving Linear Systems Trial and Error Substitution Linear Combinations (Algebra) Graphing.
Section 3.2 Beginning on page 104
Graphing Systems of Equations Graph of a System Intersecting lines- intersect at one point One solution Same Line- always are on top of each other,
Factoring Polynomials
What are quadratic equations, and how can we solve them? Do Now: (To turn in) What do you know about quadratic equations? Have you worked with them before?
Review Session #2. Outline Logarithms Solving Systems of Equations Factoring and Roots.
Role of Zero in Factoring
11 -1 Chapter 11 Randomized Algorithms Randomized Algorithms In a randomized algorithm (probabilistic algorithm), we make some random choices.
1.Combining Integers Blizzard Bonus 2 Chandler Crimmins 2.Absolute Values 3.Multiplying and Dividing Integers 4.Graphing Terms 5.Linear Equation 6.Prime.
A Quadratic Equation is an equation that can be written in the form Solving Quadratic Equations – Factoring Method Solving quadratic equations by the factoring.
RATIONAL EXPRESSIONS. Rational Expressions and Functions: Multiplying and Dividing Objectives –Simplifying Rational Expressions and Functions –Rational.
Lesson 3 Contents Example 1Radical Equation with a Variable Example 2Radical Equation with an Expression Example 3Variable on Each Side.
Copyright © Cengage Learning. All rights reserved. Polynomials 4.
Warm Up:  1) Name the three parent functions and graph them.  2) What is a system of equations? Give an example.  3) What is the solution to a system.
Linear Equation The equation Which express the real or complex quantity b in terms of the unknowns and the real or complex constants is called a linear.
Complete Solutions to Practice Test What are the solutions to the quadratic equation  A. 3, 6  B. 6, 6  C. 3, 12  D. 4, 9  E. -4, -9 Factor.
Please close your laptops and turn off and put away your cell phones, and get out your note-taking materials.
Pre-Algebra 2-3 Multiplying and Dividing Integers Today’s Learning Goal Assignment Learn to multiply and divide integers.
An equation in the form … … can be solved using two methods discussed previously. Solving Equations Containing Trinomials 1.Factoring Method 2.Graphing.
5-5 Solving Quadratic Equations Objectives:  Solve quadratic equations.
Slide Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A set of equations is called a system of equations. The solution.
Copyright 2013, 2009, 2005, 2002 Pearson, Education, Inc.
Entry task- Solve two different ways 4.8 Complex Numbers Target: I can identify and perform operations with complex numbers.
4-8 Complex Numbers Today’s Objective: I can compute with complex numbers.
10-1 An Introduction to Systems A _______ is a set of sentences joined by the word ____ or by a ________________. Together these sentences describe a ______.
The Hydrogen Atom The only atom that can be solved exactly.
1 Math Pacing Graphing Linear Equations. Equations as Relations A linear equation can be written in the standard form of a linear equation: Ax + By =
Quadratic Equations and Problem Solving. Martin-Gay, Developmental Mathematics 2 Strategy for Problem Solving General Strategy for Problem Solving 1)Understand.
Elimination Method - Systems. Elimination Method  With the elimination method, you create like terms that add to zero.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
Simultaneous Equations 1
Solving Quadratic Equations by Factoring
Polynomial Equations and Factoring
Copyright 2013, 2010, 2007, 2005, Pearson, Education, Inc.
Objective The student will be able to:
The Fundamental Theorem of Algebra and Complete Factorization
10.3 Quadratic Equations from their solutions
ME 521 Computer Aided Design 15-Optimization
Trigonometric Identities
Maths Unit 9 – Forming & Solving Equations
Solving Equations by Factoring and Problem Solving
SECTION 9-3 : SOLVING QUADRATIC EQUATIONS
6-3 Solving Systems Using Elimination
3.5 Solving systems of equations in 3 variables
Rational Expressions and Equations
Copyright © 2011 Pearson Education, Inc.
Discrete Least Squares Approximation
Today we will Finish chapter 5
LINEAR EQUATIONS.
Machine learning overview
Hard Problems Some problems are hard to solve.
LINEAR EQUATIONS.
Solving Equations Containing Trinomials
Presentation transcript:

Factoring bi-primes with Orion Dr. William Macready, Vice-President, Product Development July

confidential 2 Given an n T -bit integer T which is the product of an n p -bit prime p and an n q -bit prime q; find p or q Problem is useful for a number of reasons Potential cryptanalytic applications Source of difficult optimization problems (lots of local minima) where we know the answer Applications:\\factoring bi-primes

confidential 3 Multiplying out the factors long-hand gives a set of equality constraints that the bits of p and q must satisfy Objective function consists in adding the squared constraint violations Applications:\\factoring bi-primes

confidential 4 Number to be factored must be odd Both factors must be odd So we know the ones-place bits are 1 There are n T possible bit lengths {n p, n q } Most significant bit of each factor must be 1 Example:\\factoring 119

confidential 5 Step 1 - Multiplication n T = n 119 =7 possible factor bit lengths –In the worst case, all 7 possible combinations must be tried –in this example we try n p =5 and n q =3 Write factors using x i,y for unknown bits 1 x 3 x 2 x 1 1 & 1 y 1 Write out long multiplication for the factors

confidential 6 Factor 1:1x3x3 x2x2 x1x1 1 Factor 2:1y1 1x3x3 x2x2 x1x1 1 yx3yx3yx2yx2yx1yx1yy 1x3x3 x2x2 x1x Long Multiplication for 119

confidential 7 Step 2 – Derive Equations An equation to be satisfied can be derived from each column Need to introduce new binary variables, z i, for carries For 119, we get a system of 6 equations

confidential 8 Step 3 – Polynomial Time Simplification of Equations Using a polynomial (in n T ) time algorithm, simplify the equations as much as possible –eliminate variables which can easily be inferred to have a certain value –current method is O(n T 3 ), but could do better If goal is the factoring of n T =1,024-bit bi-primes then we need to do more/better polynomial preprocessing to reduce number of variables

confidential 9 System of Equations for 119 x 1 + y=1(1) x 2 + x 1 y + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1 + 2z 5 (5) 1 + z 5 =1(6)

confidential 10 System of Equations for 119 x 1 + y=1(1) x 2 + x 1 y + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1 + 2z 5 (5) 1 + z 5 =1(6)

confidential 11 System of Equations for 119 x 1 + y=1(1) x 2 + x 1 y + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 12 System of Equations for 119 x 1 + y=1 => x 1 y=0(1) x 2 + x 1 y + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 13 System of Equations for 119 x 1 + y=1(1) x 2 + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 14 System of Equations for 119 x 1 + y=1(1) x 2 + 1=1 + 2z 1 (2) x 3 + x 2 y + x 1 + z 1 =0 + 2z 2 + 4z 3 (3) 1 +x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 15 System of Equations for 119 x 1 + y=1(1) x 2 + 1=1(2) x 3 + x 2 y + x 1 =0 + 2z 2 + 4z 3 (3) 1 + x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 16 System of Equations for 119 x 1 + y=1(1) x 2 + 1=1(2) x 3 + x 2 y + x 1 =0 + 2z 2 + 4z 3 (3) 1 + x 3 y + x 2 + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 17 System of Equations for 119 x 1 + y=1(1) 1=1(2) x 3 + x 1 =0 + 2z 2 + 4z 3 (3) 1 + x 3 y + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 18 System of Equations for 119 x 1 + y=1(1) 1=1(2) x 3 + x 1 =0 + 2z 2 + 4z 3 (3) 1 + x 3 y + z 2 =1 + 2z 4 (4) y + x 3 + z 3 + z 4 =1(5) 1=1(6)

confidential 19 System of Equations for 119 x 1 + y=1(1) 1=1(2) x 3 + x 1 =0 + 2z 2 (3) 1 + x 3 y + z 2 =1 + 2z 4 (4) y + x 3 + z 4 =1(5) 1=1(6)

confidential 20 Step 4 – Convert to a Quadratic Optimization Objective After simplification algorithm complete, replace all bi-linear terms (e.g. x 3 y) with new binary variables (w), w is 1 if and only if x 3 and y are both 1. –actually this is done first since it might offer the potential for additional simplification Each new binary variable (w) introduces 3 new binary slack variables: (s 1, s 2, s 3 ) –can get by with only 1 slack variable Can now convert the equations into an energy function.

confidential 21 System of Equations for 119 x 1 + y=1(1) 1=1(2) x 3 + x 1 =0 + 2z 2 (3) 1 + w + z 2 =1 + 2z 4 (4) y + x 3 + z 4 =1(5) 1=1(6)

confidential 22 Energy terms for 119 x 1 + y - 1=0(1) 1 - 1=0(2) x 3 + x 1 -2z 2 =0(3) w + z 2 -2z 4 =0(4) y + x 3 + z 4 - 1=0(5) 1 - 1=0(6)

confidential 23 Quadratic terms for 119 (x 1 + y – 1) 2 =0(1) 0=0(2) (x 3 + x 1 -2z 2 ) 2 =0(3) (w + z 2 -2z 4 ) 2 =0(4) (y + x 3 + z 4 - 1) 2 =0(5) 0=0(6)

confidential 24 Step 5 – Orion To find the factors, all terms must be zero Sum all the terms together in one energy function –Can weight each term differently –This freedom used to tune the quantum mechanical annealing schedule

confidential 25 Energy Function E = μ 1 (x 1 +y–1) 2 + μ 2 (x 3 +x 1 -2z 2 ) 2 + μ 3 (w+z 2 -2z 4 ) 2 + μ 4 (y+x 3 +z 4 -1) 2 + λ 1 (w- x 3 +s 1 ) 2 + λ 2 (w-y+s 2 ) 2 + λ 3 (x 3 +y-w+s 3 -1) 2 We know that ground state has E min = 0 We can be smart in how the Lagrange multipliers are chosen to minimize the number of local minima

confidential 26 Factor Graph for factoring 119

confidential 27 Factoring Algorithm Given: an integer T of n T bits to be factored Determine possible bit sizes of factors For each bit size pair {n p, n q } –Derive factoring equations Number of variables = bit positions of each factor + carry variables –Simplify factoring equations (scaling behaviour) –Result is a set of multi-linear equations to be solved over the Booleans –Map equations to an energy function solved by the hardware map quartic interaction to quadratic –Introduces slack variables (scaling of number of variables) –Minimize energy function (scaling ?) –Read result –Solution factors T? Yes -> done No -> rerun (perhaps modify energy function, e.g. adjust multipliers)

confidential 28 Scaling behaviour

confidential 29 Scaling behaviour – space complexity Space complexity –With limited sophistication in simplifying the factoring equations Number of variables required to factor an n T bit integer is O(n T ) Number of variables required after removal of quartic interactions is O(n T 2 ) –Arises from the pair-wise products –With more intelligence in simplifying the equations can probably do much better Currently do not include the fact that factors are prime in simplification

confidential 30 Scaling behaviour – time complexity Time complexity governed by three separate tasks –Derivation and simplification of multi-linear equations –Orion run time Classical preprocessing is tractable by construction Orion run-time performance unknown

confidential 31 Integer factoring can be addressed as discrete optimization in O(n T 2 ) variables Optimization used to find integer solutions to a multi-linear set of equations –Equations to be solved can probably be simplified without too much effort Method is parallelizable as different bit length of factors can all be tested in parallel Factoring bi-primes:\\conclusions