The Extended Euclidean Algorithm (2/10)

Slides:



Advertisements
Similar presentations
Ordered pairs ( x , y ) as solutions to Linear Equations
Advertisements

Richard Fateman CS 282 Lecture eea1 Extended Euclidean Algorithm Lecture eea.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
Quotient-Remainder Theory, Div and Mod
NUMBER THEORY Chapter 1: The Integers. The Well-Ordering Property.
Greatest Common Divisor. Definitions Let a and b be two non-zero integers. The greatest common divisor of a and b, denoted gcd(a,b) is the largest of.
Chapter 2 Section 2 Solving a System of Linear Equations II.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Systems of Linear Equations Vocabulary. This is a System of Linear Equations.
Chapter 5 Objectives 1. Find ordered pairs associated with two equations 2. Solve a system by graphing 3. Solve a system by the addition method 4. Solve.
Solving System of Equations Using Graphing
7 = 7 SOLUTION EXAMPLE 1 Check the intersection point Use the graph to solve the system. Then check your solution algebraically. x + 2y = 7 Equation 1.
Thinking Mathematically Algebra: Graphs, Functions and Linear Systems 7.3 Systems of Linear Equations In Two Variables.
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Topics: Topic 1: Solving Linear Equations Topic 2: Solving Quadratic Equations Topic 3: Solving Proportions involving linear and quadratic functions. Topic.
3.1: Solving Linear Systems by Graphing Group 4.  Get two variables, (x,y), to correctly come out of two equations  ax+by=c  dx+ey=f  Check whether.
System of Linear Equations with One Solution Solve the given system of linear equations by graphing both equations on the same integer screen. 1. The point.
GRAPH LINEAR INEQUALITIES IN TWO VARIABLES January 22, 2014 Pages
Chapter 8 Systems of Linear Equations in Two Variables Section 8.2.
3.1 Solving equations by Graphing System of equations Consistent vs. Inconsistent Independent vs. Dependent.
Chapter 21 Exact Differential Equation Chapter 2 Exact Differential Equation.
Multiplication Facts X 3 = 2. 8 x 4 = 3. 7 x 2 =
Computing k th Roots Quickly (4/4) Via the Fast Exp algorithm, we know we can quickly compute large powers of large numbers modulo large numbers. What.
Solving Linear Equations Substitution. Find the common solution for the system y = 3x + 1 y = x + 5 There are 4 steps to this process Step 1:Substitute.
Lesson 7.4A Solving Linear Systems Using Elimination.
Systems of Linear Equations in Two Variables. 1. Determine whether the given ordered pair is a solution of the system.
Topics: Topic 1: Solving Linear Equations Topic 2: Solving Quadratic Equations Topic 3: Solving Proportions involving linear and quadratic functions. Topic.
Solve Linear Systems Algebraically Part I Chapter 3.2.
Chapter 4: Systems of Equations and Inequalities Section 4.3: Solving Linear Systems Using Graphs.
Chapter 8 Systems of Linear Equations in Two Variables Section 8.3.
CS480 Cryptography and Information Security
Order of Operations Oral examples x 5 x x 5 ÷ ÷ 5 x ÷ 5 ÷ 2 9.
Chapter 7 Systems of Linear Equations and Inequalities 7.1 Thursday 12/6 7.2 Friday12/7-Monday12/ Tuesday12/11-Wed12/ Thursday12/13-Friday12/14.
Chapter 5 Solving Systems of Linear Equations. Determine Whether a Given Ordered Pair is a Solution of a System Ex. 1.
Lesson 4-1 Solving linear system of equations by graphing
Checking Possible Solutions
6-1 Linear Systems Goal: Solve a system of linear equations by graphing Eligible Content: A / A
Entry Task Solve the System x + 7 = y -4x + 2 = y.
Chapter 7 – Systems of Linear Equations and Inequalities
GCD and Optimization Problem
Solve a system of linear equation in two variables
7.1 System of Equations Solve by graphing.
Solutions to Systems of Equations
5.1 Solve Systems of Equations by Graphing
Systems of Linear Equations in Two Variables
Solving Linear Equations Unit Test Review Game
Solving Equations with Variables on Both Sides
6-1 Linear Systems Goal: Solve a system of linear equations by graphing Eligible Content: A / A
MATH 1310 Session 2.
Point-Slope Form and Writing Linear Equations
Solving Equations involving Decimal Coefficients
Linear simultaneous equations: Correct solution? (step 7)
Chapter 4 – Linear Systems
Objectives Identify solutions of linear equations in two variables.
that ordered pair is the one solution.
Modular Inverses Recall the simple encryption function
Chapter 6 Vocabulary (6-1)
Chapter 8 Systems of Equations
Objective: Students will solve systems by graphing
Chapter 9 Lesson 3 Pg. 699 Solving Systems of Equations by Graphing
Warmup Chapter P Review
Miniconference on the Mathematics of Computation
Radicals and Inequalities
Chapter 9 Lesson 3 Pg. 699 Solving Systems of Equations by Graphing
Solving a System of Linear Equations
Tell whether the ordered pair is a solution of the equation.
Chapter 2 Section 7 Two-Variable Inequalities
WARM UP 3 WRITING EQUATIONS Write in slope-intercept form the equation of the line that passes through the given point and has the given slope. (Lesson.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

The Extended Euclidean Algorithm (2/10) Question: Can we write the GCD of two numbers a and b as a linear combination of a and b, i.e., can we find integers x and y such that a x + b y = GCD(a, b) ? Answer: Yes. Is there an efficient algorithm to find one such equation? Answer: Yes, the Extended Euclidean Algorithm(EEA). Is this equation unique? Answer: No, there are infinitely many such equations, but if d = GCD(a, b) and if a x1 + b y1 = d is one such equation, then all the equations will be of the form a (x1 + k b /d) + b (y1 – k a /d) = d where k is any integer.

An Example of Using EEA Problem: Write GCD(234, 105) as a linear combination of a = 234 and b = 105. Solution produced by the EEA: a = 2b + 24, so 24 = a – 2b b = 4(24) + 9, so 9 = b – 4(24) = b – 4(a – 2b) = 9b – 4a 24 = 2(9) + 6, so 6 = 24 – 2(9) = (a – 2b) – 2(9b – 4a) = 9a – 20b 9 = 1(6) + 3, so 3 = 9 – 6 = (9b – 4a) – (9a – 20b) = 29b – 13a Check that it’s right! In fact, you can check your correctness at every step.

Other Equations for This Pair? What other equations are there for 234 and 105? They will be of the form (29 + (234/3)k) (105) + (-13 – (105/3)k (234) = 3 for any integer k. If k = -1, for example, we get (29 – 78)(105) + (-13 + 35)(234) = -49(105) + 22(234) = 3 Check it! For Wednesday, read Chapter 6 and do Exercises 6.1 and 6.2 .