This document provides information about number theory, including divisors, prime factorization, and congruences. It begins by defining divisors and the division algorithm, and proves several theorems about greatest common divisors and expressing them as linear combinations. It then discusses prime numbers and Euclid's lemma, and proves the fundamental theorem of arithmetic that every integer can be uniquely expressed as a product of prime factors. The document concludes by defining congruences modulo m and listing some basic properties of congruences.
This document provides an introduction to number theory, including:
- Number theory is the study of integers and their properties
- It discusses the origins and early developments of number theory in places like Mesopotamia, India, Greece, and Alexandria
- It defines different types of numbers like natural numbers, integers, rational numbers, irrational numbers, and describes properties like prime and composite numbers
- It discusses applications of number theory like public key cryptography and error-correcting codes
The document discusses divisibility rules for natural numbers. It begins by introducing the division algorithm and defining divisibility. It then provides divisibility rules and examples for numbers being divisible by 2, 3, 4, 5, 6, 8, 9, 10, and 11. Specific rules include a number being divisible by 2 if the last digit is even, divisible by 3 if the sum of the digits is divisible by 3, and divisible by 4 if the last two digits are a multiple of 4.
The document discusses the principle of mathematical induction and how it can be used to prove statements about natural numbers. It provides examples of using induction to prove statements about sums, products, and divisibility. The principle of induction states that to prove a statement P(n) is true for all natural numbers n, one must show that P(1) is true and that if P(k) is true, then P(k+1) is also true. The document provides examples of direct proofs of P(1) and inductive proofs of P(k+1) to demonstrate applications of the principle.
A study on number theory and its applicationsItishree Dash
A STUDY ON NUMBER THEORY AND ITS APPLICATIONS
Applications
Modular Arithmetic
Congruence and Pseudorandom Number
Congruence and CRT(Chinese Remainder Theorem)
Congruence and Cryptography
This document introduces some basic concepts in number theory, including primes, least common multiples, greatest common divisors, and modular arithmetic. It then discusses different number systems such as decimal, binary, octal, and hexadecimal. Methods are provided for converting between these different bases, including dividing or grouping bits and multiplying by the place value. Prime numbers are defined as integers greater than 1 that are only divisible by 1 and themselves. The fundamental theorem of arithmetic states that every integer can be written as a unique product of prime factors.
1. The document discusses groups, subgroups, cosets, normal subgroups, quotient groups, and homomorphisms.
2. It defines cosets, proves Lagrange's theorem that the order of a subgroup divides the order of the group, and provides examples of finding cosets.
3. Normal subgroups are introduced, and it is shown that the set of cosets of a normal subgroup forms a group under a defined operation, known as the quotient group. Homomorphisms between groups are defined, and examples are given.
This document defines modular arithmetic and some of its key properties. Modular arithmetic involves taking the remainder of dividing one integer by another. It defines congruence (a ≡ b mod n) as meaning n divides the difference of a and b. Some key properties are that addition, subtraction and multiplication of congruent numbers are also congruent modulo n, and that modular arithmetic forms a mathematical system with properties like commutativity, associativity and distributivity. Examples are given to illustrate these concepts and properties.
The document summarizes key concepts and applications of integration. It discusses:
1) Important historical figures like Archimedes, Gauss, Leibniz and Newton who contributed to the development of integration and calculus.
2) Engineering applications of integration like in the design of the Petronas Towers and Sydney Opera House.
3) The integration by parts formula and examples of using it to evaluate integrals of composite functions.
This document provides an introduction to number theory, including:
- Number theory is the study of integers and their properties
- It discusses the origins and early developments of number theory in places like Mesopotamia, India, Greece, and Alexandria
- It defines different types of numbers like natural numbers, integers, rational numbers, irrational numbers, and describes properties like prime and composite numbers
- It discusses applications of number theory like public key cryptography and error-correcting codes
The document discusses divisibility rules for natural numbers. It begins by introducing the division algorithm and defining divisibility. It then provides divisibility rules and examples for numbers being divisible by 2, 3, 4, 5, 6, 8, 9, 10, and 11. Specific rules include a number being divisible by 2 if the last digit is even, divisible by 3 if the sum of the digits is divisible by 3, and divisible by 4 if the last two digits are a multiple of 4.
The document discusses the principle of mathematical induction and how it can be used to prove statements about natural numbers. It provides examples of using induction to prove statements about sums, products, and divisibility. The principle of induction states that to prove a statement P(n) is true for all natural numbers n, one must show that P(1) is true and that if P(k) is true, then P(k+1) is also true. The document provides examples of direct proofs of P(1) and inductive proofs of P(k+1) to demonstrate applications of the principle.
A study on number theory and its applicationsItishree Dash
A STUDY ON NUMBER THEORY AND ITS APPLICATIONS
Applications
Modular Arithmetic
Congruence and Pseudorandom Number
Congruence and CRT(Chinese Remainder Theorem)
Congruence and Cryptography
This document introduces some basic concepts in number theory, including primes, least common multiples, greatest common divisors, and modular arithmetic. It then discusses different number systems such as decimal, binary, octal, and hexadecimal. Methods are provided for converting between these different bases, including dividing or grouping bits and multiplying by the place value. Prime numbers are defined as integers greater than 1 that are only divisible by 1 and themselves. The fundamental theorem of arithmetic states that every integer can be written as a unique product of prime factors.
1. The document discusses groups, subgroups, cosets, normal subgroups, quotient groups, and homomorphisms.
2. It defines cosets, proves Lagrange's theorem that the order of a subgroup divides the order of the group, and provides examples of finding cosets.
3. Normal subgroups are introduced, and it is shown that the set of cosets of a normal subgroup forms a group under a defined operation, known as the quotient group. Homomorphisms between groups are defined, and examples are given.
This document defines modular arithmetic and some of its key properties. Modular arithmetic involves taking the remainder of dividing one integer by another. It defines congruence (a ≡ b mod n) as meaning n divides the difference of a and b. Some key properties are that addition, subtraction and multiplication of congruent numbers are also congruent modulo n, and that modular arithmetic forms a mathematical system with properties like commutativity, associativity and distributivity. Examples are given to illustrate these concepts and properties.
The document summarizes key concepts and applications of integration. It discusses:
1) Important historical figures like Archimedes, Gauss, Leibniz and Newton who contributed to the development of integration and calculus.
2) Engineering applications of integration like in the design of the Petronas Towers and Sydney Opera House.
3) The integration by parts formula and examples of using it to evaluate integrals of composite functions.
This document is a dissertation submitted by Amit Kumar Singh for his M.Sc. in Mathematics at the University of Allahabad. It discusses various Diophantine equations including linear equations of the form ax+by=c, Pythagorean triples satisfying x^2 + y^2 = z^2, and Fermat's Last Theorem that x^n + y^n cannot equal z^n for integers when n is greater than 2. The document contains acknowledgments, contents, and sections on the life of Diophantus and different types of Diophantine equations.
The document discusses the remainder theorem for polynomials. It defines the division algorithm for polynomials which divides a polynomial P(x) by (x-c) to get a unique quotient polynomial Q(x) and remainder R. The remainder theorem then states that the remainder R is equal to the value of P(c). The document proves the theorem and provides examples of using it to find the remainder when one polynomial is divided by another. It also provides exercises for students to find remainders using the theorem.
The document discusses closures of relations, including reflexive closure and symmetric closure. It provides definitions and theorems related to closures. It also uses an example to illustrate finding the reflexive closure and symmetric closure of a relation. Additionally, it covers topics like paths in directed graphs, shortest paths, and transitive closure. It includes an example of calculating the transitive closure of a relation by finding its zero-one matrix.
This document discusses key concepts in number theory including divisibility, greatest common divisors, least common multiples, prime and composite numbers, relative primality, modular arithmetic, factorials, and applications. It defines these terms and provides examples. Greatest common divisors are the largest integers that divide two numbers. Least common multiples are the smallest integers divisible by two numbers. Prime numbers have only two factors and composite numbers are multiples of primes. Relative primality means two numbers have no common prime factors. Modular arithmetic uses the remainder of a division. Factorials are the product of integers up to a given number. Applications include cryptography.
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
Equivalence of Relations & Partial Ordering
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 21, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
Factor Theorem and Remainder Theorem. Mathematics10 Project under Mrs. Marissa De Ocampo. Prepared by Danielle Diva, Ronalie Mejos, Rafael Vallejos and Mark Lenon Dacir of 10- Einstein. CNSTHS.
Now we have learnt the basics in logic.
We are going to apply the logical rules in proving mathematical theorems.
1-Direct proof
2-Contrapositive
3-Proof by contradiction
4-Proof by cases
Mathematical Induction
CMSC 56 | Discrete Mathematical Structure for Computer Science
October 18, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
1) The document uses mathematical induction to prove several formulas.
2) It demonstrates proofs for formulas like 1 + 3 + 5 + ... + (2n-1) = n^2 and 2 + 4 + ... + 2n = n(n+1).
3) The proofs follow the standard structure of mathematical induction, showing the base case is true and using the induction hypothesis to show if the statement is true for n it is also true for n+1.
This document defines and explains various concepts related to sets and relations. It discusses the four main set operations of union, intersection, complement, and difference. It then explains eight types of relations: empty, universal, identity, inverse, reflexive, symmetric, transitive, and equivalence relations. Finally, it defines partial ordering as a relation that is reflexive, antisymmetric, and transitive.
- Permutation refers to arrangements that consider order, while combination refers to selections where order does not matter.
- The number of permutations of n distinct objects taken r at a time is nPr = n!/(n-r)!, while the number of combinations is nCr = n!/r!(n-r)!.
- Examples are given to illustrate permutations involving restricted arrangements and circular permutations. Restricted permutations consider cases where certain objects are always or never included.
This document discusses set operations and identities. It defines operations like union, intersection, complement, difference, and cardinality. It presents examples of calculating unions, intersections, complements, and differences of sets. It also covers set identities like commutative, associative, distributive, De Morgan's laws, and absorption laws. Methods for proving identities like subset proofs and membership tables are described. An example proof of the second De Morgan's law is provided using subset notation.
This document discusses permutations and combinations. Permutations refer to the number of arrangements that can be made by selecting some or all items from a set. Combinations refer to the number of groups that can be formed by selecting some items from a set. The document provides formulas for calculating permutations and combinations, and examples of applying these concepts such as calculating the number of ways to form a cricket team from available players.
Cryptography and data security involves number theory concepts like groups, rings, fields, and modular arithmetic. Some key ideas discussed include:
1) The integers under addition form a cyclic group, and the theorem that for any finite group G and element a in G, a raised to the order of G is the identity element.
2) Modular arithmetic defines equivalence classes for integers modulo n, and the set of residues Zn forms an abelian group under addition.
3) The multiplicative integers modulo n, Zn*, form a group whose size is given by Euler's totient function φ(n). For prime p, φ(p) = p - 1.
This document discusses predicates and quantifiers in predicate logic. It begins by explaining the limitations of propositional logic in expressing statements involving variables and relationships between objects. It then introduces predicates as statements involving variables, and quantifiers like universal ("for all") and existential ("there exists") to express the extent to which a predicate is true. Examples are provided to demonstrate how predicates and quantifiers can be used to represent statements and enable logical reasoning. The document also covers translating statements between natural language and predicate logic, and negating quantified statements.
Linear differential equation with constant coefficientSanjay Singh
The document discusses linear differential equations with constant coefficients. It defines the order, auxiliary equation, complementary function, particular integral and general solution. It provides examples of determining the complementary function and particular integral for different types of linear differential equations. It also discusses Legendre's linear equations, Cauchy-Euler equations, and solving simultaneous linear differential equations.
This document discusses sequences and their limits. Some key points:
- A sequence is a list of numbers written in a definite order. It can be thought of as a function with domain the positive integers.
- The limit of a sequence is defined as the number L such that the terms of the sequence can be made arbitrarily close to L by choosing a sufficiently large term.
- A sequence converges if it has a finite limit, and diverges if its terms approach infinity. Bounded monotonic sequences are guaranteed to converge.
- Properties of sequence limits parallel those of limits of functions, including laws of limits and the ability to pass limits inside continuous functions.
This document discusses cyclic groups and their properties. It begins by defining a cyclic group as a group that can be generated by one of its elements. It then provides examples of cyclic groups like the integers under addition and groups of integers modulo n. The key properties of cyclic groups are then outlined, including that cyclic groups are abelian, and the criteria for determining subgroup order and generators. Finite cyclic groups are shown to have unique subgroups for each divisor of the group order. The document concludes by discussing the classification and enumeration of subgroups in cyclic groups.
This document presents two theorems about repunit Lehmer numbers. Theorem 1 states that for any fixed base g > 1, there are only finitely many positive integers n such that the repunit number un = (gn - 1)/(g - 1) is a Lehmer number, and these can all be effectively computed. Theorem 2 states that there are no Lehmer numbers of the form un when 2 ≤ g ≤ 1000. The document provides background on Lehmer numbers and repunit numbers, establishes some preliminary results, and gives the proof of Theorem 1 by considering primitive divisors of the repunit numbers.
The document discusses several theorems related to twin prime conjectures:
- Theorem 1 states that a prime p can be written in the form 3k+1 or 3k-1, with k being even.
- Theorem 4 characterizes twin primes as pairs where n(n+2) satisfies a modular condition.
- Theorems aim to prove there are infinitely many twin primes, relying on the ratio of primes increasing without bound as n increases without bound.
This document is a dissertation submitted by Amit Kumar Singh for his M.Sc. in Mathematics at the University of Allahabad. It discusses various Diophantine equations including linear equations of the form ax+by=c, Pythagorean triples satisfying x^2 + y^2 = z^2, and Fermat's Last Theorem that x^n + y^n cannot equal z^n for integers when n is greater than 2. The document contains acknowledgments, contents, and sections on the life of Diophantus and different types of Diophantine equations.
The document discusses the remainder theorem for polynomials. It defines the division algorithm for polynomials which divides a polynomial P(x) by (x-c) to get a unique quotient polynomial Q(x) and remainder R. The remainder theorem then states that the remainder R is equal to the value of P(c). The document proves the theorem and provides examples of using it to find the remainder when one polynomial is divided by another. It also provides exercises for students to find remainders using the theorem.
The document discusses closures of relations, including reflexive closure and symmetric closure. It provides definitions and theorems related to closures. It also uses an example to illustrate finding the reflexive closure and symmetric closure of a relation. Additionally, it covers topics like paths in directed graphs, shortest paths, and transitive closure. It includes an example of calculating the transitive closure of a relation by finding its zero-one matrix.
This document discusses key concepts in number theory including divisibility, greatest common divisors, least common multiples, prime and composite numbers, relative primality, modular arithmetic, factorials, and applications. It defines these terms and provides examples. Greatest common divisors are the largest integers that divide two numbers. Least common multiples are the smallest integers divisible by two numbers. Prime numbers have only two factors and composite numbers are multiples of primes. Relative primality means two numbers have no common prime factors. Modular arithmetic uses the remainder of a division. Factorials are the product of integers up to a given number. Applications include cryptography.
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
Equivalence of Relations & Partial Ordering
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 21, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
Factor Theorem and Remainder Theorem. Mathematics10 Project under Mrs. Marissa De Ocampo. Prepared by Danielle Diva, Ronalie Mejos, Rafael Vallejos and Mark Lenon Dacir of 10- Einstein. CNSTHS.
Now we have learnt the basics in logic.
We are going to apply the logical rules in proving mathematical theorems.
1-Direct proof
2-Contrapositive
3-Proof by contradiction
4-Proof by cases
Mathematical Induction
CMSC 56 | Discrete Mathematical Structure for Computer Science
October 18, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
1) The document uses mathematical induction to prove several formulas.
2) It demonstrates proofs for formulas like 1 + 3 + 5 + ... + (2n-1) = n^2 and 2 + 4 + ... + 2n = n(n+1).
3) The proofs follow the standard structure of mathematical induction, showing the base case is true and using the induction hypothesis to show if the statement is true for n it is also true for n+1.
This document defines and explains various concepts related to sets and relations. It discusses the four main set operations of union, intersection, complement, and difference. It then explains eight types of relations: empty, universal, identity, inverse, reflexive, symmetric, transitive, and equivalence relations. Finally, it defines partial ordering as a relation that is reflexive, antisymmetric, and transitive.
- Permutation refers to arrangements that consider order, while combination refers to selections where order does not matter.
- The number of permutations of n distinct objects taken r at a time is nPr = n!/(n-r)!, while the number of combinations is nCr = n!/r!(n-r)!.
- Examples are given to illustrate permutations involving restricted arrangements and circular permutations. Restricted permutations consider cases where certain objects are always or never included.
This document discusses set operations and identities. It defines operations like union, intersection, complement, difference, and cardinality. It presents examples of calculating unions, intersections, complements, and differences of sets. It also covers set identities like commutative, associative, distributive, De Morgan's laws, and absorption laws. Methods for proving identities like subset proofs and membership tables are described. An example proof of the second De Morgan's law is provided using subset notation.
This document discusses permutations and combinations. Permutations refer to the number of arrangements that can be made by selecting some or all items from a set. Combinations refer to the number of groups that can be formed by selecting some items from a set. The document provides formulas for calculating permutations and combinations, and examples of applying these concepts such as calculating the number of ways to form a cricket team from available players.
Cryptography and data security involves number theory concepts like groups, rings, fields, and modular arithmetic. Some key ideas discussed include:
1) The integers under addition form a cyclic group, and the theorem that for any finite group G and element a in G, a raised to the order of G is the identity element.
2) Modular arithmetic defines equivalence classes for integers modulo n, and the set of residues Zn forms an abelian group under addition.
3) The multiplicative integers modulo n, Zn*, form a group whose size is given by Euler's totient function φ(n). For prime p, φ(p) = p - 1.
This document discusses predicates and quantifiers in predicate logic. It begins by explaining the limitations of propositional logic in expressing statements involving variables and relationships between objects. It then introduces predicates as statements involving variables, and quantifiers like universal ("for all") and existential ("there exists") to express the extent to which a predicate is true. Examples are provided to demonstrate how predicates and quantifiers can be used to represent statements and enable logical reasoning. The document also covers translating statements between natural language and predicate logic, and negating quantified statements.
Linear differential equation with constant coefficientSanjay Singh
The document discusses linear differential equations with constant coefficients. It defines the order, auxiliary equation, complementary function, particular integral and general solution. It provides examples of determining the complementary function and particular integral for different types of linear differential equations. It also discusses Legendre's linear equations, Cauchy-Euler equations, and solving simultaneous linear differential equations.
This document discusses sequences and their limits. Some key points:
- A sequence is a list of numbers written in a definite order. It can be thought of as a function with domain the positive integers.
- The limit of a sequence is defined as the number L such that the terms of the sequence can be made arbitrarily close to L by choosing a sufficiently large term.
- A sequence converges if it has a finite limit, and diverges if its terms approach infinity. Bounded monotonic sequences are guaranteed to converge.
- Properties of sequence limits parallel those of limits of functions, including laws of limits and the ability to pass limits inside continuous functions.
This document discusses cyclic groups and their properties. It begins by defining a cyclic group as a group that can be generated by one of its elements. It then provides examples of cyclic groups like the integers under addition and groups of integers modulo n. The key properties of cyclic groups are then outlined, including that cyclic groups are abelian, and the criteria for determining subgroup order and generators. Finite cyclic groups are shown to have unique subgroups for each divisor of the group order. The document concludes by discussing the classification and enumeration of subgroups in cyclic groups.
This document presents two theorems about repunit Lehmer numbers. Theorem 1 states that for any fixed base g > 1, there are only finitely many positive integers n such that the repunit number un = (gn - 1)/(g - 1) is a Lehmer number, and these can all be effectively computed. Theorem 2 states that there are no Lehmer numbers of the form un when 2 ≤ g ≤ 1000. The document provides background on Lehmer numbers and repunit numbers, establishes some preliminary results, and gives the proof of Theorem 1 by considering primitive divisors of the repunit numbers.
The document discusses several theorems related to twin prime conjectures:
- Theorem 1 states that a prime p can be written in the form 3k+1 or 3k-1, with k being even.
- Theorem 4 characterizes twin primes as pairs where n(n+2) satisfies a modular condition.
- Theorems aim to prove there are infinitely many twin primes, relying on the ratio of primes increasing without bound as n increases without bound.
The document discusses several topics in cryptography including prime numbers, primality testing algorithms, factorization algorithms, the Chinese Remainder Theorem, and modular exponentiation. It defines prime numbers and describes algorithms for determining if a number is prime like the trial division method and Miller-Rabin primality test. Factorization algorithms are used to break encryption. The Chinese Remainder Theorem can be used to solve simultaneous congruences and speed up computations performed modulo composite numbers. Euler's theorem and its generalization are also covered.
This document provides an overview of number theory concepts including:
1. Modular arithmetic and its properties such as congruences modulo m and applications to hashing functions and pseudorandom number generators.
2. Primes, including the fundamental theorem of arithmetic and a theorem stating any composite number has a prime divisor less than or equal to the square root of the number.
3. Divisibility properties and the division algorithm for finding the quotient and remainder of integer division.
The document discusses congruences and the Chinese Remainder Theorem. It begins by introducing congruences and some basic properties, such as if a ≡ b (mod m) and c ≡ d (mod m), then a + c ≡ b + d (mod m). It then discusses the Euler phi function and Euler's Theorem. Finally, it introduces and proves the Chinese Remainder Theorem, which states that a system of congruences with pairwise relatively prime moduli has a unique solution modulo the product of the moduli.
The document summarizes key concepts in design analysis and algorithms including:
1. Number theory problems like the Chinese Remainder Theorem and GCD algorithms. Approximate algorithms for set cover and vertex cover problems are also discussed.
2. The Chinese Remainder Theorem allows determining solutions based on remainders when numbers are divided. Pseudocode and a program demonstrate its use.
3. Modular arithmetic operations like addition, multiplication, and exponentiation along with their properties and programs are outlined.
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Aladdinew
This document provides solutions to exercises from Chapter 1 of a textbook on abstract algebra. The exercises cover topics from sections 1.1 and 1.2 such as proofs by induction, properties of integers (commutativity, associativity, etc.), divisibility, and finding the greatest common divisor. The solutions demonstrate techniques like proof by contradiction and distributing operations. The document is intended for students to check their work and for instructors to help explain the concepts.
The document discusses several topics in number theory including prime numbers, Fermat's and Euler's theorems, primality testing algorithms like Miller-Rabin, the Chinese Remainder Theorem, and discrete logarithms. It defines prime numbers and factorization. It explains Fermat's Little Theorem, Euler's Theorem and how they relate exponentiation and modulo arithmetic. It also describes probabilistic primality tests and their analysis. The Chinese Remainder Theorem is introduced as a method to speed up modular computations. Discrete logarithms are defined as the inverse of exponentiation modulo a prime.
Heuristics for counterexamples to the Agrawal ConjectureAmshuman Hegde
This document presents heuristics for constructing counterexamples to the Agrawal Conjecture. It generalizes an earlier proposition given by Lenstra and Pomerance by showing that their arguments can be applied to any prime number r that is congruent to 1 modulo 4. A second generalization is presented that allows the number n to be composed of prime power factors rather than just prime factors. Finally, a rough estimate is given suggesting that there should be at least e^{T^2(1-5/m)} counterexamples below e^{T^2} for large T.
The document discusses the RSA cryptosystem. It begins with a brief history of cryptography. Then it explains the RSA process which uses a public and private key pair based on the difficulty of factoring large prime numbers. The key generation process is described, involving choosing prime numbers p and q, computing the totient function φ(n), and selecting public and private exponents. Encryption involves modular exponentiation of a message with the public key, while decryption requires the private key.
Number theory concepts like prime numbers, modular arithmetic, and theorems like Fermat's and Euler's are important foundations for cryptography. Primality testing and the Chinese Remainder Theorem can help efficiently generate and operate with large prime numbers. While exponentiation is easy, the inverse problem of computing discrete logarithms is computationally difficult, making it suitable for cryptographic applications.
This document discusses the fundamentals of symmetric-key encipherment and modular arithmetic. It covers the following key topics in 3 sentences or less:
Integer arithmetic defines the basic operations of addition, subtraction, and multiplication over integers. Modular arithmetic introduces the modulo operator, which reduces integers into congruence classes modulo n to create the set Zn. The extended Euclidean algorithm is described for finding the greatest common divisor of two integers and solving linear Diophantine equations.
This document contains solutions to 5 problems posed at the IMC 2017 conference. The solutions are summarized as follows:
1) The possible eigenvalues of the matrix A described in Problem 1 are 0, 1, and -1±√3i/2.
2) Problem 2 proves that for any differentiable function f satisfying the Lipschitz condition, f(x)2 < 2Lf(x) for all x.
3) Problem 3 shows that for any set S subset of {1,2,...,2017}, there exists an integer n such that the sequence ak(n) defined in the problem satisfies the property that ak(n) is a perfect square if and only if k is
This document discusses several topics related to mathematics for cryptography:
1. It introduces basic concepts of cryptography including plaintext, ciphertext, encryption and decryption functions.
2. It provides an overview of the RSA algorithm, which uses a public and private key pair to encrypt and decrypt messages. The algorithm involves multiplying large prime numbers to generate the keys.
3. It explains the mathematical concepts underlying RSA key generation such as the totient function, greatest common divisor, modular arithmetic, and linear combinations - which are used to derive the public and private keys in a secure manner.
1. The document describes techniques for integrating trigonometric functions using trigonometric substitution and identities involving sine, cosine, tangent, and secant.
2. Trigonometric substitution involves redefining the variable in terms of a trigonometric function, unlike traditional substitution which defines a new variable.
3. The techniques are demonstrated through examples such as finding antiderivatives of √9-x^2/x^2 and √x^2+4/x^2.
Newton's method and Gauss-Newton method can be used to minimize a nonlinear least squares function to fit a vector of model parameters to a data vector. The Gauss-Newton method approximates the Hessian matrix as the Jacobian transpose times the Jacobian, ignoring additional terms, making it faster to compute but less accurate than Newton's method. The Levenberg-Marquardt method interpolates between Gauss-Newton and steepest descent methods to provide a balance of convergence speed and accuracy. Iterative methods like conjugate gradients are useful for large nonlinear problems where storing and inverting the full matrix would be prohibitive. L1 regression provides a more robust alternative to L2 regression for dealing with outliers through minimization of the absolute error rather
1) The document discusses properties of Fermat numbers Fn = 22n + 1. It proves that F5 is divisible by 641 and that the least digit in the decimal expansion of Fn is 7 if n ≥ 2.
2) It also proves that for all positive integers n, the product of the first n Fermat numbers minus 2 equals the next Fermat number (F0F1...Fn-1 = Fn - 2).
3) Additionally, it proves that if m and n are distinct nonnegative integers, then the Fermat numbers Fm and Fn are relatively prime.
This document contains the solutions to problems from the 2018 Canadian Mathematical Olympiad. The first summary discusses a problem about arranging tokens on a plane and moving them to the same point via midpoint moves. The solution proves that every arrangement is collapsible if and only if the number of tokens is a power of 2. The second summary is about points on a circle where two lengths are equal, and proving a line is perpendicular to another line. The third summary asks for all positive integers with at least three divisors that can be arranged in a circle such that adjacent divisors are prime-related, and the solution shows these are integers that are neither a perfect square nor a power of a prime.
This document discusses basic loops and functions in R programming. It covers control statements like loops and if/else, arithmetic and boolean operators, default argument values, and returning values from functions. It also describes R programming structures, recursion, and provides an example of implementing quicksort recursively and constructing a binary search tree. The key topics are loops, control flow, functions, recursion, and examples of sorting and binary trees.
This document provides an introduction and overview of R programming for statistics. It discusses how to run R sessions and functions, basic math operations and data types in R like vectors, data frames, and matrices. It also covers statistical and graphical features of R, programming features like functions, and gives examples of built-in and user-defined functions.
The document discusses the tkinter module in Python, which provides tools for building graphical user interfaces (GUIs). Tkinter comes pre-installed with Python and allows creating GUI elements like labels, buttons, menus, and more. The document covers how to import tkinter, create windows, add widgets, and arrange widgets using different geometry managers. It also provides examples of creating common widgets like labels, buttons, checkboxes, and menus. Finally, it briefly introduces the turtle module for drawing shapes and graphics.
This document provides an introduction to graphs and graph terminology. It defines what a graph is composed of, including vertices and edges. It gives examples of graphs and has the student practice identifying vertices and edges. It also introduces common graph terminology like degree of a vertex, adjacent vertices, paths, circuits, bridges, Euler paths, and Euler circuits. Fleury's algorithm for finding an Euler circuit or path in a graph is described. The document uses examples and exercises to help students learn and practice applying these graph concepts.
This document discusses set theory and relations between sets. It begins by introducing basic set notation such as set membership and subset notation. It then defines and provides examples of relations between sets such as subset, equality, union, intersection, difference, and complement. The document also covers properties of sets and relations including commutative, associative, distributive, and other properties. It concludes by discussing relations as subsets of Cartesian products and properties of relations such as reflexive, symmetric, transitive, and antisymmetric relations.
The math module provides functions for specialized mathematical operations such as ceil, floor, factorial, gcd, exp, log, pow, sqrt, trigonometric functions, and constants such as pi and e. The zlib module provides functions for compressing and decompressing data using the zlib library as well as computing checksums. The threading module allows creating and managing threads in Python. Key concepts include the Thread class for defining new threads, starting and joining threads, and synchronizing thread execution using locks.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
3. 1.Divisors
Theorem 1.1. Division Algorithm. Let n and d ≥ 1 be integers. There
exist uniquely determined integers q and r such that n = qd + r and
0 ≤ r < d.
Proof. Let X = {n − td|t ∈ , n − td ≥ 0}. Then X is nonempty (if
n≥0,then n X; if n < 0, then n(1 − d) X). Hence let r be the∈ ∈
smallest member of X . Then r = n − qd for some q ∈ , and it
remains to show that r < d. But if r ≥d, then 0 ≤ r − d = n − (q + 1)d,
so r − d is in X contrary to the minimality of r.
As to uniqueness, suppose that n = q’d + r’, where 0≤ r’< d. We
may assume that r ≤ r’(a similar argument works if r’ ≤ r). Then
0 ≤ r’ − r = (q − q’)d, so (q − q’)d is a nonnegative multiple of d that
is less than d (because r’ − r ≤ r ’< d). The only possibility is
(q − q’)d = 0, so q’ = q, and hence r’ = r.
3
4. 1.Divisors
• Given n and d ≥ 1, the integers q and r in Theorem 1.1 are called,
respectively, the quotient and remainder when n is divided by d.
For example, if we divide n = −29 by d = 7, we find that −29 =
(−5) · 7 + 6, so the quotient is −5 and remainder is 6.
The usual process of long division is a procedure for finding the
quotient and remainder for a given n and d ≥ 1. However, they can
easily be found with a calculator. For example, if n = 3196 and d =
271 then n/d = 11,79 approximately, so q = 11. Then r = n − qd =
215, so 3196 = 11 · 271 + 215, as desired.
If d and n are integers, we say that d divides n, or that d is a
divisor of n, if n = qd for some integer q. We write d|n when this
is the case. Thus, a positive integer p >1is prime if and only if p has
no positive divisors except 1 and p. The following properties of the
divisibility relation | are easily verified:
4
5. 1.Divisors
(i) n|n for every n.
(ii) If d|m and m|n, then d|n.
(iii) If d|n and n|d, then d = ±n.
(iv) If d|n and d|m, then d|(xm + yn) for all integers x and y.
Given positive integers m and n, an integer d is called a common
divisor of m and n if d|m and d|n.
If m and n are integers, not both zero, we say that d is the
greatest common divisor of m and n, and write d = gcd(m, n),
if the following three conditions are satisfied:
(i) d ≥ 1. (ii) d|m and d|n.
(iii) If k|m and k|n, then k|d.
5
6. 1.Divisors
• Theorem 1.2. Let m and n be integers, not both zero.
Then d = gcd(m, n) exists,and d = xm + yn for some
integers x and y.
Proof. Let X = {sm + tn | s, t ∈ ; sm + tn ≥1}. Then X is
not empty since m2
+ n2
is in X, so let d be the smallest
member of X. Since d X we have d∈ ≥ 1 and
d = xm + yn for integers x and y, proving conditions (i)
and (iii) in the definition of the gcd.
Hence it remains to show that d|m and d|n.We show
that d|n; the other is similar. By the division algorithm
6
7. 1.Divisors
write n = qd + r, where 0 ≤ r < d. Then
r = n − q(xm + yn) = (−qx)m + (1 − qy)n. Hence, if r ≥ 1, then
r X, contrary to the minimality of d. So r = 0 and we have∈
d|n.
When gcd(m, n) = xm + yn where x and y are integers, we say
that gcd(m, n) is a linear combination of m and n. There is an
efficient way of computing x and y using the division
algorithm.
The following example illustrates the method.
7
8. 1.Divisors
• Example . Find gcd(37, 8) and express it as a linear combination of 37
and 8.
Proof. It is clear that gcd(37, 8) = 1 because 37 is a prime; however, no
linear combination is apparent. Dividing 37 by 8, and then dividing each
successive divisor by the preceding remainder, gives the first set of
equations.
37 = 4 · 8 +5 1= 3 − 1 · 2 = 3 − 1(5 − 1 · 3)
8 = 1 · 5 + 3 = 2 · 3 − 5 = 2(8 − 1 · 5) − 5
5 = 1 · 3 + 2 = 2 · 8 − 3 · 5 = 2 · 8 − 3(37 − 4 · 8)
3 = 1 · 2 + 1 = 14 · 8 − 3 · 37
2 = 2 · 1
The last nonzero remainder is 1, the greatest common divisor, and this
turns out always to be the case. Eliminating remainders from the bottom up
(as in the second set of equations) gives 1 = 14 · 8 − 3 · 37.
8
9. 1.Divisors
• Theorem 1.3. Euclidean Algorithm. Given integers m and
n ≥ 1, use the division algorithm repeatedly:
m = q1n + r1 0 ≤ r1 < n
n = q2r1 + r2 0 ≤ r2 < r1
r1 = q3r2 + r3 0 ≤ r3 < r2
...
...
r k-2= qkrk−1 + rk 0 ≤ rk < rk-1
rk−1= qk+1rk
where in each equation the divisor at the preceding stage is
divided by the remainder. These remainders decrease
r1 > r2 > · · · ≥ 0
9
10. 1.Divisors
so the process eventually stops when the remainder
becomes zero. If r1 = 0, then gcd(m, n) = n. Otherwise,
rk = gcd(m, n), where rk is the last nonzero remainder
and can be expressed as a linear combination of m and
n by eliminating remainders.
Proof. Express rk as a linear combination of m and n by
eliminating remainders in the equations from the
second last equation up. Hence every common
divisor of m and n divides rk. But rk is itself a common
divisor of m and n (it divides every ri—work up through
the equations). Hence rk = gcd(m, n).
10
11. 1.Divisors
Two integers m and n are called relatively prime if gcd(m, n) = 1.
Hence 12 and 35 are relatively prime, but this is not true for 12 and 15
Because gcd(12, 15) = 3. Note that 1 is relatively prime to every
integer m. The following theorem collects three basic properties of
relatively prime integers.
Theorem 1.4. If m and n are integers, not both zero:
(i) m and n are relatively prime if and only if 1 = xm + yn for some
integers x and y.
(ii) If d = gcd(m, n), then m/d and n/d are relatively prime.
(iii) Suppose that m and n are relatively prime.
(a) If m|k and n|k, where k ∈ , then mn|k.
(b) If m|kn for some k ∈ , then m|k
11
12. 1.Divisors
• Proof. (i) If 1 = xm + yn with x, y ∈ , then every
divisor of both m and n divides 1, so must be 1 or −1. It
follows that gcd(m, n) = 1. The converse is by the
euclidean algorithm.
(ii). By Theorem 1.2, write d = xm + yn,
where x, y ∈ . Then
1 = x(m/d)+y(n/d) and (ii) follows from (i).
(iii). Write 1 = xm + yn, where x, y ∈ . If k = am and k
= bn, a, b ∈ then k = kxm + kyn = (xb + ya)mn, and
(a) follows. As to (b), suppose that
kn = qm, q ∈ . Then k = kxm + kyn = (kx + qn)m, so
m|k.
12
13. 2.Prime Factorization
Recall that an integer p is called a prime if:
• (i) p ≥ 2.
• (ii) The only positive divisors of p are 1 and p.
The reason for not regarding 1 as a prime is that
we want the factorization of every integer into
primes to be unique. The following result is needed.
13
14. 2.Prime Factorization
• Theorem 2. 1. Euclid’s Lemma. Let p denote a prime.
(i) If p|mn where m, n ∈ , then either p|m or p|n.
(ii) If p|m1m2 · · ·mr where each mi ∈ , then p|mi for some i.
Proof. (i) Write d = gcd(m, p). Then d|p, so as p is a prime, either
d = p or d = 1.
If d = p, then p|m; if d =1, then since p|mn, we have p|n by
Theorem 1.4 .
(ii) This follows from (i) using induction on r.
14
15. 2.Prime Factorization
• Theorem 2.2. Every integer n >1 is a product
of primes.
• Proof. Let pn denote the statement of the theorem. Then p2
is clearly true.
If p2, p3, . . . , pk are all true, consider the integer k + 1. If
k + 1 is a prime, there is nothing to prove. Otherwise,
k + 1 = ab, where 2 ≤ a, b ≤ k. But then each of a and b are
products of primes because pa and pb are both true by the
(strong) induction assumption. Hence ab = k + 1 is also a
product of primes, as required.
15
16. 2.Prime Factorization
• Theorem 2.3. Prime Factorization Theorem. Every
integer n ≥ 2 can be written as a product of (one or
more) primes. Moreover, this factorization is unique
except for the order of the factors. That is,
if n = p1p2 · · · pr and n = q1q2 · · · qs ,
where the pi and qj are primes, then r = s and the qj
can be relabeled so that pi = qi for each i.
16
17. 2.Prime Factorization
• Proof. The existence of such a factorization was
shown in Theorem 2.2. To prove uniqueness, we
induction the minimum of r and s. If this is 1, then n
is a prime and the uniqueness follows from Euclid’s
lemma. Otherwise, r ≥ 2 and s ≥ 2. Since
p1|n = q1q2 · · · qs Euclid’s lemma shows that p1 divides
some qj , say p1|q1 (after possible relabeling of the qj ).
But then p1 = q1 because q1 is a prime. Hence n/p1 =
p2p3· · · pr = q2q3 · · · qs , so, by induction,
r − 1 = s − 1 and q2, q3, . . . , qs can be relabeled such
that pi = qi for all i = 2, 3, . . . , r. The theorem follows.
17
18. 2.Prime Factorization
• It follows that every integer n ≥ 2 can be written in
the form n = p1
n
1 p2
n
2 · · · pr
n
r ,where p1, p2, . . . , pr are
distinct primes, ni ≥ 1 for each i, and the pi and ni are
determined uniquely by n. If every ni = 1, we say that
n is square-free, while if n has only one prime
divisor, we call n a prime power.If the prime
factorization
n = p1
n
1 p2
n
2 · · · pr
n
r of an integer n is given, and if d
is a positive divisor of n, then these pi are the only
possible prime divisors of d (by Euclid’s lemma). It
follows that
18
22. 3.Congruences
• Definition 3.1.. If m ≥ 0 is fixed, then integers a and b
are congruent modulo m,denoted by a ≡ b (mod m)
if m | (a – b ). Usually, one assumes that the modulus
m >1 because the cases m = 0 and m = 1 are not very
interesting: if a and b are integers, then a ≡ b (mod 0) if
and only if 0 | (a –b), that is, a = b, and so congruence
mod 0 is ordinary equality.
The congruence a ≡ b (mod 1) is true for every pair of
integers a and b because 1 | (a – b) always. Hence,
every two integers are congruent mod 1.
22
23. 3.Congruences
• If a and b are positive integers, then a ≡ b (mod 10) if
and only if they have the same last digit; more
generally, a ≡ b (mod 10n
)if and only if they have same
last n digits. For example, 526 ≡ 1926 (mod 100).
• London time is 6 hours later than Chicago time. What
time is it in London if it is 10:00 A.M. in Chicago?
Since clocks are set up with 12 hour cycles, this is
really a problem about congruence mod 12. To solve it,
note that 10 + 6 = 16 ≡ 4(mod 12); and so it is 4:00 P.M.
in London.
23
24. 3.Congruences
• Proposition 3.1. If m > 0 is a fixed integer, then for all
integers a, b, c,
(i) a ≡ a (mod m);
(ii) if a ≡ b (mod m), then b ≡ a (mod m);
(iii) if a ≡ b (mod m) and b ≡ c (mod m), then a ≡ c (mod
m).
• Proposition 3.2. Let m > 0 be a fixed integer.
(i) If a = qm + r , then a ≡ r (mod m).
(ii) If 0 ≤ r ’< r < m, then r and r ’are not congruent mod
m; in symbols, r r ’ (mod m).
(iii) a ≡ b (mod m) if and only if a and b leave the same
remainder after dividing by m.
24
25. 3.Congruences
• Proposition 3.3. Let m> 0 be a fixed integer.
(i) If ai ≡ a’i (mod m) for i = 1; 2; … ; n, then
a1 +... + an ≡ a’1 +...+ a’n (mod m):
In particular, if a ≡ a’ (mod m) and b ≡ b’ (mod m),
then
a + b ≡ a’ + b’ (mod m):
(ii) If ai ≡ a’i (mod m) for i = 1; 2; … ; n, then
a1 ... an ≡ a’1 ... a'n (mod m)
In particular, if a ≡ a’ (mod m) and b ≡ b’ (mod m),
then ab ≡ a’b’ (mod m)
(iii) If a ≡ b (mod m), then an
≡ bn
(mod m) for all n >0. 25
27. 3.Congruences
• Theorem 3.5. If (a;m)= 1, then, for every integer b, the
congruence ax ≡ b (mod m) can be solved for x; in fact,
x = sb, where sa ≡ 1 (mod m). Moreover, any two solutions
are congruent mod m.
Proof. Since (a;m)= 1, there is an integer s with
as ≡ 1( mod m) (because there is a linear combination
1 = sa + tm). It follows that b = sab + tmb and
asb ≡ b (mod m), so that x = sb is a solution. (Note that
Proposition 3.2(i) allows us to take s with 1≤ s < m.)
If y is another solution, then ax ≡ ay mod m, and so
m | a(x - y). Since (a;m)= 1, Theorem 1.4 gives m |(x – y);
that is, x ≡ y (mod m).
27
28. 4.Quadratic Residues
• Definition 4.1. If m is a positive integer ,we say that the
integer a is a quadratic residue of m if (a,m) = 1 and the
congruence x2
≡ a (mod m) has a solution.
If the congruence x2
≡ a (mod m) has a no solution, we say a
is quadratic nonresidue of m.
Example. To detemine which integer are quadratic residues of
11, we compute the squares of the integer 1, 2, 3, …, 10.We
find that 12
≡ 102
≡ 1(mod 11), 22
≡ 92
≡ 4 (mod 11), 32
≡ 82
≡ 9
(mod 11), 42
≡ 72
≡ 5 (mod 11), and 52
≡ 62
≡ 3(mod11).
Hence , the quadratic residues of 11 are 1, 3, 4, 5, 9 ;the integer
2,6,7,8,10 are quadratic nonresidues of 11.
28
29. 4.Quadratic Residues
• Lemma 4.1. Let p be odd prime and a an integer not divisible
by p. Then the congruence x2
≡ a (mod p) has either no
solutions or exactly two incongruent solutions modulo p.
• Proof. If x2
≡ a (mod p ) has a solution, say x = x0, then we can
easily demonstrate that x = - x0 is second incongruent solution.
Since (-x0)2
= x0
2
≡ a (mod p ) we see that – x0 is solution. We
note that x0 –x0 (mod p), for if x0 ≡ - x0 (mod p), then we have
2x0 ≡ 0 (mod p). This is impossible since p is odd and p x0
(since x0
2
≡ a (mod p ) and p a ).
To show that there are no more than two incogruent solutions,
assume that x ≡ x0 and x ≡ x1 are both solutions of x2
≡ a (mod
p). Then we have x0
2
≡ x1
2
≡ a (mod p) , so that
29
≡
|/
|/
30. 4.Quadratic Residues
x0
2
- x1
2
= (x0 + x1)(x0- x1) ≡ 0 (mod p).
Hence , p| (x0 +x1) or p | (x0- x1), so that x1 ≡ - x0 (mod p) or
x0 ≡ x1 (mod p). Therefore if there is a solution of x2
≡ a (mod
p), there are exactly two incongruent solution.
Theorem 4.2. If p is an odd prime , then there are exactly
(p-1 )/2 quadratic residues of p and ( p – 1 )/2 quadratic
nonresidues of p among the integer 1, 2, …, p – 1 .
Proof. To find all the quadratic residues of p among the
integers 1, 2, …, p – 1 we compute the least positive residues
modulo p of the squares of the integers 1, 2, p – 1 .
30
31. 4.Quadratic Residues
• Since there are p – 1 squares to consider and since each
congruence x2
≡ a (mod p) has either zero or two solotions ,
there must be exactly ( p – 1 )/2 quadratic residues of p among
the integer 1, 2, …, p – 1 . The remaining p – 1 – ( p – 1 )/2
= ( p – 1 )/2 positive integers less than p – 1 are quadratic
nonresidues of p .
The special notation associaed with quadratic residues is
described in the following definition.
31
W
32. 4.Quadratic Residues
• Definition 4.2. Let p be an odd prime and a an integer not
divisible by p . The Legendre symbol is defined by
• The symbol iz named after the French mathematician
Andrien – Marie Legendre who introduced the use of this
notation
32
1
1
if a iz quadraticresidueof pa
if aiz aquadratic nonresidueof pp
= ÷
−
34. 4.Quadratic Residues
We now present a criterion for deciding whether an integer is
a quadratic residue of prime. This criterion is useful in
demonstraing propeties of the Legendre symbol.
Theorem 4.3. Euler’s Criterion.
Let p be an odd prime and let a be positive integer not
divisible by p. Then
34
( 1)/ 2
(mod ).pa
a p
p
−
≡ ÷
35. 4.Quadratic Residues
Proof.
Firt ,assume that .Then , the congruence x2
≡ a (mod p)
has a solution, say x = x0. Using Fermat’s little theorem , we see
that
Hence,if ,we know that
35
1
a
p
= ÷
( 1)/2 2 ( 1)/2 1
0 0( ) 1(mod )p p p
a x x p− − −
= = ≡
1
a
p
= ÷
( 1)/ 2
(mod )pa
a p
p
−
≡ ÷
36. 4.Quadratic Residues
• Now cosider the case where .Then , the congruence
x2
≡ a (mod p) has no solutions. For each integer i such that
1≤i≤p-1, there is a unique integer j with 1≤j≤p-1, such that
ij ≡ a (mod p ). Furthermore , since the congruence x2
≡ a
(mod p) has no solutions, we know that i≠j. Thus, we can
group the integer 1, 2,…, p - 1 into (p – 1 )/2 pairs each with
product a . Multiplying these pairs together, we find that
(p – 1 )! ≡ a (p–1)/2
(mod p).Since Wilson’s theorem tell us that
(p – 1 )!≡ - 1 (mod p), we see that – 1 ≡ a (p-1 )/2
(mod p) .In this
case, we also have
36
1
a
p
= − ÷
( 1)/ 2
(mod ).pa
a p
p
−
≡ ÷
37. 4.Quadratic Residues
Theorem 4.4. Let p be an odd prime and a and b integers not
divisible by p.Then
37
2
) (mod ), .
) .
) 1.
a b
i if a b p then
p p
a b ab
ii
p p p
a
iii
p
≡ = ÷ ÷
= ÷ ÷ ÷
= ÷
38. 4.Quadratic Residues
Proof.
i) If a ≡ b (mod p ) then x2
≡ a (mod p) has s solution if an
only if x2
≡ b (mod p) has solution.Hence .
ii) By Euler’s criterion we know that
38
a b
p p
= ÷ ÷
( 1)/ 2 ( 1)/ 2
( 1)/2
(mod ) , (mod )
( ) (mod )
p p
p
a b
a p b p
p p
ab
ab p
p
− −
−
≡ ≡ ÷ ÷
≡ ÷
39. 4.Quadratic Residues
Hence ,
Since the only posible values of a Lagendre symbol are ±1, we
conclude that
39
( 1)/ 2 ( 1)/2 ( 1)/2
( ) (mod )p p pa b ab
a b ab p
p p p
− − −
≡ = ≡ ÷ ÷ ÷
a b ab
p p p
= ÷ ÷ ÷
40. 4.Quadratic Residues
• iii) Since , from part (ii) it folows that
40
1
a
p
= ± ÷
2
1
a a a
p p p
= = ÷ ÷ ÷
42. How the Algorithm Works
Start with two integers for which you want to
find the GCD. Apply the division algorithm,
dividing the smaller number into the larger.
Example: a = 320, b = 296.
320 = 296 · 1 + 24
The first quotient is q0 and the first remainder
is r0.
43. How the Algorithm Works (cont.)
If you get a remainder of 0, stop. If not, the
divisor from the previous step becomes the
dividend of the next step. The remainder
from the previous step becomes the divisor of
the previous step.
320 = 296 · 1 + 24
296 = 24 · 12 + 8
Continue until you get a remainder of 0.
44. The Completed Algorithm
• 320 = 296 · 1 + 24
• 296 = 24 · 12 + 8
• 24 = 8 · 3 + 0
• We get a remainder of 0, so we stop. The last
nonzero remainder is the GCD, so (320, 296) is
equal to 8.
46. The Euclidean Algorithm and Bézout’s
Theorem
We can use the Euclidean Algorithm to find
the integers U and V from Bézout’s Theorem.
As an example, let’s use the Euclidean
Algorithm to show that (324, 148) = 4.
324 = 148 · 2 + 28
148 = 28 · 5 + 8
28 = 8 · 3 + 4
8 = 4 · 2 + 0
47. Finding U and V
• We want to find integers U and V such that
4 = 324U + 148V.
• Take all of the equations (except the last one)
and solve for the remainder.
• 28 = 324 – 148 · 2
• 8 = 148 – 28 · 5
• 4 = 28 – 8 · 3
48. Back-Substitution
• Notice that the last equation expresses 4 as a
linear combination of 28 and 8.
• 4 = 28 · 1 + 8 · (-3)
• This is not what we want, however. So we use
the previous equation (which has been solved
for 8) to substitute.
49. Back-Substitution (cont.)
• 4 = 28 · 1 + (148 – 28 · 5) · (-3)
• Now we want to rearrange this so that 4 is
expressed as a linear combination of 28 and
148 (still not quite what we want, but getting
closer)
• We get 4 = 28 · 16 + 148 · (-3)
50. Back-Substitution (cont.)
Now use the previous equation (which has
been solved for 28) to substitute.
We get 4 = (324 – 148 · 2) · 16 + 148 · (-3)
Once again, multiply out and rearrange until
we get 4 expressed as a linear combination of
324 and 148.
4 = 324 · 16 + 148 · (-35)
51. Another Example
• Use the Euclidean Algorithm to show that
(15, 36) = 3.
• Use back-substitution to find integers U and V
so that 3 = 15U + 36V.
53. 53
Introduction to Number Theory
•Number theory is about integers and their properties.
•We will start with the basic principles of
• divisibility,
• greatest common divisors,
• least common multiples, and
• modular arithmetic
•and look at some relevant algorithms.
54. 54
Division
•If a and b are integers with a ≠ 0, we say that
a divides b if there is an integer c so that b = ac.
•When a divides b we say that a is a factor of b and that b
is a multiple of a.
•The notation a | b means that a divides b.
•We write a X b when a does not divide b
•(see book for correct symbol).
55. 55
Divisibility Theorems
•For integers a, b, and c it is true that
• if a | b and a | c, then a | (b + c)
• Example: 3 | 6 and 3 | 9, so 3 | 15.
• if a | b, then a | bc for all integers c
• Example: 5 | 10, so 5 | 20, 5 | 30, 5 | 40, …
• if a | b and b | c, then a | c
• Example: 4 | 8 and 8 | 24, so 4 | 24.
•
56. 56
Primes
•A positive integer p greater than 1 is called prime if the
only positive factors of p are 1 and p.
•A positive integer that is greater than 1 and is not prime
is called composite.
•The fundamental theorem of arithmetic:
•Every positive integer can be written uniquely as the
product of primes, where the prime factors are written in
order of increasing size.
58. 58
Primes
•If n is a composite integer, then n has a prime divisor
less than or equal .
•This is easy to see: if n is a composite integer, it must
have two prime divisors p1 and p2 such that p1⋅p2 = n.
•p1 and p2 cannot both be greater than
• , because then p1⋅p2 > n.
n
n
59. 59
The Division Algorithm
•Let a be an integer and d a positive integer.
•Then there are unique integers q and r, with
0 ≤ r < d, such that a = dq + r.
•In the above equation,
• d is called the divisor,
• a is called the dividend,
• q is called the quotient, and
• r is called the remainder.
60. 60
The Division Algorithm
•Example:
•When we divide 17 by 5, we have
•17 = 5⋅3 + 2.
• 17 is the dividend,
• 5 is the divisor,
• 3 is called the quotient, and
• 2 is called the remainder.
61. 61
The Division Algorithm
•Another example:
•What happens when we divide -11 by 3 ?
•Note that the remainder cannot be negative.
•-11 = 3⋅(-4) + 1.
• -11 is the dividend,
• 3 is the divisor,
• -4 is called the quotient, and
• 1 is called the remainder.
62. 62
Greatest Common Divisors
•Let a and b be integers, not both zero.
•The largest integer d such that d | a and d | b is called
the greatest common divisor of a and b.
•The greatest common divisor of a and b is denoted by
gcd(a, b).
•Example 1: What is gcd(48, 72) ?
•The positive common divisors of 48 and 72 are
1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48, 72) = 24.
•Example 2: What is gcd(19, 72) ?
•The only positive common divisor of 19 and 72 is
1, so gcd(19, 72) = 1.
63. 63
Greatest Common Divisors
•Using prime factorizations:
•a = p1
a
1 p2
a
2 … pn
a
n , b = p1
b
1 p2
b
2 … pn
b
n ,
•where p1 < p2 < … < pn and ai, bi ∈ N for 1 ≤ i ≤ n
•gcd(a, b) = p1
min(a
1
,b
1
)
p2
min(a
2
,b
2
)
… pn
min(a
n
,b
n
)
•Example:
a = 60 =a = 60 = 2222
3311
5511
b = 54 =b = 54 = 2211
3333
5500
gcd(a, b) =gcd(a, b) = 2211
3311
5500
= 6= 6
64. 64
Relatively Prime Integers
•Definition:
•Two integers a and b are relatively prime if
gcd(a, b) = 1.
•Examples:
•Are 15 and 28 relatively prime?
•Yes, gcd(15, 28) = 1.
•Are 55 and 28 relatively prime?
•Yes, gcd(55, 28) = 1.
•Are 35 and 28 relatively prime?
•No, gcd(35, 28) = 7.
65. Fall 2002 CMSC 203 - Discrete Structures 65
Relatively Prime Integers
•Definition:
•The integers a1, a2, …, an are pairwise relatively prime if
gcd(ai, aj) = 1 whenever 1 ≤ i < j ≤ n.
•Examples:
•Are 15, 17, and 27 pairwise relatively prime?
•No, because gcd(15, 27) = 3.
•Are 15, 17, and 28 pairwise relatively prime?
•Yes, because gcd(15, 17) = 1, gcd(15, 28) = 1 and gcd(17,
28) = 1.
66. Fall 2002 CMSC 203 - Discrete Structures 66
Least Common Multiples
•Definition:
•The least common multiple of the positive integers a and
b is the smallest positive integer that is divisible by both a
and b.
•We denote the least common multiple of a and b by
lcm(a, b).
•Examples:
lcm(3, 7) =lcm(3, 7) = 2121
lcm(4, 6) =lcm(4, 6) = 1212
lcm(5, 10) =lcm(5, 10) = 1010
67. Fall 2002 CMSC 203 - Discrete Structures 67
Least Common Multiples
•Using prime factorizations:
•a = p1
a
1 p2
a
2 … pn
a
n , b = p1
b
1 p2
b
2 … pn
b
n ,
•where p1 < p2 < … < pn and ai, bi ∈ N for 1 ≤ i ≤ n
•lcm(a, b) = p1
max(a
1
,b
1
)
p2
max(a
2
,b
2
)
… pn
max(a
n
,b
n
)
•Example:
a = 60 =a = 60 = 2222
3311
5511
b = 54 =b = 54 = 2211
3333
5500
lcm(a, b) =lcm(a, b) = 2222
3333
5511
= 4275 = 540= 4275 = 540
68. Fall 2002 CMSC 203 - Discrete Structures 68
GCD and LCM
a = 60 =a = 60 = 2222
3311
5511
b = 54 =b = 54 = 2211
3333
5500
lcm(a, b) =lcm(a, b) = 2222
3333
5511
= 540= 540
gcd(a, b) =gcd(a, b) = 2211
3311
5500
= 6= 6
Theorem: ab =Theorem: ab = gcd(a,b)lcm(a,b)gcd(a,b)lcm(a,b)
69. Fall 2002 CMSC 203 - Discrete Structures 69
Modular Arithmetic
•Let a be an integer and m be a positive integer.
We denote by a mod m the remainder when a is divided
by m.
•Examples:
9 mod 4 =9 mod 4 = 11
9 mod 3 =9 mod 3 = 00
9 mod 10 =9 mod 10 = 99
-13 mod 4 =-13 mod 4 = 33
70. Fall 2002 CMSC 203 - Discrete Structures 70
Congruences
•Let a and b be integers and m be a positive integer. We
say that a is congruent to b modulo m if
m divides a – b.
•We use the notation a ≡ b (mod m) to indicate that a is
congruent to b modulo m.
•In other words:
a ≡ b (mod m) if and only if a mod m = b mod m.
71. Fall 2002 CMSC 203 - Discrete Structures 71
Congruences
•Examples:
•Is it true that 46 ≡ 68 (mod 11) ?
•Yes, because 11 | (46 – 68).
•Is it true that 46 ≡ 68 (mod 22)?
•Yes, because 22 | (46 – 68).
•For which integers z is it true that z ≡ 12 (mod 10)?
•It is true for any z∈{…,-28, -18, -8, 2, 12, 22, 32, …}
•Theorem: Let m be a positive integer. The integers a and b
are congruent modulo m if and only if there is an integer k
such that a = b + km.
72. Fall 2002 CMSC 203 - Discrete Structures 72
Congruences
•Theorem: Let m be a positive integer.
If a ≡ b (mod m) and c ≡ d (mod m), then
a + c ≡ b + d (mod m) and ac ≡ bd (mod m).
•Proof:
•We know that a ≡ b (mod m) and c ≡ d (mod m) implies
that there are integers s and t with
b = a + sm and d = c + tm.
•Therefore,
•b + d = (a + sm) + (c + tm) = (a + c) + m(s + t) and
•bd = (a + sm)(c + tm) = ac + m(at + cs + stm).
•Hence, a + c ≡ b + d (mod m) and ac ≡ bd (mod m).
73. Fall 2002 CMSC 203 - Discrete Structures 73
The Euclidean Algorithm
•The Euclidean Algorithm finds the greatest common
divisor of two integers a and b.
•For example, if we want to find gcd(287, 91), we divide
287 by 91:
•287 = 91⋅3 + 14
•We know that for integers a, b and c,
if a | b and a | c, then a | (b + c).
•Therefore, any divisor of 287 and 91 must also be a
divisor of 287 - 91⋅3 = 14.
•Consequently, gcd(287, 91) = gcd(14, 91).
74. Fall 2002 CMSC 203 - Discrete Structures 74
The Euclidean Algorithm
•In the next step, we divide 91 by 14:
•91 = 14⋅6 + 7
•This means that gcd(14, 91) = gcd(14, 7).
•So we divide 14 by 7:
•14 = 7⋅2 + 0
•We find that 7 | 14, and thus gcd(14, 7) = 7.
•Therefore, gcd(287, 91) = 7.
75. 75
The Euclidean Algorithm
•In pseudocode, the algorithm can be implemented as
follows:
•procedure gcd(a, b: positive integers)
•x := a
•y := b
•while y ≠ 0
•begin
• r := x mod y
• x := y
• y := r
•end {x is gcd(a, b)}
76. 76
Representations of Integers
•Let b be a positive integer greater than 1.
Then if n is a positive integer, it can be expressed uniquely
in the form:
•n = akbk
+ ak-1bk-1
+ … + a1b + a0,
•where k is a nonnegative integer,
•a0, a1, …, ak are nonnegative integers less than b,
•and ak ≠ 0.
•Example for b=10:
•859 = 8⋅102
+ 5⋅101
+ 9⋅100
77. 77
Representations of Integers
•Example for b=2 (binary expansion):
•(10110)2 = 1⋅24
+ 1⋅22
+ 1⋅21
= (22)10
•Example for b=16 (hexadecimal expansion):
•(we use letters A to F to indicate numbers 10 to 15)
•(3A0F)16 = 3⋅163
+ 10⋅162
+ 15⋅160
= (14863)10
•
78. 78
Representations of Integers
•How can we construct the base b expansion of an integer
n?
•First, divide n by b to obtain a quotient q0 and remainder a0,
that is,
•n = bq0 + a0, where 0 ≤ a0 < b.
•The remainder a0 is the rightmost digit in the base b
expansion of n.
•Next, divide q0 by b to obtain:
•q0 = bq1 + a1, where 0 ≤ a1 < b.
•a1 is the second digit from the right in the base b expansion
of n. Continue this process until you obtain a quotient equal
to zero.
79. 79
Representations of Integers
•Example:
What is the base 8 expansion of (12345)10 ?
•First, divide 12345 by 8:
•12345 = 8⋅1543 + 1
•1543 = 8⋅192 + 7
•192 = 8⋅24 + 0
•24 = 8⋅3 + 0
•3 = 8⋅0 + 3
•The result is: (12345)10 = (30071)8.
80. 80
Representations of Integers
•procedure base_b_expansion(n, b: positive integers)
•q := n
•k := 0
•while q ≠ 0
•begin
• ak := q mod b
• q := q/b
• k := k + 1
•end
•{the base b expansion of n is (ak-1 … a1a0)b}
81. 81
Addition of Integers
•Let a = (an-1an-2…a1a0)2, b = (bn-1bn-2…b1b0)2.
•How can we add these two binary numbers?
•First, add their rightmost bits:
•a0 + b0 = c0⋅2 + s0,
•where s0 is the rightmost bit in the binary expansion of a
+ b, and c0 is the carry.
•Then, add the next pair of bits and the carry:
•a1 + b1+ c0 = c1⋅2 + s1,
•where s1 is the next bit in the binary expansion of a + b,
and c1 is the carry.
82. 82
Addition of Integers
•Continue this process until you obtain cn-1.
•The leading bit of the sum is sn = cn-1.
•The result is:
•a + b = (snsn-1…s1s0)2
83. 83
Addition of Integers
•Example:
•Add a = (1110)2 and b = (1011)2.
•a0 + b0 = 0 + 1 = 0⋅2 + 1, so that c0 = 0 and s0 = 1.
•a1 + b1+ c0 = 1 + 1 + 0 = 1⋅2 + 0, so c1 = 1 and s1 = 0.
•a2 + b2+ c1 = 1 + 0 + 1 = 1⋅2 + 0, so c2 = 1 and s2 = 0.
•a3 + b3+ c2 = 1 + 1 + 1 = 1⋅2 + 1, so c3 = 1 and s3 = 1.
•s4 = c3 = 1.
•Therefore, s = a + b = (11001)2.
84. 84
Addition of Integers
•How do we (humans) add two integers?
•Example: 7583
+ 4932
5511552211
111111 carrycarry
Binary expansions:Binary expansions: (1011)(1011)22
++ (1010)(1010)22
1100
carrycarry11
1100
11
11(( ))22
85. 85
Addition of Integers
•Let a = (an-1an-2…a1a0)2, b = (bn-1bn-2…b1b0)2.
•How can we algorithmically add these two binary
numbers?
•First, add their rightmost bits:
•a0 + b0 = c0⋅2 + s0,
•where s0 is the rightmost bit in the binary expansion of a
+ b, and c0 is the carry.
•Then, add the next pair of bits and the carry:
•a1 + b1+ c0 = c1⋅2 + s1,
•where s1 is the next bit in the binary expansion of a + b,
and c1 is the carry.
86. 86
Addition of Integers
•Continue this process until you obtain cn-1.
•The leading bit of the sum is sn = cn-1.
•The result is:
•a + b = (snsn-1…s1s0)2
87. 87
Addition of Integers
•Example:
•Add a = (1110)2 and b = (1011)2.
•a0 + b0 = 0 + 1 = 0⋅2 + 1, so that c0 = 0 and s0 = 1.
•a1 + b1+ c0 = 1 + 1 + 0 = 1⋅2 + 0, so c1 = 1 and s1 = 0.
•a2 + b2+ c1 = 1 + 0 + 1 = 1⋅2 + 0, so c2 = 1 and s2 = 0.
•a3 + b3+ c2 = 1 + 1 + 1 = 1⋅2 + 1, so c3 = 1 and s3 = 1.
•s4 = c3 = 1.
•Therefore, s = a + b = (11001)2.
88. 88
Addition of Integers
•procedure add(a, b: positive integers)
•c := 0
•for j := 0 to n-1
•begin
• d := (aj + bj + c)/2
• sj := aj + bj + c – 2d
• c := d
•end
•sn := c
•{the binary expansion of the sum is (snsn-1…s1s0)2}
90. 90
Mathematical Induction: ExampleMathematical Induction: Example
Show that any postage of ≥ 8¢ can be
obtained using 3¢ and 5¢ stamps.
First check for a few particular values:
8¢ = 3¢ + 5¢
9¢ = 3¢ + 3¢ + 3¢
10¢ = 5¢ + 5¢
11¢ = 5¢ + 3¢ + 3¢
12¢ = 3¢ + 3¢ + 3¢ + 3¢
How to generalize this?
91. 91
Mathematical Induction: ExampleMathematical Induction: Example
• Let P(n) be the sentence “n cents postage can be
obtained using 3¢ and 5¢ stamps”.
• Want to show that
“P(k) is true” implies “P(k+1) is true”
for any k ≥ 8¢.
• 2 cases: 1) P(k) is true and
the k cents contain at least one 5¢.
2) P(k) is true and
the k cents do not contain any 5¢.
92. 92
Mathematical Induction: ExampleMathematical Induction: Example
• Case 1: k cents contain at least one 5¢ coin.
• Case 2: k cents do not contain any 5¢ coin.
Then there are at least three 3¢ coins.
5¢ 3¢ 3¢
Replace 5¢ coin
by two 3¢ coinsk cents k+1 cents
3¢
3¢
3¢ 5¢ 5¢
Replace three
3¢ coins by two
5¢ coins
k cents k+1 cents
93. 93
Domino EffectDomino Effect
• Mathematical induction works like domino
effect:
• Let P(n) be “The nth domino falls backward”.
• If (a) “P(1) is true”;
(b) “P(k) is true” implies “P(k+1) is true”
Then P(n) is true for every n
94. 94
Principle of MathematicalPrinciple of Mathematical
InductionInduction
Let P(n) be a predicate defined for
integers n.
Suppose the following statements are true:
1. Basis step:
P(a) is true for some fixed a∈Z .
2. Inductive step: For all integers k ≥ a,
if P(k) is true then P(k+1) is true.
Then for all integers n ≥ a, P(n) is true.
95. 95
Example: Sum of Odd IntegersExample: Sum of Odd Integers
Proposition: 1 + 3 + … + (2n-1) = n2
for all integers n≥1.
Proof (by induction):
1) Basis step:
The statement is true for n=1: 1=12
.
2) Inductive step:
Assume the statement is true for some k≥1
(inductive hypothesis) ,
show that it is true for k+1 .
96. Example: Sum of Odd IntegersExample: Sum of Odd Integers
Proof (cont.):
The statement is true for k:
1+3+…+(2k-1) = k2
(1)
We need to show it for k+1:
1+3+…+(2(k+1)-1) = (k+1)2
(2)
Showing (2):
1+3+…+(2(k+1)-1) = 1+3+…+(2k+1) =
1+3+…+(2k-1)+(2k+1) =
k2
+(2k+1) = (k+1)2
.
We proved the basis and inductive steps,
so we conclude that the given statement true. ■
by (1)
97. 97
Important theorems proved byImportant theorems proved by
mathematical inductionmathematical induction
Theorem 1 (Sum of the first n integers):
For all integers n≥1,
Theorem 2 (Sum of a geometric sequence):
For any real number r except 1, and any
integer n≥0,
2
)1(
...21
+
=+++
nn
n
1
11
0 −
−
=
+
=
∑ r
r
r
nn
i
i
98. 98
Example
(of sum of the first n integers)
In a round-robin tournament each of the n
teams plays every other team exactly once.
What is the total number of games played?
Solution on the board.
99. 99
Proving a divisibility property byProving a divisibility property by
mathematical inductionmathematical induction
• Proposition: For any integer n≥1,
7n
- 2n
is divisible by 5. (P(n))
• Proof (by induction):
1) Basis step:
The statement is true for n=1: (P(1))
71
– 21
= 7 - 2 = 5 is divisible by 5.
2) Inductive step:
Assume the statement is true for some k≥1 (P(k))
(inductive hypothesis) ;
show that it is true for k+1 . (P(k+1))
100. 100
Proving a divisibility property byProving a divisibility property by
mathematical inductionmathematical induction
Proof (cont.): We are given that
P(k): 7k
- 2k
is divisible by 5. (1)
Then 7k
- 2k
= 5a for some a∈Z . (by definition) (2)
We need to show:
P(k+1): 7k+1
- 2k+1
is divisible by 5. (3)
7k+1
- 2k+1
= 7·7k
- 2·2k
= 5·7k
+ 2·7k
- 2·2k
= 5·7k
+ 2·(7k
- 2k
) = 5·7k
+ 2·5a (by (2))
= 5·(7k
+ 2a) which is divisible by 5. (by def.)
Thus, P(n) is true by induction. ■