Combination Locks and Permutations

Similar documents
Representation of functions as power series

10.2 Series and Convergence

Taylor and Maclaurin Series

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

9.2 Summation Notation

Estimating the Average Value of a Function

LS.6 Solution Matrices

Sequences and Series

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Continued Fractions and the Euclidean Algorithm

7.6 Approximation Errors and Simpson's Rule

Solving Linear Systems, Continued and The Inverse of a Matrix

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:

4.3 Lagrange Approximation

1 Review of Newton Polynomials

4. Binomial Expansions

Math 4310 Handout - Quotient Vector Spaces

1 if 1 x 0 1 if 0 x 1

Stanford Math Circle: Sunday, May 9, 2010 Square-Triangular Numbers, Pell s Equation, and Continued Fractions

Mathematical Induction. Mary Barnes Sue Gordon

Math 120 Final Exam Practice Problems, Form: A

MATH 132: CALCULUS II SYLLABUS

Partial Fractions Decomposition

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

1 Lecture: Integration of rational functions by decomposition

A power series about x = a is the series of the form

Examples of Functions

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Course Notes for Math 162: Mathematical Statistics Approximation Methods in Statistics

General Framework for an Iterative Solution of Ax b. Jacobi s Method

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e.

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

Inner Product Spaces

Stirling s formula, n-spheres and the Gamma Function

Vieta s Formulas and the Identity Theorem

1 Error in Euler s Method

3. Mathematical Induction

Mathematical Induction

Integrals of Rational Functions

Definition of derivative

MA4001 Engineering Mathematics 1 Lecture 10 Limits and Continuity

I remember that when I

MATRIX 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

POLYNOMIAL FUNCTIONS

Solving Systems of Linear Equations

Patterns in Pascal s Triangle

Real Roots of Univariate Polynomials with Real Coefficients

Lecture 13 - Basic Number Theory.

Practice with Proofs

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

PYTHAGOREAN TRIPLES KEITH CONRAD

The Method of Partial Fractions Math 121 Calculus II Spring 2015

An example of a computable

INCIDENCE-BETWEENNESS GEOMETRY

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

Solving DEs by Separation of Variables.

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

8 Primes and Modular Arithmetic

Combinatorial Proofs

Numerical Solution of Differential

15. Symmetric polynomials

Metric Spaces. Chapter Metrics

Use finite approximations to estimate the area under the graph of the function. f(x) = x 3

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation

1.7 Graphs of Functions

Regions in a circle. 7 points 57 regions

8 Divisibility and prime numbers

Walrasian Demand. u(x) where B(p, w) = {x R n + : p x w}.

Lectures 5-6: Taylor Series

Partial Fractions. p(x) q(x)

Normal distribution. ) 2 /2σ. 2π σ

Constrained optimization.

Notes on Determinant

Row Echelon Form and Reduced Row Echelon Form

Derivatives Math 120 Calculus I D Joyce, Fall 2013

Differentiation and Integration

Generating Functions Count

Solving Quadratic Equations

Section 6.4: Counting Subsets of a Set: Combinations

Math 1B, lecture 5: area and volume

SMT 2014 Algebra Test Solutions February 15, 2014

E3: PROBABILITY AND STATISTICS lecture notes

Solution to Homework 2

18.01 Single Variable Calculus Fall 2006

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

Mathematics Pre-Test Sample Questions A. { 11, 7} B. { 7,0,7} C. { 7, 7} D. { 11, 11}

About the Gamma Function

Lecture 5 Principal Minors and the Hessian

Factoring A Quadratic Polynomial

Week 13 Trigonometric Form of Complex Numbers

Continued Fractions. Darren C. Collins

Lies My Calculator and Computer Told Me

Geometric Series and Annuities

Alum Rock Elementary Union School District Algebra I Study Guide for Benchmark III

Guide to Leaving Certificate Mathematics Ordinary Level

Techniques of Integration

Partial Fractions. (x 1)(x 2 + 1)

Transcription:

Combination Locks and Permutations An Exploration Through Analysis Tim Sasaki Western Oregon University April 9, 2011 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 1 / 35

Introduction Suppose we have a combination lock with buttons numbered 1 through n. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 2 / 35

Introduction Suppose we have a combination lock with buttons numbered 1 through n. Combinations are entered by pressing buttons in sequence, with each button being pushed only once. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 2 / 35

Introduction Suppose we have a combination lock with buttons numbered 1 through n. Combinations are entered by pressing buttons in sequence, with each button being pushed only once. How many combinations are possible? Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 2 / 35

Introduction Suppose we have a combination lock with buttons numbered 1 through n. Combinations are entered by pressing buttons in sequence, with each button being pushed only once. How many combinations are possible? If we push buttons one at a time, then the number of combinations is simply n! since we are not repeating buttons. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 2 / 35

Introduction Suppose we have a combination lock with buttons numbered 1 through n. Combinations are entered by pressing buttons in sequence, with each button being pushed only once. How many combinations are possible? If we push buttons one at a time, then the number of combinations is simply n! since we are not repeating buttons. However, what if we are allowed to push multiple buttons at once? Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 2 / 35

Introduction An example for n = 4 Possible combinations are: {1,2},{3},{4} {2,3,4},{1} {1,3},{2,4} {1},{2},{3},{4} In particular, the set of multiple-button-push combinations contains the set of single-button-push combinations, so we know there are at least n! combinations (the only instance when the number of combinations is actually equal to n! is for n {0,1}). Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 3 / 35

Introduction Exhaustive checking works fine for small n. Combinations for n = 3 ({1}, {2}, {3}), ({1}, {3}, {2}), ({2}, {1}, {3}), ({2}, {3}, {1}), ({3}, {1}, {2}), ({3}, {2}, {1}), ({1, 2}, {3}), ({1, 3}, {2}), ({2, 3}, {1}), ({1}, {2, 3}),({2}, {1, 3}), ({3}, {1, 2}), ({1, 2, 3}) There are 13 possible combinations for n = 3. However, the number of combinations as n increases becomes very large. We know that there are at least n! combinations, and the factorials blow up quickly. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 4 / 35

Introduction For n = 6, this gives us at least 6! = 720 combinations. Then, we are motivated to try and derive a formula to compute the number of combinations for a lock with n buttons, since writing out each of 720 combinations is not desirable. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 5 / 35

Introduction Let a n be the number of combinations for an n-button lock. Then, note that a 0, the number of combinations for a 0-button lock, is equal to 1 (the only combination is no buttons pressed). Further, for any n > 0, a valid combination comprises an initial push of k buttons, for 1 k n, followed by a combination formed with the remaining n k buttons. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 6 / 35

Introduction This leads us to a recurrence relation: a n = ( ) ( ) ( ) ( ) ( ) n n n n n n a n k = a n 1 + a n 2 + + a 1 + a 0, k 1 2 n 1 n k=1 where ( n k) represents the number of ways to pick the initial k buttons and a n k represents the number of ways to choose all of the remaining n k buttons. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 7 / 35

Introduction Let s try out our formula using n = 3. Using our recurrence relation, ( ) ( ) ( ) 3 3 3 a 3 = a 2 + a 1 + a 0 1 2 3 ( ) ( ) ( ) 3 3 3 = (3) + (1) + (1) 1 2 3 = (3 3) + (3 1) + (1 1) = 13 This matches the value we had earlier. Naturally, we would like to try and find a closed-form equation instead of a recursive one. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 8 / 35

Introduction Let s try out our formula using n = 3. Using our recurrence relation, ( ) ( ) ( ) 3 3 3 a 3 = a 2 + a 1 + a 0 1 2 3 ( ) ( ) ( ) 3 3 3 = (3) + (1) + (1) 1 2 3 = (3 3) + (3 1) + (1 1) = 13 This matches the value we had earlier. Naturally, we would like to try and find a closed-form equation instead of a recursive one. This is a task we will accomplish through the use of some infinite series and integrals. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 8 / 35

Introduction Let s try out our formula using n = 3. Using our recurrence relation, ( ) ( ) ( ) 3 3 3 a 3 = a 2 + a 1 + a 0 1 2 3 ( ) ( ) ( ) 3 3 3 = (3) + (1) + (1) 1 2 3 = (3 3) + (3 1) + (1 1) = 13 This matches the value we had earlier. Naturally, we would like to try and find a closed-form equation instead of a recursive one. This is a task we will accomplish through the use of some infinite series and integrals. For the duration of the talk, we will adopt the convention that 0 0 = 1 strictly for notational convenience. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 8 / 35

A new recursive formula We now take our relation ( ) ( ) ( ) ( ) ( ) n n n n n n a n = a n k = a n 1 + a n 2 + + a 1 + a 0, k 1 2 n 1 n k=1 and put in the values of the binomial coefficients: n! a n = (n 1)!1! a n 1 + ( = n! n! (n 2)!2! a n 2 + + a n 1 (n 1)!1! + a n 2 (n 2)!2! + + a 1 1!(n 1)! + a 0 0!n! n! 1!(n 1)! a 1 + n! 0!n! a 0 ). Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 9 / 35

A new recursive formula We now take our relation ( ) ( ) ( ) ( ) ( ) n n n n n n a n = a n k = a n 1 + a n 2 + + a 1 + a 0, k 1 2 n 1 n k=1 and put in the values of the binomial coefficients: n! a n = (n 1)!1! a n 1 + ( = n! n! (n 2)!2! a n 2 + + a n 1 (n 1)!1! + a n 2 (n 2)!2! + + a 1 1!(n 1)! + a 0 0!n! n! 1!(n 1)! a 1 + n! 0!n! a 0 ). We notice a relationship in the terms of the sum between each a k and the first factorial in the denominator. We thus define a new term b n = a n / n! and rewrite the relation: a n = n! ( bn 1 1! + b n 2 2! + + b ) 0 n! Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 9 / 35

A new recursive formula ( bn 1 a n = n! + b n 2 + + b ) 0 1! 2! n! Finally, since b n = a n / n!, we divide by n! to get b n = a ( n n! = bn 1 + b n 2 + + b ) 0 = 1! 2! n! n k=1 b n k. k! This relation is a bit simpler than our original one, so it may be easier to find a closed equation for b n first and then get one for a n. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 10 / 35

The calculus begins Theorem 1 For all n > 0, 1 2(ln2) n b n 1 (ln2) n We consider the generating function f (x) = b n x n. n=0 It can be shown using Theorem 1 that the series is absolutely convergent for x < ln2. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 11 / 35

And continues. Then, for x < ln 2, f (x) = b 0 + = 1 + b n x n n=1 ( b0 1! x1 ( b0 ) ( b1 + 1! x2 + b ) 0 2! x2 = 1 + 1! x1 + b 1 1! x2 + b 2 1! x3 + b n k = 1 + x n k=1 n=k k! x k = 1 + b n x n k! k=1 n=0 = 1 + (e x 1)f (x) ( b2 + 1! x3 + b 1 2! x3 + b 0 3! x3 ( b0 2! x2 + b 1 2! x3 + ) + From this, we get that f (x) = 1 2 e for x < ln2. x ) + ) + Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 12 / 35

And continues.. If b n x n is the power series representation of f at 0, then we know that n=0 the coefficients, b n, have the form b n = f (n) (0). n! Recall that b n = a n / n!, which implies that or a n = f (n) (0), a n = d n ( 1 dx n 2 e x ). x=0 However, this formula is still problematic, since we must calculate each intermediary derivative to get to the n th one if we wish to use it. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 13 / 35

And continues... To get past this problem, we can view f (x) as a geometric series: Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 14 / 35

And continues... To get past this problem, we can view f (x) as a geometric series: 1 1 2 e x = 2 (1) 1 2 (2 ex ) = 1/2 1 e x /2 = 1 ( e x ) k, 2 k=0 2 as long as the series converges, which is for e x /2 < 1. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 14 / 35

And continues... To get past this problem, we can view f (x) as a geometric series: 1 1 2 e x = 2 (1) 1 2 (2 ex ) = 1/2 1 e x /2 = 1 ( e x ) k, 2 k=0 2 as long as the series converges, which is for e x /2 < 1. Since e x /2 is always positive, this becomes e x 2 < 1 = ex < 2 = x < ln2. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 14 / 35

And continues... To get past this problem, we can view f (x) as a geometric series: 1 1 2 e x = 2 (1) 1 2 (2 ex ) = 1/2 1 e x /2 = 1 ( e x ) k, 2 k=0 2 as long as the series converges, which is for e x /2 < 1. Since e x /2 is always positive, this becomes e x Then, because 0 < ln 2, 2 < 1 = ex < 2 = x < ln2. [ a n = d n ( 1 e x ) ] k dx n = 1 ( e k n 0 ) k = 1 k n 2 2 2 2 2 x=0 2 k. k=0 k=0 k=0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 14 / 35

And now, integrals We can approximate the sum k=0 k n 2 k 0 x n 2 x dx, Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 15 / 35

And now, integrals We can approximate the sum k=0 k n 2 k 0 x n 2 x dx, but first we want to make the substitutions u = x ln2 = x = u/ln2 and dx = 1/ln2 du: Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 15 / 35

And now, integrals We can approximate the sum k=0 k n 2 k 0 x n 2 x dx, but first we want to make the substitutions u = x ln2 = x = u/ln2 and dx = 1/ln2 du: x n 0 2 x dx = 0 1 = (ln2) n+1 (u/(ln2)) n 2 u/(ln2) u n 0 1 ln2 du = 1 (ln2) n+1 0 e u du. u n ( 2 (1/ln2) ) u du Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 15 / 35

Integrals, continued We focus now on the new integral and use integration by parts n times (choosing the constituent parts wisely): u n 0 du = lim eu b n k=0 n! (n k)! u n k e u b 0 = n n! (n k)! k=0 0 n k e 0. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 16 / 35

Integrals, continued We focus now on the new integral and use integration by parts n times (choosing the constituent parts wisely): u n 0 du = lim eu b n k=0 n! (n k)! u n k e u b 0 = n n! (n k)! k=0 0 n k e 0. We note that every term in the sum is equal to 0 except the last, which is n! 0 0 (n n)! e 0 = n! 1 0! 1 = n!. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 16 / 35

Integrals, continued We focus now on the new integral and use integration by parts n times (choosing the constituent parts wisely): u n 0 du = lim eu b n k=0 n! (n k)! u n k e u b 0 = n n! (n k)! k=0 0 n k e 0. We note that every term in the sum is equal to 0 except the last, which is n! 0 0 (n n)! e 0 = n! 1 0! 1 = n!. Referring back to our estimation of a n, this gives us a n = 1 2 k=0 k n 2 k 1 2 0 x n 2 x dx = 1 u n 2(ln2) n+1 0 e u du = n! 2(ln2) n+1. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 16 / 35

A brief recap We ve derived the following formulas for a n so far: 1 a n = ( ) ( ) ( ) ( ) ( ) n n n n n n a n k = a n 1 + a n 2 + + a 1 + k 1 2 n 1 n k=1 2 a n = d n 3 a n = 1 2 4 a n dx n ( 1 2 e x k n k=0 2 k n! 2(ln2) n+1 ) x=0 a 0 We now wish to determine just how accurate our last approximation is. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 17 / 35

Some more calculus We begin by defining a function g such that for n N, for all x [0, ), g (x) := x n /e x. The First Derivative Test will show us that g is increasing on [0, n/ ln 2] and decreasing on [n/ ln 2, ). Hence, g has a local maximum at x = n/ln2. We are going to use rectangles to approximate the integral 0 x n e x dx. Instead of using the height at left-or-right endpoints, however, we will be using the suprema (least upper bound) and infima (greatest lower bound) of g in each subinterval. These are called Darboux sums. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 18 / 35

A pictoral interlude Break the interval [0, ) into subintervals [0,1],[1,2],, and define j = n/ln2. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 19 / 35

Back to work Recall that g has a max at x = n/ln2. The value of g at this point is (n/ln2) n n n ( 2 n/ln2 = ( ) 2 1/ln2 n = n ) n. (ln2) n e ln2 Then, the sum of the areas of the rectangles from the previous slide is Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 20 / 35

Back to work Recall that g has a max at x = n/ln2. The value of g at this point is (n/ln2) n n n ( 2 n/ln2 = ( ) 2 1/ln2 n = n ) n. (ln2) n e ln2 Then, the sum of the areas of the rectangles from the previous slide is j k n ( 2 k + n ) n (k) n + e ln2 2 k k=1 k=j +1 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 20 / 35

Back to work Recall that g has a max at x = n/ln2. The value of g at this point is (n/ln2) n n n ( 2 n/ln2 = ( ) 2 1/ln2 n = n ) n. (ln2) n e ln2 Then, the sum of the areas of the rectangles from the previous slide is j k n ( k=1 2 k + n ) n (k) n + e ln2 k=j +1 2 k k n ( = 2 k + n ) n ( n ) n. = 2an + e ln2 e ln2 k=0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 20 / 35

An answer at last The approximation is clearly greater than the value of the integral, so this gives us x n 0 ( 2 x dx < 2a n ) n 1 ( n ) n n + = < an e ln2 2 e ln2 A similar process for an underestimation of the integral yields Hence, we have n! a n 2(ln2) n+1 < 1 ( n ) n. 2 e ln2 a n n! 2(ln2) n+1 < 1 ( n ) n, 2 e ln2 which means our approximation is within 1 2 ( n e ln2) n of an. n! 2(ln2) n+1. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 21 / 35

An unexpected result The error bound we found is a function that increases with n. Despite this, we can show that a n lim n n! /[ 2(ln2) n+1] = 1. The proof uses our derived error bounds, Stirling s Formula, and the Squeeze Theorem to show that lim n a n n! /[ 2(ln2) n+1] 1 = 0. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 22 / 35

An unexpected result This may initially seem counter-intuitive, since the error is increasing, but consider as a simple example n 3 + n 2 and n 3. The error between them is n 2, which increases quadratically with n, but n 3 + n 2 lim n n 3 = 1. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 23 / 35

Finally, some combinatorics Instead of approximating a n via the methods we have gone through, we can also simply just evaluate the infinite sum. For n 0, define Recalling our formula it is clear that h n (x) = a n = 1 2 k n x k. k=0 k=0 a n = 1 2 h n k n 2 k, So, by finding formulas for each h n, we can find a formula for a n. ( 1 2 ). Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 24 / 35

But first, some preliminary calculus (Ha!) Looking at h 0 (x), we have h 0 (x) = k 0 x k = k=0 k=0 x k = 1 1 x 1 < x < 1. We now look at the differentiation of the series: h n (x) = k n k x k 1 = k n+1 x k 1, k=0 k=0 from which we can get xh n (x) = k n+1 x k = h n+1 (x). k=0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 25 / 35

Yet another recurrence Given our newly found recurrence, xh n (x) = h n+1(x), we look at its particular values for n 5 : h 0 (x) = 1 1 x x h 1 (x) = (1 x) 2 h 2 (x) = x + x2 (1 x) 3 h 3 (x) = x + 4x2 + x 3 (1 x) 4 h 4 (x) = x + 11x2 + 11x 3 + x 4 (1 x) 5 h 5 (x) = x + 26x2 + 66x 3 + 26x 4 + x 5 (1 x) 6 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 26 / 35

Some patterns of note We notice some patterns in each h n : Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 27 / 35

Some patterns of note We notice some patterns in each h n : 1 The numerator contains a polynomial of degree n. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 27 / 35

Some patterns of note We notice some patterns in each h n : 1 The numerator contains a polynomial of degree n. 2 The coefficients of the polynomial appear to be symmetric. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 27 / 35

Some patterns of note We notice some patterns in each h n : 1 The numerator contains a polynomial of degree n. 2 The coefficients of the polynomial appear to be symmetric. 3 The denominator is always (1 x) n+1. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 27 / 35

Some patterns of note We notice some patterns in each h n : 1 The numerator contains a polynomial of degree n. 2 The coefficients of the polynomial appear to be symmetric. 3 The denominator is always (1 x) n+1. We define now A n,k to be the coefficient of x k in h n. For example, given A 4,3 = 11. h 4 (x) = x + 11x2 + 11x 3 + x 4 (1 x) 5, Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 27 / 35

This is the last recurrence relation Theorem 2 For all n 1, n k=1 h n (x) = A n,k x k (1 x) n+1 where A n,k is defined by the following recurrence: A n,1 = A n,n = 1, A n+1 = k A n,k + (n + 2 k)a n,k 1, for2 k n The proof of Theorem 2 follows by induction. Since we have a formula for A n,k now, we will compute them for the first few values of n. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 28 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 1 + 1 = 2 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 1 + 1 = 2 1 + 4 + 1 = 6 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 1 + 1 = 2 1 + 4 + 1 = 6 1 + 11 + 11 + 1 = 24 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 1 + 1 = 2 1 + 4 + 1 = 6 1 + 11 + 11 + 1 = 24 1 + 26 + 66 + 26 + 1 = 120 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Like Pascal s Triangle, only not 1 1 1 1 4 1 1 11 11 1 1 26 66 26 1 These do in fact match the coefficients we found earlier. Recall (or learn anew) that the numbers in the n th row of Pascal s Triangle sum to 2 n. Let s sum the rows of this triangle to see if we get anything interesting: 1 = 1 1 + 1 = 2 1 + 4 + 1 = 6 1 + 11 + 11 + 1 = 24 1 + 26 + 66 + 26 + 1 = 120 These are the factorials! Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 29 / 35

Eulerean numbers The A n,k s we defined earlier are, in fact, already well known in combinatorics as the Eulerean numbers, and they denote the number of n-permutations with k increasing runs. As a reminder, an n-permutation is a permutation of 1,2,,n. A definition of an increasing run is as follows: Increasing run For an n-permutation (s 1 s 2 s n ), a sequence of terms s i s i+1 s k where i k, s j < s j +1 for i j < k, and either k = n or s k > s k+1. Example: The permutation (1 4 3 5 2) has the increasing runs (1 4), (3 5), and (2). Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 30 / 35

No calculus appears on this slide The patterns we noticed earlier are in fact properties of the Eulerean numbers: Theorem 3 For all n 1, (a) n k=1 A n,k = n!, (b) A n,k = A n,n+1 k for1 k n. Part (a) is obvious from the definition of A n,k. A proof of part (b) appears in [Advanced Combinatorics by L. Comtet, p. 242]. Recalling that a n = (1/2)h n (1/2), we can now say ( ) n 1 k=1 a n = A n,k(1/2) k n 2 (1 (1/2)) n+1 = A n,k 2 n k. k=1 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 31 / 35

Interpreting the formula The equation a n = n A n,k 2 n k has a natural interpretation for the lock k=1 combinations. If we take an n-permutation with k increasing runs, we can delimit the runs as seen for (4 1 3 2 5 6): (4 13 256). Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 32 / 35

Interpreting the formula The equation a n = n A n,k 2 n k has a natural interpretation for the lock k=1 combinations. If we take an n-permutation with k increasing runs, we can delimit the runs as seen for (4 1 3 2 5 6): (4 13 256). The most obvious combination we can get from this is ({4}, {1,3}, {2,5,6}), but we can also create other combinations by limiting any of the remaining spots. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 32 / 35

Interpreting the formula The equation a n = n A n,k 2 n k has a natural interpretation for the lock k=1 combinations. If we take an n-permutation with k increasing runs, we can delimit the runs as seen for (4 1 3 2 5 6): (4 13 256). The most obvious combination we can get from this is ({4}, {1,3}, {2,5,6}), but we can also create other combinations by limiting any of the remaining spots. This gives us 2 n k combinations for each n-permutation with k increasing runs, of which there are A n,k. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 32 / 35

Interpreting the formula The equation a n = n A n,k 2 n k has a natural interpretation for the lock k=1 combinations. If we take an n-permutation with k increasing runs, we can delimit the runs as seen for (4 1 3 2 5 6): (4 13 256). The most obvious combination we can get from this is ({4}, {1,3}, {2,5,6}), but we can also create other combinations by limiting any of the remaining spots. This gives us 2 n k combinations for each n-permutation with k increasing runs, of which there are A n,k. A formula does exist for A n,k (see Comtet, pp. 243), we can combine it with the above formula to get ( ) n k 1 a n = ( 1) i n + 1 (k i ) n 2 n k. i k=1 i=0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 32 / 35

The Stirling numbers of the second kind Stirling number of the second kind For n N and 1 k n, the Stirling number of the second kind, denoted S(n,k) is equal to the number of ways to partition the set {1, 2,, n} into k unordered non-empty subsets. A combination lock is of course an ordered partition, and if we have k subsets, there are k! ways to order them. Hence, n a n = k!s(n,k). k=1 A formula for S(n,k) exists as well (Comtet, pp. 204-205): ( ) S(n,k) = 1 k 1 ( 1) n k (k i ) n. k! i i=0 Thus, we get our last formula for a n : ( ) n k 1 a n = ( 1) n k (k i ) n. i k=1 i=0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 33 / 35

Wrapping up Here are all of our formulas for a n : ( ) ( ) ( ) ( ) ( ) n n n n n n 1 a n = a n k = a n 1 + a n 2 + + a 1 + k=1 k 1 2 n 1 n 2 a n = d n ( ) 1 dx n 2 e x x=0 3 a n = 1 2 k n k=0 2 k n! 4 a n 2(ln2) n+1 ( ) n k 1 5 a n = ( 1) i n + 1 (k i ) n 2 n k k=1 i=0 i ( ) n k 1 6 a n = ( 1) n k (k i ) n i k=1 i=0 a 0 Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 34 / 35

References 1. L. Comtet, Advanced Combinatorics, D. Reidel, Dordrecht-Holland, 1974 2. D. Velleman and G. Call, Permutations and combination locks, Mathematics Magazine 68 (1995) 243-252. Tim Sasaki (Western Oregon University) Combination Locks and Permutations April 9, 2011 35 / 35