Number Theory.

Slides:



Advertisements
Similar presentations
The Integers and Division. Outline Division: Factors, multiples Exercise 2.3 Primes: The Fundamental Theorem of Arithmetic. The Division Algorithm Greatest.
Advertisements

1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
Introduction to Modern Cryptography Homework assignments.
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
CS555Spring 2012/Topic 61 Cryptography CS 555 Topic 6: Number Theory Basics.
Understanding 8.1… Use sigma notation to write the sum of.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Mathematics of Cryptography Part I: Modular Arithmetic
Mathematics of Cryptography Modular Arithmetic, Congruence,
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Name Ihsan ul ghafoor Roll # SubjectNumber theory SectionA DepartmentMethamatics Semester4 th.
Whole Number Arithmetic Highest common factor Lowest common multiple.
Modular (Remainder) Arithmetic n = qk + r (for some k; r < k) eg 37 = (2)(17) + 3 Divisibility notation: 17 | n mod k = r 37 mod 17 = 3.
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Prime Numbers Damian Gordon. Prime Numbers So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number.
Introduction to Number Theory
SYSTEMS OF EQUATIONS. SYSTEM OF EQUATIONS -Two or more linear equations involving the same variable.
Discrete Mathematics
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Unit – 5: Backtracking For detail discussion, students are advised to refer the class discussion.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Various Problem Solving Approaches. Problem solving by analogy Very often problems can be solved by looking at similar problems. For example, consider.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
ISHIK UNIVERSITY FACULTY OF EDUCATION Mathematics Education Department
ALGEBRA 3 Polynomial Division.
WARM UP Find each equation, determine whether the indicated pair (x, y) is a solution of the equation. 2x + y = 5; (1, 3) 4x – 3y = 14; (5, 2)
Mathematics of Cryptography
Direct Proof and Counterexample III: Divisibility
Intro to Computer Science II
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Prime and Composite.
CMSC Discrete Structures
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Sit-In Lab 1 Ob-CHESS-ion
Applied Discrete Mathematics Week 4: Number Theory
Number Theory (Chapter 7)
G = B + 1 3B + G = 5.
NUMBER THEORY.
Solving Linear Systems by Linear Combinations
SYSTEMS OF LINEAR EQUATIONS
Topic 6: Number Theory Basics
Analysis and design of algorithm
Prime and Relatively Prime Numbers
Enough Mathematical Appetizers!
PRIME FACTORS.
Number Theory.
Systems of equations.
The Extended Euclidean Algorithm (2/10)
GCD and LCM relationship
Solving Systems Check Point Quiz Corrections
Copyright © Cengage Learning. All rights reserved.
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
12 Systems of Linear Equations and Inequalities.
Solving Linear Systems by Linear Combinations (Elimination)
Puzzle A Puzzle B.
Back to Cone Motivation: From the proof of Affine Minkowski, we can see that if we know generators of a polyhedral cone, they can be used to describe.
Linear Algebra Lecture 6.
How many solutions? Hung-yi Lee New Question:
Miniconference on the Mathematics of Computation
Number Theory.
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.
Presentation transcript:

Number Theory

Prime Numbers Is x a prime? factorization How many are there? if it is even number, .. else keep dividing factorization base of security Given N = P*Q P,Q are unique How many are there?

GCD & LCM

Modular Arithmetic (Congruences) division? Linear Congruence e.g.) 5x = 12 mod 19 means 5x = 12 + 19t how to find (x, t) pairs?

Backtracking

N-Queen Problem 4-Queens Problem

Solution for N-Queen no solution for n < 4 n=4 case list all case systematically test each case if it is a solution 16C4 cases – n2Cn cases better way?

Backtracking Solution set a vector a = (a1, a2, …, an) let a = (a1, …, ak) add a possible solution ak+1 check validity if it is a solution, do something else check if ak+1 can generate more possible solutions if yes, add them to the solution vector else remove ak+1 4 queens: total 16 positions a1 – a16 (a11 – a44) for the first queen, a = (a11, a12, .... a44) a11 generates three positions for the second queen - a12 and a21 a22 – all fail a12 generates .....

Backtracking Efficiency It is usually correct The issue is efficiency solution space of the n-queens problem there are n2 cells each cell either has a queen (TRUE) or not (FALSE) total combinations 2n 8-queens problem ~ 1.84 * 1019 another solution the 1st queen = 64 cases the 2nd queen = 64 cases the 8th queen = 64 cases TOTAL 648 = 2.81 * 1014 cases

Prunning 648 = 2.81 * 1014 is still a huge number remove invalid case as early as possible no two queens sit on the same cell once a queen is placed, the second will be at a higher numbered cell 64C8 = 4.426 * 109 can you do it more? 1st queen at the 1st row 2nd queen at the 2nd row 8th queen at the 8th row TOTAL 88 = 1.677 *107 cases how about the column regulation?

Prunning for 4-Queens Problem

15-Puzzle

Tug of War