(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

Size: px
Start display at page:

Download "(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 )."

Transcription

1 CMPSCI611: Verifying Polynomial Identities Lecture 13 Here is a problem that has a polynomial-time randomized solution, but so far no poly-time deterministic solution. Let F be any field and let Q(x 1,..., x n ) be a polynomial of degree d in n different variables. We are not necessarily given Q in its standard form as a sum of monomials! It may be, for example, an arithmetic product of polynomials which when computed out would be too big for us to represent. All we are guaranteed is that we can evaluate this polynomial given specific values of each of the variables. Our problem is to decide whether Q is identically zero, meaning that it is equal to the zero polynomial as a polynomial (we write this Q 0 ). The problem would be trivial if Q were in standard form but consider the polynomial (x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ). When we multiply this out, everything cancels and we get zero. But in general, the computation of the standard form of an expression of length n is not a polynomialtime operation, simply because the output might take too long to write down. 1

2 Testing for zero is really the same problem as taking two polynomials in this form and testing whether they are equal, since Q Q iff Q Q 0. (If we can evaluate both Q(z 1,..., z n ) and Q (z 1,..., z n ), we can certainly evaluate their difference.) We ll also see an application of this problem to graph theory in a bit. The main idea of Schwartz algorithm (used, for example, by the Maple symbolic algebra system) is a simple one. We choose a value z i for each variable x i at random, and evaluate Q(z 1,..., z n ). If Q 0, we will always get an answer of 0. If Q 0, however, it seems reasonable that we should get a fairly random answer, and thus we are likely to get a nonzero result, which will prove that Q 0. It is possible for a function to be zero most of the time without being identically zero, of course, but we will show that a polynomial cannot do so, at least over an infinite field or a field larger than the degree of the polynomial. 2

3 One round of Schwartz algorithm proceeds as follows: Choose a set S of m distinct field values. Choose z 1,..., z n each uniformly from S, independently. Evaluate Q(z 1,..., z n ). If you get 0, return true, else return false. As we said, if Q 0 we will return true with probability 1. We need to analyze the probability of returning true if Q is a nonzero polynomial of degree d in fact we will show that this probability is d/m. Since m is under our control (as long as the field has enough elements), we can use repeated trials of the basic algorithm to reduce our error probability. If we ever get a result of false we know it is correct, and if we get true many times in a row we know that either Q 0 or we have been very unlucky in our random choices we ll examine the question of how unlucky soon. 3

4 Let s first consider the case where n = 1, that is, Q is a polynomial of degree d in a single variable. We know something about such polynomials over any field they can have at most d different roots. (Why? For each root r, the linear polynomial x r must divide Q. Over a field, this means that the product of the linear polynomials for each root must also divide Q, and the degree of this product is exactly the number of roots.) It was pointed out in class that field is not exactly the algebraic property we need, though it is sufficient. The polynomials over a field are not a field, for example, because you cannot divide. For any Q(x) of degree d and any S of size m, the greatest chance of getting Q(z 1 ) = 0 is if Q has d roots and all of them happen to be in S. In this case the probability is d/m, and in any other case it is less. So we have established the bound we want in the special case n = 1. We will prove the d/m bound for n variables by induction on n. So we assume as inductive hypothesis that for any d and any polynomial R of degree d on n 1 variables, the probability that R(z 1,..., z n 1 ) = 0 for random z i s is at most d/m. 4

5 Here is a bad argument that gets at the central idea of the correct argument. Consider any sequence of values z 2,..., z n each chosen from S. If we substitute these values into Q, we get a polynomial Q(x 1, z 2,..., z n ) in the single variable x 1, and this polynomial has degree at most d. By our argument for the one-variable case, our probability of getting Q = 0 is at most d/m. The probability that Schwartz algorithm fails is the average, over all possible sequences (z 2,..., z n ), of the probability of getting 0 from that sequence. The average of these m n 1 numbers, that are each at most d/m, must itself be at most d/m. Do you see the flaw in the argument? The probability of a one-variable polynomial being 0 is bounded by d/m only if that polynomial is not itself the zero polynomial! There is no reason that a particular sequence of z values might not cause every coefficient of Q to become zero, and hence cause all the values of z 1 to lead to Q(z 1,..., z n ) being zero. 5

6 So our m n 1 individual probabilities are not all bounded by d/m, as some of them may be 1. But our correct argument will put a bound on the number that are 1, in order to show that the average of all the numbers is really at most d/m. Let s rewrite Q as a polynomial in x 1, whose coefficients are polynomials in the other n 1 variables: Q = Q k x k 1 + Q k 1 x k Q 1 x 1 + Q 0 Here k is the maximum degree of x 1 in any term of Q. Note that the degree of the polynomial Q k (z 2,..., z n ) must be at most d k, since there are no terms in Q of degree greater than d. How could a setting of (z 2,..., z n ) cause Q to become the zero polynomial? A necessary, but not sufficient condition, is that Q k (z 2,..., z n ) be zero. But by our inductive hypothesis, we know that the probability of this event is bounded above by (d k)/m, because Q k has degree at most d k and Q k has only n 1 variables. 6

7 Let s look again at our m n 1 individual probabilities. At most a (d k)/m fraction of them might be 1. The others are each at most d/m, as we said, but we can do better. Since the degree of Q in the variable x 1 is exactly k, if the values of the z i s cause Q to become nonzero they cause it to have degree at most k. Thus the probability that the choice of z 1 causes Q(z 1,..., z n ) to be 0 is at most k/m. We have the average of m n 1 probabilities, which is the sum of those probabilities divided by m n 1. The sum of the ones, divided by m n 1, is at most (d k)/m. The sum of the others, divided by m n 1, is at most k/m because each of them is at most k m. Our total probability is thus at most d/m, completing our inductive step and thus our proof. 7

8 If we want to ensure that the probability of a wrong answer is at most ɛ, then we can set m to be 2d (assuming that there are enough elements in F ) and run the basic Schwartz algorithm t = log 2 (1/ɛ) times. The only way we can get a wrong answer is if Q 0 and each of the trials accidently gave us a value of zero. Since each trial fails with probability at most d/m = 1/2, the probability of an overall failure is at most 2 t = ɛ, as desired. Remember that setting t to 1000, or even 100, drives the error probability low enough that it becomes insignificant next to other possible bad events like a large meteorite landing on the computer during the calculation. Remember also that this amplification of probabilities only works when the probability of success that we start with is nontrivial, in particular at least an inverse polynomial 1/p(n). If the probability of failure is 1 f(n), then the probability of t consecutive failures is (1 f(n)) t or approximately e tf(n). For this to be a small probability, tf(n) must be at least 1, which is to say that t must be at least 1/f(n). 8

9 When we study NP-complete problems, we will see problems that have randomized algorithms with a very small probability of success such as 2 n. For example, in the SATISFIABILITY problem our input is a boolean formula in n variables and we ask whether there is any setting of the n variables that makes the formula true. It is certainly possible that only one of the 2 n settings makes the formula true, so that choosing a random setting has only a 2 n probability of success. In this case t trials would have at most a t2 n probability of success, which is vanishingly small for any reasonable t. 9

10 This analysis depended on the fact that the basic Schwartz algorithm has only one-sided error it can return true when the right answer is false, but not vice-versa. Thus repeated trials could fail only if each individual trial fails, and we can multiply the individual failure probabilities to get the overall failure probability. If we have a randomized Monte Carlo algorithm with two-sided error, meaning that no individual answer can be trusted, the analysis of repeated trials is different. If the answer is a bit and our failure probability is significantly less than 1/2, at most 1/2 1/p(n) for some polynomial p, it turns out that taking the majority result of a sufficiently large polynomial number of repeated trials is overwhelmingly likely to be correct. If the basic failure probability is something like 1/2 2 n, however, a polynomial number of repeated trials don t help much. 10

11 CMPSCI611: Perfect Matchings Again Lecture 13 We can apply the Schwartz algorithm to verify polynomial identities in a familiar setting the problem of determining whether a matching exists in a bipartite graph. Given G = (U, V, E), we can construct a polynomial that is identically zero iff G does not have a perfect matching. Thus the Schwartz algorithm can be used to either: Prove that the graph has a perfect matching, or Give us arbitrarily high confidence that it does not, given enough independent trials of the basic algorithm. In the first case, the Schwartz algorithm will not give us a perfect matching in the graph, only assurance that it exists. 11

12 The polynomial we must test is the determinant of a particular matrix. Given any n by n matrix A, the determinant is defined to be a particular sum of products of matrix entries. For every bijection σ from the set {1,..., n} to itself (every permutation), we form the product of the entries A i,σ(i) for each i. Then we add these products together with coefficient 1 if σ is an even permutation and 1 if it is an odd permutation. (What do these last two terms mean? Any permutation can be written as a product (composition) of tranpositions, permutations that swap two elements and keep the others fixed. The various products resulting in a given permutation are either all odd or all even, and we call the permutation odd or even accordingly. A k-cycle, which is a permutation that takes some a 1 to a 2, a 2 to a 3, etc., until it takes a k to a 1, is odd if k is even and even if k is odd.) 12

13 So the determinant of a 2 by 2 A is a 11 a 22 a 12 a 21, and the determinant of a 3 by 3 A is a 11 a 22 a 33 a 11 a 32 a 23 + a 12 a 23 a 31 a 12 a 21 a 33 + a 13 a 32 a 21 a 13 a 31 a 22. For general n by n this definition does not give a good way to compute the determinant because there are n! different permutations to consider. But there are two good ways to compute it more quickly: The row operations of Gaussian elimination do not change the determinant, except for swapping rows which multiplies it by 1. So we can transform the original matrix to an upper triangular matrix by a polynomial number of these operations, counting the number of times we swap rows. The determinant of an upper triangular matrix is just the product of the entries on its main diagonal. There is a general method, which we won t cover here, to express the determinant of A as one entry of the product of some matrices derived from A. This means that we can in principle find the determinant in subcubic time, or find it quickly in parallel. 13

14 Both of these methods assume that we are carrying out the matrix operation over a field in which entries can be stored, added, and multiplied quickly. The integers, integers modulo p, real numbers, and the complex numbers are such fields, and polynomials over one variable (even O(1) variables) still allow these operations even though they do not form a field. But as we have seen, simple operations on polynomials over many variables may produce answers that we can no longer store or manipulate easily. Let s return to the perfect matching problem on a bipartite graph G = (U, V, E), where U = V = n. Define the following n by n matrix A the (i, j) entry is the variable x ij if there is an edge from vertex i of U to vertex j of V, and 0 otherwise. Look at the determinant of this matrix. Any permutation σ represents a bijection from U to V. If this bijection corresponds to a matching in E, then every entry a i,σ(i) is nonzero and the product of these entries becomes a term in the determinant of A, with either a plus or minus sign. 14

15 Furthermore, if this term for σ appears in the determinant it cannot be canceled by any other term. This is because each term contains n variables, and no two contain exactly the same variables. (If σ τ, there must be some variable x i,σ(i) that is not x i,τ(i).) So given G, we test whether G has a perfect matching by repeatedly choosing random values from some set S, for each x ij, getting a matrix of field elements, and evaluating the determinant of that matrix. If we ever get a nonzero value, a perfect matching exists, and if we keep getting nonzero values we build our confidence that no perfect matching exists. 15

16 How does the time of this algorithm compare with our other methods to test for perfect matchings? The network flow method takes O(e 2 n) = O(n 5 ) time as we presented it, or O(n 3 ) by a more complicated algorithm that we did not present. Finding the determinant (as we didn t prove) takes O(n 3 ) by the standard method of matrix multiplication or o(n 3 ) by faster methods. So the new method is not clearly better for sequential machines, but it does allow for a fast parallel algorithm where network flow, as far as we know, doesn t. (Note finally that the Adler notes are quoting running time in terms of n as the whole input size, not the number of vertices. So they refer to the times of my O(n 3 ) algorithms as O(n 3/2 ). ) 16

CPSC 536N: Randomized Algorithms Term 2. Lecture 9

CPSC 536N: Randomized Algorithms Term 2. Lecture 9 CPSC 536N: Randomized Algorithms 2011-12 Term 2 Prof. Nick Harvey Lecture 9 University of British Columbia 1 Polynomial Identity Testing In the first lecture we discussed the problem of testing equality

More information

Lecture 2: January 18

Lecture 2: January 18 CS271 Randomness & Computation Spring 2018 Instructor: Alistair Sinclair Lecture 2: January 18 Disclaimer: These notes have not been subjected to the usual scrutiny accorded to formal publications. They

More information

Randomized Algorithms

Randomized Algorithms Randomized Algorithms Prof. Tapio Elomaa tapio.elomaa@tut.fi Course Basics A new 4 credit unit course Part of Theoretical Computer Science courses at the Department of Mathematics There will be 4 hours

More information

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010 CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010 So far our notion of realistic computation has been completely deterministic: The Turing Machine

More information

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.] Math 43 Review Notes [Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty Dot Product If v (v, v, v 3 and w (w, w, w 3, then the

More information

Lecture 7: Schwartz-Zippel Lemma, Perfect Matching. 1.1 Polynomial Identity Testing and Schwartz-Zippel Lemma

Lecture 7: Schwartz-Zippel Lemma, Perfect Matching. 1.1 Polynomial Identity Testing and Schwartz-Zippel Lemma CSE 521: Design and Analysis of Algorithms I Winter 2017 Lecture 7: Schwartz-Zippel Lemma, Perfect Matching Lecturer: Shayan Oveis Gharan 01/30/2017 Scribe: Philip Cho Disclaimer: These notes have not

More information

Chapter 1 Review of Equations and Inequalities

Chapter 1 Review of Equations and Inequalities Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve

More information

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3 Linear Algebra Row Reduced Echelon Form Techniques for solving systems of linear equations lie at the heart of linear algebra. In high school we learn to solve systems with or variables using elimination

More information

Advanced Combinatorial Optimization Feb 13 and 25, Lectures 4 and 6

Advanced Combinatorial Optimization Feb 13 and 25, Lectures 4 and 6 18.438 Advanced Combinatorial Optimization Feb 13 and 25, 2014 Lectures 4 and 6 Lecturer: Michel X. Goemans Scribe: Zhenyu Liao and Michel X. Goemans Today, we will use an algebraic approach to solve the

More information

1 Reductions from Maximum Matchings to Perfect Matchings

1 Reductions from Maximum Matchings to Perfect Matchings 15-451/651: Design & Analysis of Algorithms November 21, 2013 Lecture #26 last changed: December 3, 2013 When we first studied network flows, we saw how to find maximum cardinality matchings in bipartite

More information

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions. Review for Exam. Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions. x + y z = 2 x + 2y + z = 3 x + y + (a 2 5)z = a 2 The augmented matrix for

More information

CS1800: Strong Induction. Professor Kevin Gold

CS1800: Strong Induction. Professor Kevin Gold CS1800: Strong Induction Professor Kevin Gold Mini-Primer/Refresher on Unrelated Topic: Limits This is meant to be a problem about reasoning about quantifiers, with a little practice of other skills, too

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way EECS 16A Designing Information Devices and Systems I Fall 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate it

More information

* 8 Groups, with Appendix containing Rings and Fields.

* 8 Groups, with Appendix containing Rings and Fields. * 8 Groups, with Appendix containing Rings and Fields Binary Operations Definition We say that is a binary operation on a set S if, and only if, a, b, a b S Implicit in this definition is the idea that

More information

Lecture 14: IP = PSPACE

Lecture 14: IP = PSPACE IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 14: IP = PSPACE David Mix Barrington and Alexis Maciel August 3, 2000 1. Overview We

More information

Quadratic Equations Part I

Quadratic Equations Part I Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing

More information

Lecture 5 Polynomial Identity Testing

Lecture 5 Polynomial Identity Testing Lecture 5 Polynomial Identity Testing Michael P. Kim 18 April 2017 1 Outline and Motivation In this lecture we will cover a fundamental problem in complexity theory polynomial identity testing (PIT). We

More information

Counting bases of representable matroids

Counting bases of representable matroids Counting bases of representable matroids Michael Snook School of Mathematics, Statistics and Operations Research Victoria University of Wellington Wellington, New Zealand michael.snook@msor.vuw.ac.nz Submitted:

More information

Theory of Computer Science to Msc Students, Spring Lecture 2

Theory of Computer Science to Msc Students, Spring Lecture 2 Theory of Computer Science to Msc Students, Spring 2007 Lecture 2 Lecturer: Dorit Aharonov Scribe: Bar Shalem and Amitai Gilad Revised: Shahar Dobzinski, March 2007 1 BPP and NP The theory of computer

More information

Linear Algebra, Summer 2011, pt. 2

Linear Algebra, Summer 2011, pt. 2 Linear Algebra, Summer 2, pt. 2 June 8, 2 Contents Inverses. 2 Vector Spaces. 3 2. Examples of vector spaces..................... 3 2.2 The column space......................... 6 2.3 The null space...........................

More information

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way EECS 16A Designing Information Devices and Systems I Spring 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2 MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS SYSTEMS OF EQUATIONS AND MATRICES Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

Lecture 9: Elementary Matrices

Lecture 9: Elementary Matrices Lecture 9: Elementary Matrices Review of Row Reduced Echelon Form Consider the matrix A and the vector b defined as follows: 1 2 1 A b 3 8 5 A common technique to solve linear equations of the form Ax

More information

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3 Answers in blue. If you have questions or spot an error, let me know. 3 4. Find all matrices that commute with A =. 4 3 a b If we set B = and set AB = BA, we see that 3a + 4b = 3a 4c, 4a + 3b = 3b 4d,

More information

-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH.

-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH. CMPSCI 601: Recall From Last Time Lecture 26 Theorem: All CFL s are in sac. Facts: ITADD, MULT, ITMULT and DIVISION on -bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE

More information

Chapter 5 : Randomized computation

Chapter 5 : Randomized computation Dr. Abhijit Das, Chapter 5 : Randomized computation Probabilistic or randomized computation often provides practical methods to solve certain computational problems. In order to define probabilistic complexity

More information

8 Square matrices continued: Determinants

8 Square matrices continued: Determinants 8 Square matrices continued: Determinants 8.1 Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You

More information

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2 Final Review Sheet The final will cover Sections Chapters 1,2,3 and 4, as well as sections 5.1-5.4, 6.1-6.2 and 7.1-7.3 from chapters 5,6 and 7. This is essentially all material covered this term. Watch

More information

0.1. Linear transformations

0.1. Linear transformations Suggestions for midterm review #3 The repetitoria are usually not complete; I am merely bringing up the points that many people didn t now on the recitations Linear transformations The following mostly

More information

Lecture for Week 2 (Secs. 1.3 and ) Functions and Limits

Lecture for Week 2 (Secs. 1.3 and ) Functions and Limits Lecture for Week 2 (Secs. 1.3 and 2.2 2.3) Functions and Limits 1 First let s review what a function is. (See Sec. 1 of Review and Preview.) The best way to think of a function is as an imaginary machine,

More information

22m:033 Notes: 3.1 Introduction to Determinants

22m:033 Notes: 3.1 Introduction to Determinants 22m:033 Notes: 3. Introduction to Determinants Dennis Roseman University of Iowa Iowa City, IA http://www.math.uiowa.edu/ roseman October 27, 2009 When does a 2 2 matrix have an inverse? ( ) a a If A =

More information

Volume in n Dimensions

Volume in n Dimensions Volume in n Dimensions MA 305 Kurt Bryan Introduction You ve seen that if we have two vectors v and w in two dimensions then the area spanned by these vectors can be computed as v w = v 1 w 2 v 2 w 1 (where

More information

No Solution Equations Let s look at the following equation: 2 +3=2 +7

No Solution Equations Let s look at the following equation: 2 +3=2 +7 5.4 Solving Equations with Infinite or No Solutions So far we have looked at equations where there is exactly one solution. It is possible to have more than solution in other types of equations that are

More information

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations Math 138: Introduction to solving systems of equations with matrices. Pedagogy focus: Concept of equation balance, integer arithmetic, quadratic equations. The Concept of Balance for Systems of Equations

More information

MATH 115, SUMMER 2012 LECTURE 12

MATH 115, SUMMER 2012 LECTURE 12 MATH 115, SUMMER 2012 LECTURE 12 JAMES MCIVOR - last time - we used hensel s lemma to go from roots of polynomial equations mod p to roots mod p 2, mod p 3, etc. - from there we can use CRT to construct

More information

Determinants - Uniqueness and Properties

Determinants - Uniqueness and Properties Determinants - Uniqueness and Properties 2-2-2008 In order to show that there s only one determinant function on M(n, R), I m going to derive another formula for the determinant It involves permutations

More information

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch Today Probabilistic Turing Machines and Probabilistic Time Complexity Classes Now add a new capability to standard TMs: random

More information

Lecture 6: Finite Fields

Lecture 6: Finite Fields CCS Discrete Math I Professor: Padraic Bartlett Lecture 6: Finite Fields Week 6 UCSB 2014 It ain t what they call you, it s what you answer to. W. C. Fields 1 Fields In the next two weeks, we re going

More information

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Lecture 02 Groups: Subgroups and homomorphism (Refer Slide Time: 00:13) We looked

More information

Recitation 8: Graphs and Adjacency Matrices

Recitation 8: Graphs and Adjacency Matrices Math 1b TA: Padraic Bartlett Recitation 8: Graphs and Adjacency Matrices Week 8 Caltech 2011 1 Random Question Suppose you take a large triangle XY Z, and divide it up with straight line segments into

More information

MATH 310, REVIEW SHEET 2

MATH 310, REVIEW SHEET 2 MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,

More information

Chapter 4. Solving Systems of Equations. Chapter 4

Chapter 4. Solving Systems of Equations. Chapter 4 Solving Systems of Equations 3 Scenarios for Solutions There are three general situations we may find ourselves in when attempting to solve systems of equations: 1 The system could have one unique solution.

More information

Differential Equations

Differential Equations This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

CMPSCI611: Three Divide-and-Conquer Examples Lecture 2

CMPSCI611: Three Divide-and-Conquer Examples Lecture 2 CMPSCI611: Three Divide-and-Conquer Examples Lecture 2 Last lecture we presented and analyzed Mergesort, a simple divide-and-conquer algorithm. We then stated and proved the Master Theorem, which gives

More information

Further Mathematical Methods (Linear Algebra) 2002

Further Mathematical Methods (Linear Algebra) 2002 Further Mathematical Methods (Linear Algebra) 2002 Solutions For Problem Sheet 4 In this Problem Sheet, we revised how to find the eigenvalues and eigenvectors of a matrix and the circumstances under which

More information

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n). 18.310 lecture notes April 22, 2015 Factoring Lecturer: Michel Goemans We ve seen that it s possible to efficiently check whether an integer n is prime or not. What about factoring a number? If this could

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 10 February 19, 2013 CPSC 467b, Lecture 10 1/45 Primality Tests Strong primality tests Weak tests of compositeness Reformulation

More information

x 1 + x 2 2 x 1 x 2 1 x 2 2 min 3x 1 + 2x 2

x 1 + x 2 2 x 1 x 2 1 x 2 2 min 3x 1 + 2x 2 Lecture 1 LPs: Algebraic View 1.1 Introduction to Linear Programming Linear programs began to get a lot of attention in 1940 s, when people were interested in minimizing costs of various systems while

More information

Math 775 Homework 1. Austin Mohr. February 9, 2011

Math 775 Homework 1. Austin Mohr. February 9, 2011 Math 775 Homework 1 Austin Mohr February 9, 2011 Problem 1 Suppose sets S 1, S 2,..., S n contain, respectively, 2, 3,..., n 1 elements. Proposition 1. The number of SDR s is at least 2 n, and this bound

More information

Generating Function Notes , Fall 2005, Prof. Peter Shor

Generating Function Notes , Fall 2005, Prof. Peter Shor Counting Change Generating Function Notes 80, Fall 00, Prof Peter Shor In this lecture, I m going to talk about generating functions We ve already seen an example of generating functions Recall when we

More information

MAT1302F Mathematical Methods II Lecture 19

MAT1302F Mathematical Methods II Lecture 19 MAT302F Mathematical Methods II Lecture 9 Aaron Christie 2 April 205 Eigenvectors, Eigenvalues, and Diagonalization Now that the basic theory of eigenvalues and eigenvectors is in place most importantly

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

Basic matrix operations

Basic matrix operations Roberto s Notes on Linear Algebra Chapter 4: Matrix algebra Section 3 Basic matrix operations What you need to know already: What a matrix is. he basic special types of matrices What you can learn here:

More information

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea 15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 200 Scribe: Florin Oprea 8.1 Introduction In this lecture we will consider

More information

Lecture 22: Counting

Lecture 22: Counting CS 710: Complexity Theory 4/8/2010 Lecture 22: Counting Instructor: Dieter van Melkebeek Scribe: Phil Rydzewski & Chi Man Liu Last time we introduced extractors and discussed two methods to construct them.

More information

Algebra Exam. Solutions and Grading Guide

Algebra Exam. Solutions and Grading Guide Algebra Exam Solutions and Grading Guide You should use this grading guide to carefully grade your own exam, trying to be as objective as possible about what score the TAs would give your responses. Full

More information

Determinants of 2 2 Matrices

Determinants of 2 2 Matrices Determinants In section 4, we discussed inverses of matrices, and in particular asked an important question: How can we tell whether or not a particular square matrix A has an inverse? We will be able

More information

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM (FP1) The exclusive or operation, denoted by and sometimes known as XOR, is defined so that P Q is true iff P is true or Q is true, but not both. Prove (through

More information

1 GSW Sets of Systems

1 GSW Sets of Systems 1 Often, we have to solve a whole series of sets of simultaneous equations of the form y Ax, all of which have the same matrix A, but each of which has a different known vector y, and a different unknown

More information

20.1 2SAT. CS125 Lecture 20 Fall 2016

20.1 2SAT. CS125 Lecture 20 Fall 2016 CS125 Lecture 20 Fall 2016 20.1 2SAT We show yet another possible way to solve the 2SAT problem. Recall that the input to 2SAT is a logical expression that is the conunction (AND) of a set of clauses,

More information

1 Adjacency matrix and eigenvalues

1 Adjacency matrix and eigenvalues CSC 5170: Theory of Computational Complexity Lecture 7 The Chinese University of Hong Kong 1 March 2010 Our objective of study today is the random walk algorithm for deciding if two vertices in an undirected

More information

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) D. ARAPURA Gaussian elimination is the go to method for all basic linear classes including this one. We go summarize the main ideas. 1.

More information

6 EIGENVALUES AND EIGENVECTORS

6 EIGENVALUES AND EIGENVECTORS 6 EIGENVALUES AND EIGENVECTORS INTRODUCTION TO EIGENVALUES 61 Linear equations Ax = b come from steady state problems Eigenvalues have their greatest importance in dynamic problems The solution of du/dt

More information

Algorithms: Lecture 2

Algorithms: Lecture 2 1 Algorithms: Lecture 2 Basic Structures: Sets, Functions, Sequences, and Sums Jinwoo Kim jwkim@jjay.cuny.edu 2.1 Sets 2 1 2.1 Sets 3 2.1 Sets 4 2 2.1 Sets 5 2.1 Sets 6 3 2.1 Sets 7 2.2 Set Operations

More information

Review Questions REVIEW QUESTIONS 71

Review Questions REVIEW QUESTIONS 71 REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of

More information

36 What is Linear Algebra?

36 What is Linear Algebra? 36 What is Linear Algebra? The authors of this textbook think that solving linear systems of equations is a big motivation for studying linear algebra This is certainly a very respectable opinion as systems

More information

Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur. Lecture 1 Real Numbers

Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur. Lecture 1 Real Numbers Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur Lecture 1 Real Numbers In these lectures, we are going to study a branch of mathematics called

More information

One-to-one functions and onto functions

One-to-one functions and onto functions MA 3362 Lecture 7 - One-to-one and Onto Wednesday, October 22, 2008. Objectives: Formalize definitions of one-to-one and onto One-to-one functions and onto functions At the level of set theory, there are

More information

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014 Functions and cardinality (solutions) 21-127 sections A and F TA: Clive Newstead 6 th May 2014 What follows is a somewhat hastily written collection of solutions for my review sheet. I have omitted some

More information

1 Primals and Duals: Zero Sum Games

1 Primals and Duals: Zero Sum Games CS 124 Section #11 Zero Sum Games; NP Completeness 4/15/17 1 Primals and Duals: Zero Sum Games We can represent various situations of conflict in life in terms of matrix games. For example, the game shown

More information

1300 Linear Algebra and Vector Geometry

1300 Linear Algebra and Vector Geometry 1300 Linear Algebra and Vector Geometry R. Craigen Office: MH 523 Email: craigenr@umanitoba.ca May-June 2017 Introduction: linear equations Read 1.1 (in the text that is!) Go to course, class webpages.

More information

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3 6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

More information

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3 Math 0 Row Reduced Echelon Form Techniques for solving systems of linear equations lie at the heart of linear algebra. In high school we learn to solve systems with or variables using elimination and substitution

More information

CS1800: Mathematical Induction. Professor Kevin Gold

CS1800: Mathematical Induction. Professor Kevin Gold CS1800: Mathematical Induction Professor Kevin Gold Induction: Used to Prove Patterns Just Keep Going For an algorithm, we may want to prove that it just keeps working, no matter how big the input size

More information

DETERMINANTS. , x 2 = a 11b 2 a 21 b 1

DETERMINANTS. , x 2 = a 11b 2 a 21 b 1 DETERMINANTS 1 Solving linear equations The simplest type of equations are linear The equation (1) ax = b is a linear equation, in the sense that the function f(x) = ax is linear 1 and it is equated to

More information

CS 6820 Fall 2014 Lectures, October 3-20, 2014

CS 6820 Fall 2014 Lectures, October 3-20, 2014 Analysis of Algorithms Linear Programming Notes CS 6820 Fall 2014 Lectures, October 3-20, 2014 1 Linear programming The linear programming (LP) problem is the following optimization problem. We are given

More information

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms REVIEW QUESTIONS Chapter 1: Foundations: Sets, Logic, and Algorithms 1. Why can t a Venn diagram be used to prove a statement about sets? 2. Suppose S is a set with n elements. Explain why the power set

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3 EECS 70 Discrete Mathematics and Probability Theory Spring 014 Anant Sahai Note 3 Induction Induction is an extremely powerful tool in mathematics. It is a way of proving propositions that hold for all

More information

CSCI3390-Lecture 6: An Undecidable Problem

CSCI3390-Lecture 6: An Undecidable Problem CSCI3390-Lecture 6: An Undecidable Problem September 21, 2018 1 Summary The language L T M recognized by the universal Turing machine is not decidable. Thus there is no algorithm that determines, yes or

More information

STEP Support Programme. Hints and Partial Solutions for Assignment 17

STEP Support Programme. Hints and Partial Solutions for Assignment 17 STEP Support Programme Hints and Partial Solutions for Assignment 7 Warm-up You need to be quite careful with these proofs to ensure that you are not assuming something that should not be assumed. For

More information

Lecture 7: More Arithmetic and Fun With Primes

Lecture 7: More Arithmetic and Fun With Primes IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 7: More Arithmetic and Fun With Primes David Mix Barrington and Alexis Maciel July

More information

ORDERS OF ELEMENTS IN A GROUP

ORDERS OF ELEMENTS IN A GROUP ORDERS OF ELEMENTS IN A GROUP KEITH CONRAD 1. Introduction Let G be a group and g G. We say g has finite order if g n = e for some positive integer n. For example, 1 and i have finite order in C, since

More information

CS 151 Complexity Theory Spring Solution Set 5

CS 151 Complexity Theory Spring Solution Set 5 CS 151 Complexity Theory Spring 2017 Solution Set 5 Posted: May 17 Chris Umans 1. We are given a Boolean circuit C on n variables x 1, x 2,..., x n with m, and gates. Our 3-CNF formula will have m auxiliary

More information

compare to comparison and pointer based sorting, binary trees

compare to comparison and pointer based sorting, binary trees Admin Hashing Dictionaries Model Operations. makeset, insert, delete, find keys are integers in M = {1,..., m} (so assume machine word size, or unit time, is log m) can store in array of size M using power:

More information

3 The language of proof

3 The language of proof 3 The language of proof After working through this section, you should be able to: (a) understand what is asserted by various types of mathematical statements, in particular implications and equivalences;

More information

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively 6 Prime Numbers Part VI of PJE 6.1 Fundamental Results Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively D (p) = { p 1 1 p}. Otherwise

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 25.1 Introduction Today we re going to talk about machine learning, but from an

More information

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models Contents Mathematical Reasoning 3.1 Mathematical Models........................... 3. Mathematical Proof............................ 4..1 Structure of Proofs........................ 4.. Direct Method..........................

More information

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

Time to learn about NP-completeness!

Time to learn about NP-completeness! Time to learn about NP-completeness! Harvey Mudd College March 19, 2007 Languages A language is a set of strings Examples The language of strings of all zeros with odd length The language of strings with

More information

CS 124 Math Review Section January 29, 2018

CS 124 Math Review Section January 29, 2018 CS 124 Math Review Section CS 124 is more math intensive than most of the introductory courses in the department. You re going to need to be able to do two things: 1. Perform some clever calculations to

More information

1 Positive definiteness and semidefiniteness

1 Positive definiteness and semidefiniteness Positive definiteness and semidefiniteness Zdeněk Dvořák May 9, 205 For integers a, b, and c, let D(a, b, c) be the diagonal matrix with + for i =,..., a, D i,i = for i = a +,..., a + b,. 0 for i = a +

More information

Lecture 1 Systems of Linear Equations and Matrices

Lecture 1 Systems of Linear Equations and Matrices Lecture 1 Systems of Linear Equations and Matrices Math 19620 Outline of Course Linear Equations and Matrices Linear Transformations, Inverses Bases, Linear Independence, Subspaces Abstract Vector Spaces

More information

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 13

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 13 STAT 309: MATHEMATICAL COMPUTATIONS I FALL 208 LECTURE 3 need for pivoting we saw that under proper circumstances, we can write A LU where 0 0 0 u u 2 u n l 2 0 0 0 u 22 u 2n L l 3 l 32, U 0 0 0 l n l

More information

MTH 464: Computational Linear Algebra

MTH 464: Computational Linear Algebra MTH 464: Computational Linear Algebra Lecture Outlines Exam 1 Material Dr. M. Beauregard Department of Mathematics & Statistics Stephen F. Austin State University January 9, 2018 Linear Algebra (MTH 464)

More information

1 Randomized Computation

1 Randomized Computation CS 6743 Lecture 17 1 Fall 2007 1 Randomized Computation Why is randomness useful? Imagine you have a stack of bank notes, with very few counterfeit ones. You want to choose a genuine bank note to pay at

More information

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal?

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal? CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal? The conjecture that P is different from NP made its way on to several lists of the most important unsolved problems in Mathematics (never

More information