Packet #4: Recursion. Applied Discrete Mathematics
|
|
- Terence Mills
- 7 years ago
- Views:
Transcription
1 Packet #4: Recursion Applied Discrete Mathematics Table of Contents Recursion Information Page 1 Linear Homogeneous Recursion Page Recursion Examples Pages 3-4 Solving Recursions Page 5 Towers of Hanoi Page 6 Binary Gray Codes Page 8 Big O Information Page 9
2 Recursion Information I Recursive form defines a set, an equation, or a process by defining a starting set or value and giving a rule for continuing to build the set, equation, or process based on previously defined items II Closed form is a way of writing a recursive expression or process that does not depend on any previously defined items A recursive definition has two parts: Recursive Form of Recursive Sequences Basis: Recursion: must define values for some finite number of elements remaining elements are defined by the recursion relation Example 41: Define "L" as the integer part after a division on positive integers 5 3 = 1+ L 5 = = L 3 = 5 Let's define a sequence by recursion Basis: Q(1) = 1 Recursion: Q(n) = Q( L ) + 1 n 3 We could develop the sequence immediately: Q(1) = 1 Q() = Q(3) = Q(4) = 3 Q(5) = 3 Q(6) = 3 Q(7) = 3 Q(8) = 4 Q(45) =? We may not need all of the previous Q's to calculate Q(45): Q(45) = Q() + 1 = Q(11) = Q(5) = Q() + 4= Q(1) + 5 = = 6 4 1
3 Closed Form of Linear Homogeneous Recursive Sequences Some linear recursion forms can be put into closed form by derivation: Given: S(0) = S(0) S(1) = S(1) S(n) = AS(n-1) + BS(n-) This form lends itself to closed form representation Assume: S(n) = a x n (This is an educated guess) S(n-1) = a x (n-1) S(n-) = a x (n-) Substitute these into the recursive definition: S(n) = a x n = A a x (n-1) + B a x (n-) a x (n-) [x - Ax - B] = 0 for a x (n-) 0 [x A ± A + 4B - Ax - B] = 0 x = Using the quadratic formula, there are two roots: x = r 1 and x = r If r 1 r then we fix our guess for : = C 1 r n 1 + C r n Otherwise if r 1 = r we must separate the solutions by multiplying one by n: = C 1 r n 1 + C n r n We can use S(0) and S(1) to write two equations and solve for C 1 and C
4 Example 41: S(0) = S(1) = 5 S(n) = 5S(n-1) - 6S(n-) Recursion Examples x - 5x + 6 = 0 (x-3)(x-)=0 Roots: x = 3 and x = = C 1 n + C 3 n S(0) = = C 1 + C S(1) = 5 = C 1 + 3C C 1 = 1 & C = 1 = n + 3 n Prove using Second Principle of Induction Basis: S(0) =, S 0 = = = S(1) = 5, S 1 = = 5 Assume true for (n-1) and (n-): S (n-) = (n-) + 3 (n-) S (n-1) = (n-1) +3 (n-1) Prove true for n: = n + 3 n S(n) = 5S(n-1) - 6S(n-) (Recursive definition) S(n) = 5[ n n-1 ] - 6[ n- + 3 n- ] (Substitute in from Assumption) = 5[ n-1 ] - 6[ n- ] + 5[3 n-1 ] - 6[3 n- ] (Group like terms) = [ n-1 ] + 3[3 n-1 ] = n + 3 n QED Example 4: S(0) = S(n) = 3S(n-1) (x-3) = 0 Root: x = 3 = C 1 3 n S(0) = = C 1 = 3 n 3
5 Example 43: S(0) = C 0 S(n) = as(n-1) + b S(1) = ac 0 + b S() = a[ac 0 + b] + b = a C 0 + ab + b S(3) = a[a C 0 + ab + b] + b = a 3 C 0 + a b + ab + b n-1 S(n) = a n C 0 + b a i i=0 S(n) = a n C 0 + b[ 1-an 1-a ], a 1 Let a =, b = 1, C 0 = 3 S(0) = 3 S(1) = 7 S() = 15 S(3) = 31 Using equation: S(3) = [ ] = = 31 One can use induction to prove that S(n) = a n C 0 + b[ 1-an 1-a ], a 1, for n P Example 44: S(0) = S(1) = 9 S(n) = 6S(n-1) - 9S(n-) x - 6x + 9 = 0 x = 3 and x = 3 - roots are the same = C 1 3 n + C n3 n (Note factor of n since roots are the same!) S(0) = = C 1 S(1) = 9 = 3C 1 + 3C C = 1 = 3 n + n3 n 4
6 Solving Recursive Sequences Sometimes we consider recurrences with n/ as an argument In order to consider just integer values of the function, we'll map n to powers of For example: S(1) = 3 Assume n = k S( 0 ) = 3 S(n) = S( n ) + 5n Then k = log n S(k ) = *S( )+5* k Write out first terms with no S's, leave them factored: k = 0 S( 0 ) = 3 = k = 1 S( 1 ) = = k = S( ) = [ ] + 5 = = k = 3 S( 3 ) = = Make a guess at S( k ) by finding a pattern: S( k ) = 3* k + 5k* k (Alternatively, S(n) = 3n + 5n[log n]) Prove by induction Basis: k = 0, S( 0 ) = 3( 0 ) + 0 = 3 = S(1) Assume true for k : S( k ) = 3* k + 5k* k Prove true for k+1 : S( k+1 ) = 3* k+1 + 5(k+1)* k+1 S( k+1 ) = *S( k ) + 5* k+1 (recursive definition) = (3* k + 5k* k ) + 5* k+1 = 3** k + 5k** k + 5* k+1 = 3* k+1 + 5k* k+1 + 5* k+1 = 3* k+1 + 5(k+1)* k+1 5
7 Towers of Hanoi (We will fill this in during class) Object: Move a stack of n disks (stacked in order of decreasing size) from one column (eg A) to another designated column (eg C) Just one disk can be moved at a time There are only three columns allowed and at no time can a larger disk cover a smaller disk How many moves does it take to move all n disks? A B C Moving just one disk takes one move, so S(1) = 1 Moving disks takes 3 moves, so S() = 3 How many moves does it take to move 3? In general, if you know how to move n disks then to move (n+1) disks: 1 Move the top n as before to intermediate pole (S(n) moves) Move the bottom largest disk to final pole (1 move) 3 Move the n from intermediate pole to final pole (S(n) moves) 1 3 Then the recursion can be written: S(1)=1 basis S(n+1) = S(n) S(n) = S(n) + 1 6
8 Use the recursion to fill out the table: Towers of Hanoi continued n S(n) n S(n) ? 3 7 7? ? Guess: S(n) = n - 1 Prove by induction: Basis: S(1) = 1-1 = 1 Assume true for n: S(n) = n - 1 Prove true for (n+1): S(n+1) = n+1-1 S(n+1) = S(n) + 1 (from recursion) = ( n - 1) + 1 (substitute in from Assumption) = n = n+1-1 7
9 A Recursion for Gray Codes A binary gray code is a list of binary strings such that the neighbors of any string differ by only 1 bit We say such a list is "gray" Basis: S(1) = 0, 1 differ by only one Recursion: S(n) = 0S(n-1),1S'(n-1) (S'(n-1) is S(n-1) in reverse order) S() = 00, 01, 11, 10 Let's prove that S(n) is always a gray code Basis: S(1) = 0,1 is gray (by inspection) Assume: S(n) is gray Prove: S(n+1) is gray S(n+1) = 0S(n),1S'(n) Prove 0S(n) and 1S'(n) are gray: Since S(n) is gray, 0S(n) is gray Since S(n) is gray, S'(n) is gray, and so is 1S'(n) Prove the last string of 0S(n) differs in only one bit from the first string of 1S'(n): Since S'(n) is the reverse of S(n), the last string (say x) in S(n) is equal to the first string in S'(n) Therefore, the last string of 0S(n) is 0x and the first string of 1S'(n) is 1x, and these two strings differ only by 1 bit Prove the last string of 1S'(n) differs in only one bit from the first string of 0S(n): Since S'(n) is the reverse of S(n), the last string (say y) in S'(n) is equal to the first string in S(n) Therefore, the last string of 1S'(n) is 1y and the first string of 0S(n) is 0y, and these two strings differ only by 1 bit Since 0S(n) and 1S'(n) are gray and their first and last strings differ by just one bit each, S(n+1) is gray 8
10 Big-O Information I Definition: If f and g are functions then f is Big O of g, or f(x) is in O(g(x)), if there exist constants C and k so that x (x > k) f(x) C g(x) In other words, f(x) is smaller than some constant times g(x) whenever x is large enough O(g(x)) actually defines a set of functions that grow at the rate of a constant times g, or at a slower rate II Generating a Big-O for a function The general rules: I O(c*g(x)), where c is constant (independent of x), is O(g(x)) II III IV If f(x) g(x) then f(x) + g(x) * g(x), so O(f(x) + g(x)) = O(g(x)) If a sum has more than terms, count the number of terms the sum has Then if the sum has m terms, and g(x) is the largest term, then the sum is m* g(x) O(sum) = O(m * g(x)) Note that m might depend on x! O(f(x) * g(x)) = O(f(x)) * O(g(x)) V O(f(x)/g(x)) = O(f(x))/O(g(x)) ** Be careful with division! 9
11 Big-O Formal Definition: f(n) grows no faster than g(n) f(n) is O(g(n)) if there is a constant c such that f(n) cg(n) for all n some k Purpose: to describe growth rate of a function e g does it grow like log(n)? like n? like n? e g n + 3n - 1 "grows like" n 1 nlog(n) - 3n + 7 "grows like" nlog(n) Big-O is used to denote an upper bound on growth rate Examples 1 1 n - n 1 n for all n 0 Therefore, 1 n - n is O(n ) n + 3 n + n = n for n 3 Therefore, n + 3 is O(n) 3 5n + log(n) + 1 5n + n + n = 7n for n 1 Therefore, 5n + log(n) + 1 is O(n) 4 n 3-5n + 6n - 7 is O(n 3 ) since n 3-5n + 6n - 7 n 3 + 6n n 3 + 6n 3 = 8n 3 for n 1 5 n + 1 is O(n 3 ) since n + 1 n n 3 for n 1 (However, n + 1 is also O(n )) 6 log(n 3 ) is O(log(n)) since log(n 3 ) = 3log(n) 10
12 Example of Definition of Big-O Function f(x) is O(g(x)) c n o n[(n n o ) [f(n) cg(n)]] (f(x) is O(g(x)) there is a constant c and a value n o such that f(n) cg(n) whenever n n o ) Negate: (definition of Big-O) c n o n[(n n o ) f(n) cg(n)] [ c n o n[(n n o ) f(n) cg(n)]] c n o n [(n n o ) f(n) cg(n)] c n o n [ (n n o ) (f(n) cg(n))] c n o n[(n n o ) (f(n) cg(n))] c n o n[(n n o ) (f(n) > cg(n))] Big-O negation of Big-O negation of Big-O Merge Sort Recurrence C() = 1 C(n) = C( n ) + n for n 4 Solving for n = k (then k = log (n)) C() = 1 C( ) = ( 1) + C( 3 ) = ( ) + 3 C( 4 ) = ( ) + 4 C( 5 ) = ( ) + 5 C( k ) = k-1 + (k-1) k (guess) = k-1 + k k - k = k k + k ( 1-1) = kk - 1 (k ) C(n) = nlog(n) - 1 n (Can prove by induction) Therefore, O(nlog(n)) 11
13 Binary Search Search for x in sorted array A of n elements BINSRCH(x,A,n) if n 1 then split A into sorted arrays B and C each with n elements [Note: (last(b) first(c))] (1) if x is smaller than first(c) then C( n ) BINSRCH(x,B,n ) or C( n ) else BINSRCH(x,C,n ) (1) else {n = 1} check if the only element in A is x Solving Binary Search Recurrence C(1) = 1 C(n) = C( n ) + 1 Assume n = k Then k = log (n) C(1) = 1 C() = (1) + 1 C( ) = (1 + 1) + 1 C( 3 ) = ( ) + 1 C( 4 ) = ( ) + 1 C( k ) = k + 1 (guess) C(n) = log (n) + 1 (can prove by induction) 1
Discrete Mathematics: Homework 7 solution. Due: 2011.6.03
EE 2060 Discrete Mathematics spring 2011 Discrete Mathematics: Homework 7 solution Due: 2011.6.03 1. Let a n = 2 n + 5 3 n for n = 0, 1, 2,... (a) (2%) Find a 0, a 1, a 2, a 3 and a 4. (b) (2%) Show that
More informationFunctions Recursion. C++ functions. Declare/prototype. Define. Call. int myfunction (int ); int myfunction (int x){ int y = x*x; return y; }
Functions Recursion C++ functions Declare/prototype int myfunction (int ); Define int myfunction (int x){ int y = x*x; return y; Call int a; a = myfunction (7); function call flow types type of function
More informationIn mathematics, it is often important to get a handle on the error term of an approximation. For instance, people will write
Big O notation (with a capital letter O, not a zero), also called Landau's symbol, is a symbolism used in complexity theory, computer science, and mathematics to describe the asymptotic behavior of functions.
More informationPUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.
PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include
More informationMath 55: Discrete Mathematics
Math 55: Discrete Mathematics UC Berkeley, Fall 2011 Homework # 5, due Wednesday, February 22 5.1.4 Let P (n) be the statement that 1 3 + 2 3 + + n 3 = (n(n + 1)/2) 2 for the positive integer n. a) What
More informationRecursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1
Recursion Slides by Christopher M Bourke Instructor: Berthe Y Choueiry Fall 007 Computer Science & Engineering 35 Introduction to Discrete Mathematics Sections 71-7 of Rosen cse35@cseunledu Recursive Algorithms
More informationMath 55: Discrete Mathematics
Math 55: Discrete Mathematics UC Berkeley, Spring 2012 Homework # 9, due Wednesday, April 11 8.1.5 How many ways are there to pay a bill of 17 pesos using a currency with coins of values of 1 peso, 2 pesos,
More informationWe can express this in decimal notation (in contrast to the underline notation we have been using) as follows: 9081 + 900b + 90c = 9001 + 100c + 10b
In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should
More informationCSC148 Lecture 8. Algorithm Analysis Binary Search Sorting
CSC148 Lecture 8 Algorithm Analysis Binary Search Sorting Algorithm Analysis Recall definition of Big Oh: We say a function f(n) is O(g(n)) if there exists positive constants c,b such that f(n)
More informationFull and Complete Binary Trees
Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full
More informationThis unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.
Algebra I Overview View unit yearlong overview here Many of the concepts presented in Algebra I are progressions of concepts that were introduced in grades 6 through 8. The content presented in this course
More informationCardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.
Section 2.5 Cardinality (another) Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted A = B, if and only if there is a bijection from A to B. If there is an injection
More informationMATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.
MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P
More informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More information3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
More informationThe Tower of Hanoi. Recursion Solution. Recursive Function. Time Complexity. Recursive Thinking. Why Recursion? n! = n* (n-1)!
The Tower of Hanoi Recursion Solution recursion recursion recursion Recursive Thinking: ignore everything but the bottom disk. 1 2 Recursive Function Time Complexity Hanoi (n, src, dest, temp): If (n >
More informationMathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
More informationthe recursion-tree method
the recursion- method recurrence into a 1 recurrence into a 2 MCS 360 Lecture 39 Introduction to Data Structures Jan Verschelde, 22 November 2010 recurrence into a The for consists of two steps: 1 Guess
More informationCSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential
More informationData Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010
Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010 Problem 1. In each of the following question, please specify if the statement
More informationMATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform
MATH 433/533, Fourier Analysis Section 11, The Discrete Fourier Transform Now, instead of considering functions defined on a continuous domain, like the interval [, 1) or the whole real line R, we wish
More information1 Lecture: Integration of rational functions by decomposition
Lecture: Integration of rational functions by decomposition into partial fractions Recognize and integrate basic rational functions, except when the denominator is a power of an irreducible quadratic.
More informationMath 115 Spring 2011 Written Homework 5 Solutions
. Evaluate each series. a) 4 7 0... 55 Math 5 Spring 0 Written Homework 5 Solutions Solution: We note that the associated sequence, 4, 7, 0,..., 55 appears to be an arithmetic sequence. If the sequence
More informationAnswer Key for California State Standards: Algebra I
Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.
More informationCatalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.
7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,
More informationSection IV.1: Recursive Algorithms and Recursion Trees
Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS
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 informationCreating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities
Algebra 1, Quarter 2, Unit 2.1 Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities Overview Number of instructional days: 15 (1 day = 45 60 minutes) Content to be learned
More informationThe Method of Partial Fractions Math 121 Calculus II Spring 2015
Rational functions. as The Method of Partial Fractions Math 11 Calculus II Spring 015 Recall that a rational function is a quotient of two polynomials such f(x) g(x) = 3x5 + x 3 + 16x x 60. The method
More informationZeros of a Polynomial Function
Zeros of a Polynomial Function An important consequence of the Factor Theorem is that finding the zeros of a polynomial is really the same thing as factoring it into linear factors. In this section we
More informationSolving Rational Equations
Lesson M Lesson : Student Outcomes Students solve rational equations, monitoring for the creation of extraneous solutions. Lesson Notes In the preceding lessons, students learned to add, subtract, multiply,
More informationLecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
More informationDigital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture
More informationPartial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:
Partial Fractions Combining fractions over a common denominator is a familiar operation from algebra: From the standpoint of integration, the left side of Equation 1 would be much easier to work with than
More informationThe Running Time of Programs
CHAPTER 3 The Running Time of Programs In Chapter 2, we saw two radically different algorithms for sorting: selection sort and merge sort. There are, in fact, scores of algorithms for sorting. This situation
More informationIntroduction. Appendix D Mathematical Induction D1
Appendix D Mathematical Induction D D Mathematical Induction Use mathematical induction to prove a formula. Find a sum of powers of integers. Find a formula for a finite sum. Use finite differences to
More information1 if 1 x 0 1 if 0 x 1
Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or
More informationNSM100 Introduction to Algebra Chapter 5 Notes Factoring
Section 5.1 Greatest Common Factor (GCF) and Factoring by Grouping Greatest Common Factor for a polynomial is the largest monomial that divides (is a factor of) each term of the polynomial. GCF is the
More informationAlgorithms. Margaret M. Fleck. 18 October 2010
Algorithms Margaret M. Fleck 18 October 2010 These notes cover how to analyze the running time of algorithms (sections 3.1, 3.3, 4.4, and 7.1 of Rosen). 1 Introduction The main reason for studying big-o
More informationAssignment 5 - Due Friday March 6
Assignment 5 - Due Friday March 6 (1) Discovering Fibonacci Relationships By experimenting with numerous examples in search of a pattern, determine a simple formula for (F n+1 ) 2 + (F n ) 2 that is, a
More informationCore Maths C1. Revision Notes
Core Maths C Revision Notes November 0 Core Maths C Algebra... Indices... Rules of indices... Surds... 4 Simplifying surds... 4 Rationalising the denominator... 4 Quadratic functions... 4 Completing the
More informationMany algorithms, particularly divide and conquer algorithms, have time complexities which are naturally
Recurrence Relations Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally modeled by recurrence relations. A recurrence relation is an equation which
More informationDiscrete Mathematics Problems
Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: wkloster@unf.edu Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................
More informationCSC 180 H1F Algorithm Runtime Analysis Lecture Notes Fall 2015
1 Introduction These notes introduce basic runtime analysis of algorithms. We would like to be able to tell if a given algorithm is time-efficient, and to be able to compare different algorithms. 2 Linear
More informationGrade Level Year Total Points Core Points % At Standard 9 2003 10 5 7 %
Performance Assessment Task Number Towers Grade 9 The task challenges a student to demonstrate understanding of the concepts of algebraic properties and representations. A student must make sense of the
More informationa 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More informationSome Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.
Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.com This paper contains a collection of 31 theorems, lemmas,
More informationFactoring - Solve by Factoring
6.7 Factoring - Solve by Factoring Objective: Solve quadratic equation by factoring and using the zero product rule. When solving linear equations such as 2x 5 = 21 we can solve for the variable directly
More informationSouth Carolina College- and Career-Ready (SCCCR) Algebra 1
South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready Mathematical Process Standards The South Carolina College- and Career-Ready (SCCCR) Mathematical Process
More informationLecture 1: Course overview, circuits, and formulas
Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik
More informationArkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 3 Binary Operations We are used to addition and multiplication of real numbers. These operations combine two real numbers
More informationClass Overview. CSE 326: Data Structures. Goals. Goals. Data Structures. Goals. Introduction
Class Overview CSE 326: Data Structures Introduction Introduction to many of the basic data structures used in computer software Understand the data structures Analyze the algorithms that use them Know
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationcsci 210: Data Structures Recursion
csci 210: Data Structures Recursion Summary Topics recursion overview simple examples Sierpinski gasket Hanoi towers Blob check READING: GT textbook chapter 3.5 Recursion In general, a method of defining
More information= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that
Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without
More informationLinear Programming Notes V Problem Transformations
Linear Programming Notes V Problem Transformations 1 Introduction Any linear programming problem can be rewritten in either of two standard forms. In the first form, the objective is to maximize, the material
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +
More informationVieta s Formulas and the Identity Theorem
Vieta s Formulas and the Identity Theorem This worksheet will work through the material from our class on 3/21/2013 with some examples that should help you with the homework The topic of our discussion
More informationLINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL
Chapter 6 LINEAR INEQUALITIES 6.1 Introduction Mathematics is the art of saying many things in many different ways. MAXWELL In earlier classes, we have studied equations in one variable and two variables
More informationLecture 13 - Basic Number Theory.
Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted
More informationZeros of Polynomial Functions
Zeros of Polynomial Functions The Rational Zero Theorem If f (x) = a n x n + a n-1 x n-1 + + a 1 x + a 0 has integer coefficients and p/q (where p/q is reduced) is a rational zero, then p is a factor of
More informationSMT 2014 Algebra Test Solutions February 15, 2014
1. Alice and Bob are painting a house. If Alice and Bob do not take any breaks, they will finish painting the house in 20 hours. If, however, Bob stops painting once the house is half-finished, then the
More informationDiagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.
Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity
More informationHOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!
Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following
More informationOperation Count; Numerical Linear Algebra
10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point
More informationAlgorithm Design and Recursion
Chapter 13 Algorithm Design and Recursion Objectives To understand basic techniques for analyzing the efficiency of algorithms. To know what searching is and understand the algorithms for linear and binary
More informationNotes on Determinant
ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without
More informationOn closed-form solutions to a class of ordinary differential equations
International Journal of Advanced Mathematical Sciences, 2 (1 (2014 57-70 c Science Publishing Corporation www.sciencepubco.com/index.php/ijams doi: 10.14419/ijams.v2i1.1556 Research Paper On closed-form
More informationAnalysis of Binary Search algorithm and Selection Sort algorithm
Analysis of Binary Search algorithm and Selection Sort algorithm In this section we shall take up two representative problems in computer science, work out the algorithms based on the best strategy to
More informationCHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
More informationMethods for Finding Bases
Methods for Finding Bases Bases for the subspaces of a matrix Row-reduction methods can be used to find bases. Let us now look at an example illustrating how to obtain bases for the row space, null space,
More informationHandout NUMBER THEORY
Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations
More informationSequential Data Structures
Sequential Data Structures In this lecture we introduce the basic data structures for storing sequences of objects. These data structures are based on arrays and linked lists, which you met in first year
More informationSequences. A sequence is a list of numbers, or a pattern, which obeys a rule.
Sequences A sequence is a list of numbers, or a pattern, which obeys a rule. Each number in a sequence is called a term. ie the fourth term of the sequence 2, 4, 6, 8, 10, 12... is 8, because it is the
More informationQuotient Rings and Field Extensions
Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.
More informationCartesian Products and Relations
Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special
More informationData Structures. Algorithm Performance and Big O Analysis
Data Structures Algorithm Performance and Big O Analysis What s an Algorithm? a clearly specified set of instructions to be followed to solve a problem. In essence: A computer program. In detail: Defined
More informationALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite
ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,
More informationCS 575 Parallel Processing
CS 575 Parallel Processing Lecture one: Introduction Wim Bohm Colorado State University Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5
More informationChapter 3. if 2 a i then location: = i. Page 40
Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)
More informationMicroeconomics Sept. 16, 2010 NOTES ON CALCULUS AND UTILITY FUNCTIONS
DUSP 11.203 Frank Levy Microeconomics Sept. 16, 2010 NOTES ON CALCULUS AND UTILITY FUNCTIONS These notes have three purposes: 1) To explain why some simple calculus formulae are useful in understanding
More informationOverview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series
Sequences and Series Overview Number of instruction days: 4 6 (1 day = 53 minutes) Content to Be Learned Write arithmetic and geometric sequences both recursively and with an explicit formula, use them
More information1 Review of Newton Polynomials
cs: introduction to numerical analysis 0/0/0 Lecture 8: Polynomial Interpolation: Using Newton Polynomials and Error Analysis Instructor: Professor Amos Ron Scribes: Giordano Fusco, Mark Cowlishaw, Nathanael
More informationAnswer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )
1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the
More informationIntroduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.
Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 1 Quiz 1 Do not open this quiz booklet until you are directed
More informationEfficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.
Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity
More informationChapter 3. Distribution Problems. 3.1 The idea of a distribution. 3.1.1 The twenty-fold way
Chapter 3 Distribution Problems 3.1 The idea of a distribution Many of the problems we solved in Chapter 1 may be thought of as problems of distributing objects (such as pieces of fruit or ping-pong balls)
More informationMACM 101 Discrete Mathematics I
MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.
More informationC H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
More informationMathematics for Algorithm and System Analysis
Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface
More informationSample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
More information10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a
More informationRegression Verification: Status Report
Regression Verification: Status Report Presentation by Dennis Felsing within the Projektgruppe Formale Methoden der Softwareentwicklung 2013-12-11 1/22 Introduction How to prevent regressions in software
More informationUndergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.
MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column
More informationCollatz Sequence. Fibbonacci Sequence. n is even; Recurrence Relation: a n+1 = a n + a n 1.
Fibonacci Roulette In this game you will be constructing a recurrence relation, that is, a sequence of numbers where you find the next number by looking at the previous numbers in the sequence. Your job
More informationT ( a i x i ) = a i T (x i ).
Chapter 2 Defn 1. (p. 65) Let V and W be vector spaces (over F ). We call a function T : V W a linear transformation form V to W if, for all x, y V and c F, we have (a) T (x + y) = T (x) + T (y) and (b)
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
More information6.3 Conditional Probability and Independence
222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted
More informationALGEBRA I (Created 2014) Amherst County Public Schools
ALGEBRA I (Created 2014) Amherst County Public Schools The 2009 Mathematics Standards of Learning Curriculum Framework is a companion document to the 2009 Mathematics Standards of Learning and amplifies
More information