Math 3012 Applied Combinatorics Lecture 2

Similar documents
Chapter 7. Intro to Counting

JIGSAW ACTIVITY, TASK # Make sure your answer in written in the correct order. Highest powers of x should come first, down to the lowest powers.

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Unit Nine Precalculus Practice Test Probability & Statistics. Name: Period: Date: NON-CALCULATOR SECTION

Permutations and Combinations

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

CSE 21 Mathematics for Algorithm and System Analysis

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Discrete Mathematics with Applications MATH236

Counting. Chapter 6. With Question/Answer Animations

n r for the number. (n r)!r!

Strings. A string is a list of symbols in a particular order.

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Elementary Combinatorics

Topics to be covered

Counting in Algorithms

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Introductory Probability

Week 1: Probability models and counting

Combinatorics and Intuitive Probability

11.3B Warmup. 1. Expand: 2x. 2. Express the expansion of 2x. using combinations. 3. Simplify: a 2b a 2b

LAMC Junior Circle February 3, Oleg Gleizer. Warm-up

MAT 409 Semester Exam: 80 points

Simple Counting Problems

Unit 5 Radical Functions & Combinatorics

Solutions to Exercises on Page 86

The Problem. Tom Davis December 19, 2016

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday

Math 1111 Math Exam Study Guide

Fundamentals of Probability

50 Counting Questions

Permutations and Combinations. MATH 107: Finite Mathematics University of Louisville. March 3, 2014

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors?

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

With Question/Answer Animations. Chapter 6

Counting integral solutions

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

PARTICIPANT Guide. Unit 2

CIS 2033 Lecture 6, Spring 2017

November 6, Chapter 8: Probability: The Mathematics of Chance

7.4 Permutations and Combinations

DISCRETE STRUCTURES COUNTING

Math 1111 Math Exam Study Guide

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

POKER (AN INTRODUCTION TO COUNTING)

code V(n,k) := words module

1 Permutations. 1.1 Example 1. Lisa Yan CS 109 Combinatorics. Lecture Notes #2 June 27, 2018

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min)

Introduction to Counting Homework Solutions

CPCS 222 Discrete Structures I Counting

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

PERMUTATIONS AND COMBINATIONS

Algebra. Recap: Elements of Set Theory.

Introduction to Mathematical Reasoning, Saylor 111

MATH 2420 Discrete Mathematics Lecture notes

Non-overlapping permutation patterns

Discrete Structures Lecture Permutations and Combinations

Week 6: Advance applications of the PIE. 17 and 19 of October, 2018

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

Week 3 Classical Probability, Part I

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

In how many ways can the letters of SEA be arranged? In how many ways can the letters of SEE be arranged?

Reading 14 : Counting

A slope of a line is the ratio between the change in a vertical distance (rise) to the change in a horizontal

Facilitator Guide. Unit 2

Fall. Spring. Possible Summer Topics

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}?

Combinatorial Proofs

CS 237: Probability in Computing

n! = n(n 1)(n 2) 3 2 1

Discrete mathematics

Counting Things. Tom Davis March 17, 2006

Section : Combinations and Permutations

Counting Subsets with Repetitions. ICS 6C Sandy Irani

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017

Fundamental. If one event can occur m ways and another event can occur n ways, then the number of ways both events can occur is:.

INFLUENCE OF ENTRIES IN CRITICAL SETS OF ROOM SQUARES

Spring 06 Assignment 2: Constraint Satisfaction Problems

elements in S. It can tricky counting up the numbers of

Math 14 Lecture Notes Ch. 3.6

PROOFS OF SOME BINOMIAL IDENTITIES USING THE METHOD OF LAST SQUARES

STATISTICAL COUNTING TECHNIQUES

Combinatorial Expressions Involving Fibonacci, Hyperfibonacci, and Incomplete Fibonacci Numbers

Multiple Choice Questions for Review

Chapter 2. Permutations and Combinations

FOURTH LECTURE : SEPTEMBER 18, 2014

19.2 Permutations and Probability Combinations and Probability.

Counting and Probability Math 2320

Grade 7/8 Math Circles November 8 & 9, Combinatorial Counting

In this section, we will learn to. 1. Use the Multiplication Principle for Events. Cheesecake Factory. Outback Steakhouse. P.F. Chang s.

@CRC Press. Discrete Mathematics. with Ducks. sarah-marie belcastro. let this be your watchword. serious mathematics treated with levity

Discrete Structures for Computer Science

Lecture 18 - Counting

Transcription:

August 20, 2015 Math 3012 Applied Combinatorics Lecture 2 William T. Trotter trotter@math.gatech.edu

The Road Ahead Alert The next two to three lectures will be an integrated approach to material from Chapters 2, 3 and 4. Please read these three Chapters in order concurrently or even in advance of the discussions we will have in class. Homework assignments will be posted, with odd ones to enhance the pace of your understanding as full solutions will be available. A few even number problems will be assigned and these will be collected for grading.

An Introduction to Strings Let n be a positive integer and let [n] = {1, 2,, n}. A sequence of length n such as (a 1, a 2,, a n ) is called a string (also a word, an array or a vector). The entries in a string are called characters, letters, coordinates, etc. The set of possible entries is called the alphabet.

Examples 010010100010110011101 - a bit string 201002211001020 a ternary string abcacbaccbbaaccbabaddbbadcabbd a word from a four letter alphabet. NHZ 4235 A Georgia auto license plate I love mathematics (really)!! - a word from an alphabet with 59 letters upper and lower cases, spaces and punctuation.

Arrays in Computer Languages Example int A[10]; for (i = 0; i < 10; i++) { A[i] = 2*i + 3; } Display 3579111315171921 (Bad formatting!) 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 (Better) 3 5 7 9 11 13 15 17 19 21 (Even better)

The First Principle of Enumeration Observation If a project can be considered as a sequence of n tasks which are carried out in order, and for each i, the number of ways to do Task i is m i, then the total number of ways the project can be done is: m 1 x m 2 x m 3 x m n

Consequences Fact The number of bit strings of length n is 2 n. Fact The number of words of length n from an m letter alphabet is m n. Fact The number of Georgia license auto license plates is 26 3 10 4.

Permutations Repetition not allowed Examples 12 7 8 6 4 9 11 Yes X y a A D 7 B E 9 Yes 5 b 7 2 4 9 A 7 6 X No Fact The number of permutations of length n from an m letter alphabet is: P(m, n) = m (m 1) (m 2) (m n + 1). Language P(m, n) is the number of permutations of m objects taken n at a time.

How to Answer a Question Question How many permutations of 68 objects taken 23 at a time? Answer P(68, 23) Comment In almost all situations, I want you to stop right there and leave it to the dedicated reader to determine exactly what the value of P(68, 23) turns out to be. After all, this is just arithmetic. However, if you re really curious, P(68, 23) turns out to be: 20732231223375515741894286164203929600000

Permutations and Combinations Contrasting Problems Problem 1 A group of 250 students holds elections to identify a class president, a vice-president, and a treasurer. How many different outcomes are possible. Problem 2 A group of 250 students holds elections to select a leadership committee consisting of three persons. How many different outcomes are possible?

Permutations and Combinations Solutions Problem 1 A group of 250 students holds elections to identify a class president, a vice-president, and a treasurer. How many different outcomes are possible. Answer P(250, 3) = 250 * 249 * 248

Permutations and Combinations Solutions Problem 2 A group of 250 students holds elections to select a leadership committee consisting of three persons. How many different outcomes are possible? Answer C(250, 3) = 250 * 249 * 248 ------------------- 1 * 2 * 3 Read this answer as the number of combinations of 250 objects, taken 3 at a time.

Binomial Coefficients In Line Notation C(38, 17) = P(38, 17)/17! = 38!/(21! 17!) Graphic Notation 38 17 Read this: 38 choose 17

Binomial Coefficients Basic Definition 38 17 = 38! 17!21! Note To compute this binomial coefficient, you have to do a lot of multiplication and some division. Maybe there is an alternative way??!!

Beware Dot, dot, dot!!! Question What is the next term: 1, 4, 9, 16, 25? Question What is the next term: 1, 1, 2, 3, 5, 8, 13? Question What is the sum 1 + 2 + 3 + + 6? Question What is really meant by the definitions: n! = n * (n 1) * (n 2) * 3 * 2 * 1 P(m, n) = m * (m 1) * (m 2) * * (m n + 1)

A Better Way Observation Rather than writing 1, 4, 9, 16, 25, be explicit and write: a n = n 2 Observation Rather than writing 1, 1, 2, 3, 5, 8, 13, be explicit and write: a 1 = 1; a 2 = 1; and when n 3, a n = a n-2 + a n-1.

A Better Way Observation Rather than writing 1 + 2 + 6, say the sum of the first six positive integer. Observation An even better way: Define S 0 = 0 and when n 1, S n = n + S n-1. Then reference S 6.

A Better Way Definition 0! = 1 and when n > 1, n! = n * (n-1)! Example 5! = 5 * 4! 4! = 4 * 3! 3! = 3 * 2! 2! = 2 * 1! 1! = 1 * 0! Backtracking We obtain 1! = 1, 2! = 2, 3! = 6, 4! = 24 and 5! = 120

A Better Way Definition P(m, 1) = m and when 1 < n m, P(m, n) = (m n + 1) * P(m, n 1). Example P(7, 4) = (7 4 + 1) * P(7, 3) = 4 * P(7, 3) P(7, 3) = (7 3 + 1) * P(7, 2) = 5 * P(7, 2) P(7, 2) = (7 2 + 1) * P(7, 1) = 6 * P(7, 1) P(7, 1) = 7 Backtracking We obtain P(7, 2) = 6 * 7 = 42 P(7, 3) = 5 * 42 = 210 P(7, 4) = 4 * 210 = 840

Coding Basics Declaration int factorial ( int n); Definition int factorial { int n) { if (n == 0) return 1; else return (n) * factorial (n 1); }

Coding Basics Declaration int permutation (int m, int n); Definition int permutation {int m, int n) { if (n == 1) return m; else return (m n + 1) * permutation(m, n 1); }

Bit-strings and Subsets Equivalent Problems Problem 1 17 ones? How many bit strings of length 38 have exactly Problem 2 How many subsets of size 17 in a set of size 38? Answer C(38, 17) = P(38, 17)/17! = 38!/(21! 17!)

Basic Identities Complements n k = n n k Eliminating Multiplication n 1 k + n 1 k 1 = n k

Pascal s Triangle n 1 k + n 1 k 1 = n k 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1

Combinatorial Identities First Grade Formula n 0 + n 1 + n 2 + + n n = 2n Second Grade Formula n 1 k + n 1 k 1 = n k Third Grade Formula n 0 2n + n 1 2n 1 + n 2 2n 2 + + n n 20 = 3 n

Enumerating Distributions Basic Enumeration Problem Given a set of m objects and n cells (boxes, bins, etc.), how many ways can they be distributed? Side Constraints 1. Distinct/non-distinct objects 2. Distinct/non-distinct cells 3. Empty cells allowed/not allowed. 4. Upper and lower bounds on number of objects in a cell.

Binomial Coefficients Everywhere Foundational Enumeration Problem Given a set of m identical objects and n distinct cells, the number of ways they can be distributed with the requirement that no cell is empty is m 1 n 1 Explanation A A A A A A A A A A A A A A A A A A A A A A A m objects, m 1 gaps. Choose n 1 of them. In this example, there are 23 objects and 6 cells. We have illustrated the distribution (6, 2, 4, 7, 1, 3).