Combinatorics Combinatorics I Combinatorics II Product Rule Sum Rule I Sum Rule II

Total Page:16

File Type:pdf, Size:1020Kb

Combinatorics Combinatorics I Combinatorics II Product Rule Sum Rule I Sum Rule II Combinatorics I Combinatorics Introduction Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Combinatorics is the study of collections of objects. Specifically, counting objects, arrangement, derangement, etc. of objects along with their mathematical properties. Counting objects is important in order to analyze algorithms and Spring 2006 compute discrete probabilities. Originally, combinatorics was motivated by gambling: counting configurations is essential to elementary probability. Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 4.1-4.6 & 6.5-6.6 of Rosen [email protected] Combinatorics II Product Rule Introduction If two events are not mutually exclusive (that is, we do them separately), then we apply the product rule. A simple example: How many arrangements are there of a deck of 52 cards? Theorem (Product Rule) In addition, combinatorics can be used as a proof technique. Suppose a procedure can be accomplished with two disjoint A combinatorial proof is a proof method that uses counting subtasks. If there are n1 ways of doing the first task and n2 ways arguments to prove a statement. of doing the second, then there are n1 · n2 ways of doing the overall procedure. Sum Rule I Sum Rule II There is a natural generalization to any sequence of m tasks; If two events are mutually exclusive, that is, they cannot be done namely the number of ways m mutually exclusive events can occur at the same time, then we must apply the sum rule. is n1 + n2 + ··· nm−1 + nm Theorem (Sum Rule) We can give another formulation in terms of sets. Let If an event e1 can be done in n1 ways and an event e2 can be done A1,A2,...,Am be pairwise disjoint sets. Then in n2 ways and e1 and e2 are mutually exclusive, then the number of ways of both events occurring is |A1 ∪ A2 ∪ · · · ∪ Am| = |A1| + |A2| + ··· + |Am| n1 + n2 In fact, this is a special case of the general Principle of Inclusion-Exclusion. Principle of Inclusion-Exclusion (PIE) I Principle of Inclusion-Exclusion (PIE) II Introduction Introduction We cannot use the sum rule because we would be over counting the number of possible outcomes. Say there are two events, e1 and e2 for which there are n1 and n2 Instead, we have to count the number of possible outcomes of e1 possible outcomes respectively. and e2 minus the number of possible outcomes in common to both; i.e. the number of ways to do both “tasks”. Now, say that only one event can occur, not both. If again we think of them as sets, we have In this situation, we cannot apply the sum rule? Why? |A1| + |A2| − |A1 ∩ A2| Principle of Inclusion-Exclusion (PIE) III Principle of Inclusion-Exclusion (PIE) I Introduction Theorem More generally, we have the following. Theorem Lemma Let A1,A2,...,An be finite sets, then Let A, B be subsets of a finite set U. Then X |A1 ∪ A2 ∪ · · · ∪ An| = |Ai| 1. |A ∪ B| = |A| + |B| − |A ∩ B| i X 2. |A ∩ B| ≤ min{|A|, |B|} − |Ai ∩ Aj| i<j 3. |A \ B| = |A| − |A ∩ B| ≥ |A| − |B| X 4. |A| = |U| − |A| + |Ai ∩ Aj ∩ Ak| i<j<k 5. |A⊕B| = |A∪B|−|A∩B| = A+B−2|A∩B| = |A\B|+|B\A| − · · · 6. |A × B| = |A| × |B| n+1 +(−1) |A1 ∩ A2 ∩ · · · ∩ An| Principle of Inclusion-Exclusion (PIE) II Principle of Inclusion-Exclusion (PIE) III Theorem Theorem To illustrate, when n = 3, we have Each summation is over all i, pairs i, j with i < j, triples i, j, k |A1 ∪ A2 ∪ A3| = |A1| + |A2| + |A3| with i < j < k etc. − |A1 ∩ A2| + |A1 ∩ A3| + |A2 ∩ A3| +|A1 ∩ A2 ∩ A3| Principle of Inclusion-Exclusion (PIE) IV Principle of Inclusion-Exclusion (PIE) I Theorem Example I To illustrate, when n = 4, we have Example |A1 ∪ A2 ∪ A3 ∪ A4| = |A1| + |A2| + |A3| + |A4| h How many integers between 1 and 300 (inclusive) are − |A1 ∩ A2| + |A1 ∩ A3| + +|A1 ∩ A4| i 1. Divisible by at least one of 3, 5, 7? |A2 ∩ A3| + |A2 ∩ A4| + |A3 ∩ A4| 2. Divisible by 3 and by 5 but not by 7? h + |A1 ∩ A2 ∩ A3| + |A1 ∩ A2 ∩ A4| + 3. Divisible by 5 but by neither 3 nor 7? i |A ∩ A ∩ A | + |A ∩ A ∩ A | 1 3 4 2 3 4 Let −|A1 ∩ A2 ∩ A3 ∩ A4| A = {n | 1 ≤ n ≤ 300 ∧ 3 | n} B = {n | 1 ≤ n ≤ 300 ∧ 5 | n} C = {n | 1 ≤ n ≤ 300 ∧ 7 | n} Principle of Inclusion-Exclusion (PIE) II Principle of Inclusion-Exclusion (PIE) III Example I Example I By the principle of inclusion-exclusion, we have that How big are each of these sets? We can easily use the floor |A ∪ B ∪ C| = |A| + |B| + |C| function; h i |A| = b300/3c = 100 − |A ∩ B| + |A ∩ C| + |B ∩ C| |B| = b300/5c = 60 +|A ∩ B ∩ C| |C| = b300/7c = 42 For (1) above, we are asked to find |A ∪ B ∪ C|. It remains to find the final 4 cardinalities. All three divisors, 3, 5, 7 are relatively prime. Thus, any integer that is divisible by both 3 and 5 must simply be divisible by 15. Principle of Inclusion-Exclusion (PIE) IV Principle of Inclusion-Exclusion (PIE) V Example I Example I Using the same reasoning for all pairs (and the triple) we have For (2) above, it is enough to find |A ∩ B| = b300/15c = 20 |A ∩ C| = b300/21c = 14 |(A ∩ B) \ C| |B ∩ C| = b300/35c = 8 |A ∩ B ∩ C| = b300/105c = 2 By the definition of set-minus, Therefore, |(A ∩ B) \ C| = |A ∩ B| − |A ∩ B ∩ C| = 20 − 2 = 18 |A ∪ B ∪ C| = 100 + 60 + 42 − 20 − 14 − 8 + 2 = 162 Principle of Inclusion-Exclusion (PIE) VI Principle of Inclusion-Exclusion (PIE) I Example I Example II For (3) above, we are asked to find The principle of inclusion-exclusion can be used to count the number of onto functions. |B \ (A ∪ C)| = |B| − |B ∩ (A ∪ C)| Theorem By distributing B over the intersection, we get Let A, B be non-empty sets of cardinality m, n with m ≥ n. Then |B ∩ (A ∪ C)| = |(B ∩ A) ∪ (B ∩ C)| there are = |B ∩ A| + |B ∩ C| − |(B ∩ A) ∩ (B ∩ C)| n n n = |B ∩ A| + |B ∩ C| − |B ∩ A ∩ C| nm − (n − 1)m + (n − 2)m − · · · + (−1)n−1 1m 1 2 n − 1 = 20 + 8 − 2 = 26 i.e. Pn−1(−1)in(n − i)m onto functions f : A → B. So the answer is |B| − 26 = 60 − 26 = 34. i=0 i See textbook page 460. Principle of Inclusion-Exclusion (PIE) II Principle of Inclusion-Exclusion (PIE) III Example II Example II Example How many ways of giving out 6 pieces of candy to 3 children if To count how many there are, we apply the theorem and get (for each child must receive at least one piece? m = 6, n = 3), 3 3 This can be modeled by letting A represent the set of candies and 36 − (3 − 1)6 + (3 − 2)6 = 540 B be the set of children. 1 2 Then a function f : A → B can be interpreted as giving candy ai to child cj. Since each child must receive at least one candy, we are considering only onto functions. Derangements I Derangements II This can be modeled using derangements: permutations of objects such that no element is in its original position. Consider the hatcheck problem. For example, 21453 is a derangement of 12345, but 21543 is not. I An employee checks hats from n customers. Theorem I However, he forgets to tag them. The number of derangements of a set with n elements is I When customer’s check-out their hats, they are given one at random. 1 1 1 1 D = n! 1 − + − + ··· (−1)n n 1! 2! 3! n! What is the probability that no one will get their hat back? See textbook page 461. Derangements III The Pigeonhole Principle I Thus, the answer to the hatcheck problem is The pigeonhole principle states that if there are more pigeons than Dn there are roosts (pigeonholes), for at least one pigeonhole, more n! than two pigeons must be in it. Its interesting to note that Theorem (Pigeonhole Principle) 1 1 1 1 e−1 = 1 − + − + ··· + (−1)n ··· 1! 2! 3! n! If k + 1 or more objects are placed into k boxes, then there is at least one box containing two ore more objects. So that the probability of the hatcheck problem converges; D This is a fundamental tool of elementary discrete mathematics. It lim n = e−1 = .368 ... n→∞ n! is also known as the Dirichlet Drawer Principle. The Pigeonhole Principle II Generalized Pigeonhole Principle I It is seemingly simple, but very powerful. The difficulty comes in where and how to apply it. Theorem Some simple applications in computer science: If N objects are placed into k boxes then there is at least one box Calculating the probability of Hash functions having a containing at least I N collision. k I Proving that there can be no lossless compression algorithm compressing all files to within a certain ratio. Example Lemma In any group of 367 or more people, at least two of them must For two finite sets A, B there exists a bijection f : A → B if and have been born on the same date. only if |A| = |B|. Generalized Pigeonhole Principle II Generalized Pigeonhole Principle III Example A probabilistic generalization states that if n objects are randomly put into m boxes with uniform probability (each object is placed in Among 10 people, what is the probability that two or more will a given box with probability 1/m) then at least one box will hold have the same birthday? more than one object with probability, Here, n = 10 and m = 365 (ignore leapyears).
Recommended publications
  • Combinatorial Proof of an Abel-Type Identity∗
    Combinatorial Proof of an Abel-type Identity∗ P. Mark Kayll Department of Mathematical Sciences, University of Montana Missoula MT 59812-0864, USA [email protected] David Perkins Department of Mathematics and Computer Science Houghton College, Houghton NY 14744, USA [email protected] Identity (1) below resulted from our investigation in [21] of chip-firing games on complete graphs Kn, for n ≥ 1; see, e.g., [2] for antecedents. The left side expresses the sum of the probabilities of a game experiencing firing sequences of each possible length ℓ = 0, 1,...,n. This note gives a combinatorial proof that these probabilities sum to unity. We first manipulate n n − 1 n ℓℓ−1(n + 1 − ℓ)n−1−ℓ + = 1 (1) n + 1 µℓ¶ n(n + 1)n−1 Xℓ=1 into a form amenable to combinatorial proof. Multiplying by n(n+1)n and n n+1 using the relation ℓ = ℓ (n + 1 − ℓ)/(n + 1), we transform (1) to the equivalent form ¡ ¢ ¡ ¢ n n + 1 ℓℓ−2(n + 1 − ℓ)n−1−ℓℓ(n + 1 − ℓ) = 2n(n + 1)n−1. (2) µ ℓ ¶ Xℓ=1 To see that (2) holds, first observe that the right side enumerates the pairs (T,~e ), where T is a spanning tree of Kn+1 for which one edge e (of 2000 MSC: Primary 05A19; Secondary 05C30, 60C05. ∗Preprint to appear in J. Combin. Math. Combin. Comput. 1 its n edges) has been distinguished and oriented (in one of two possible directions). The left side also enumerates these pairs. Given (T,~e ), notice that deleting the oriented edge ~e from T leaves behind a spanning forest of Kn+1 with two components L, R (that we may consider ordered from left to right).
    [Show full text]
  • Useful Relations in Permutations and Combination 1. Useful Relations
    Useful Relations in Permutations and Combination 1. Useful Relations - Factorial n! = n.(n-1)! 2. n퐶푟= n푃푟/r! n n-1 3. Pr = n( Pr-1) 4. Useful Relations - Combinations n n 1. Cr = C(n - r) Example 8 8 C6 = C2 = 8×72×1 = 28 n 2. Cn = 1 n 3. C0 = 1 n n n n n 4. C0 + C1 + C2 + ... + Cn = 2 Example 4 4 4 4 4 4 C0 + C1 + C2 + C3+ C4 = (1 + 4 + 6 + 4 + 1) = 16 = 2 n n (n+1) Cr-1 + Cr = Cr (Pascal's Law) n퐶푟 =n/퐶푟−1=n-r+1/r n n If Cx = Cy then either x = y or (n-x) = y. 5. Selection from identical objects: Some Basic Facts The number of selections of r objects out of n identical objects is 1. Total number of selections of zero or more objects from n identical objects is n+1. 6. Permutations of Objects when All Objects are Not Distinct The number of ways in which n things can be arranged taking them all at a time, when st nd 푃1 of the things are exactly alike of 1 type, 푃2 of them are exactly alike of a 2 type, and th 푃푟of them are exactly alike of r type and the rest of all are distinct is n!/ 푃1! 푃2! ... 푃푟! 1 Example: how many ways can you arrange the letters in the word THESE? 5!/2!=120/2=60 Example: how many ways can you arrange the letters in the word REFERENCE? 9!/2!.4!=362880/2*24=7560 7.Circular Permutations: Case 1: when clockwise and anticlockwise arrangements are different Number of circular permutations (arrangements) of n different things is (n-1)! 1.
    [Show full text]
  • Combinatorics
    Combinatorics Problem: How to count without counting. I How do you figure out how many things there are with a certain property without actually enumerating all of them. Sometimes this requires a lot of cleverness and deep mathematical insights. But there are some standard techniques. I That's what we'll be studying. We sometimes use the bijection rule without even realizing it: I count how many people voted are in favor of something by counting the number of hands raised: I I'm hoping that there's a bijection between the people in favor and the hands raised! Bijection Rule The Bijection Rule: If f : A ! B is a bijection, then jAj = jBj. I We used this rule in defining cardinality for infinite sets. I Now we'll focus on finite sets. Bijection Rule The Bijection Rule: If f : A ! B is a bijection, then jAj = jBj. I We used this rule in defining cardinality for infinite sets. I Now we'll focus on finite sets. We sometimes use the bijection rule without even realizing it: I count how many people voted are in favor of something by counting the number of hands raised: I I'm hoping that there's a bijection between the people in favor and the hands raised! Answer: 26 choices for the first letter, 26 for the second, 10 choices for the first number, the second number, and the third number: 262 × 103 = 676; 000 Example 2: A traveling salesman wants to do a tour of all 50 state capitals. How many ways can he do this? Answer: 50 choices for the first place to visit, 49 for the second, .
    [Show full text]
  • Inclusion‒Exclusion Principle
    Inclusionexclusion principle 1 Inclusion–exclusion principle In combinatorics, the inclusion–exclusion principle (also known as the sieve principle) is an equation relating the sizes of two sets and their union. It states that if A and B are two (finite) sets, then The meaning of the statement is that the number of elements in the union of the two sets is the sum of the elements in each set, respectively, minus the number of elements that are in both. Similarly, for three sets A, B and C, This can be seen by counting how many times each region in the figure to the right is included in the right hand side. More generally, for finite sets A , ..., A , one has the identity 1 n This can be compactly written as The name comes from the idea that the principle is based on over-generous inclusion, followed by compensating exclusion. When n > 2 the exclusion of the pairwise intersections is (possibly) too severe, and the correct formula is as shown with alternating signs. This formula is attributed to Abraham de Moivre; it is sometimes also named for Daniel da Silva, Joseph Sylvester or Henri Poincaré. Inclusion–exclusion illustrated for three sets For the case of three sets A, B, C the inclusion–exclusion principle is illustrated in the graphic on the right. Proof Let A denote the union of the sets A , ..., A . To prove the 1 n Each term of the inclusion-exclusion formula inclusion–exclusion principle in general, we first have to verify the gradually corrects the count until finally each identity portion of the Venn Diagram is counted exactly once.
    [Show full text]
  • Math 958–Topics in Discrete Mathematics Spring Semester 2018 TR 09:30–10:45 in Avery Hall (AVH) 351 1 Instructor
    Math 958{Topics in Discrete Mathematics Spring Semester 2018 TR 09:30{10:45 in Avery Hall (AVH) 351 1 Instructor Dr. Tri Lai Assistant Professor Department of Mathematics University of Nebraska - Lincoln Lincoln, NE 68588-0130, USA Email: [email protected] Website: http://www.math.unl.edu/$\sim$tlai3/ Office: Avery Hall 339 Office Hours: By Appointment 2 Prerequisites Math 450. 3 Contacting me The best way to contact with me is by email, [email protected]. Please put \[MATH 958]" at the beginning of the title and make sure to include your whole name in your email. Using your official UNL email to contact me is strongly recommended. My office is Avery Hall 339. My office hours are by appoinment. 4 Course Description Bijective Combinatorics is a branch of combinatorics focusing on bijections between mathematical objects. The fact is that there many totally different objects in mathematics that are actually equinumerous, in this case, we always want to seek for a simple bijection between them. For example, the number of ways to divide that a convex (n + 2)-gon into triangles by non-intersecting diagonals is equal to the number of full binary trees with n + 1 leaves. Both objects are counted 1 2n by the well known Catalan number Cn = n+1 n . Do you know that there are more than two hundred (!!) mathematical objects are counted by the Catalan number? In this course, we will go over a number of such \Catalan objects" and investigate the beautiful bijections between them. One more example is the well-known theorem by Euler about integer partitions stating that the number of ways to write a positive integer n as the sum of distinct positive integers is equal to the number of ways to write n as the sum of odd positive integers.
    [Show full text]
  • STRUCTURE ENUMERATION and SAMPLING Chemical Structure Enumeration and Sampling Have Been Studied by Mathematicians, Computer
    STRUCTURE ENUMERATION AND SAMPLING MARKUS MERINGER To appear in Handbook of Chemoinformatics Algorithms Chemical structure enumeration and sampling have been studied by 5 mathematicians, computer scientists and chemists for quite a long time. Given a molecular formula plus, optionally, a list of structural con- straints, the typical questions are: (1) How many isomers exist? (2) Which are they? And, especially if (2) cannot be answered completely: (3) How to get a sample? 10 In this chapter we describe algorithms for solving these problems. The techniques are based on the representation of chemical compounds as molecular graphs (see Chapter 2), i.e. they are mainly applied to constitutional isomers. The major problem is that in silico molecular graphs have to be represented as labeled structures, while in chemical 15 compounds, the atoms are not labeled. The mathematical concept for approaching this problem is to consider orbits of labeled molecular graphs under the operation of the symmetric group. We have to solve the so–called isomorphism problem. According to our introductory questions, we distinguish several dis- 20 ciplines: counting, enumerating and sampling isomers. While counting only delivers the number of isomers, the remaining disciplines refer to constructive methods. Enumeration typically encompasses exhaustive and non–redundant methods, while sampling typically lacks these char- acteristics. However, sampling methods are sometimes better suited to 25 solve real–world problems. There is a wide range of applications where counting, enumeration and sampling techniques are helpful or even essential. Some of these applications are closely linked to other chapters of this book. Counting techniques deliver pure chemical information, they can help to estimate 30 or even determine sizes of chemical databases or compound libraries obtained from combinatorial chemistry.
    [Show full text]
  • Basic Combinatorics
    Basic Combinatorics Carl G. Wagner Department of Mathematics The University of Tennessee Knoxville, TN 37996-1300 Contents List of Figures iv List of Tables v 1 The Fibonacci Numbers From a Combinatorial Perspective 1 1.1 A Simple Counting Problem . 1 1.2 A Closed Form Expression for f(n) . 2 1.3 The Method of Generating Functions . 3 1.4 Approximation of f(n) . 4 2 Functions, Sequences, Words, and Distributions 5 2.1 Multisets and sets . 5 2.2 Functions . 6 2.3 Sequences and words . 7 2.4 Distributions . 7 2.5 The cardinality of a set . 8 2.6 The addition and multiplication rules . 9 2.7 Useful counting strategies . 11 2.8 The pigeonhole principle . 13 2.9 Functions with empty domain and/or codomain . 14 3 Subsets with Prescribed Cardinality 17 3.1 The power set of a set . 17 3.2 Binomial coefficients . 17 4 Sequences of Two Sorts of Things with Prescribed Frequency 23 4.1 A special sequence counting problem . 23 4.2 The binomial theorem . 24 4.3 Counting lattice paths in the plane . 26 5 Sequences of Integers with Prescribed Sum 28 5.1 Urn problems with indistinguishable balls . 28 5.2 The family of all compositions of n . 30 5.3 Upper bounds on the terms of sequences with prescribed sum . 31 i CONTENTS 6 Sequences of k Sorts of Things with Prescribed Frequency 33 6.1 Trinomial Coefficients . 33 6.2 The trinomial theorem . 35 6.3 Multinomial coefficients and the multinomial theorem . 37 7 Combinatorics and Probability 39 7.1 The Multinomial Distribution .
    [Show full text]
  • Counting: Permutations, Combinations
    CS 441 Discrete Mathematics for CS Lecture 17 Counting Milos Hauskrecht [email protected] 5329 Sennott Square CS 441 Discrete mathematics for CS M. Hauskrecht Counting • Assume we have a set of objects with certain properties • Counting is used to determine the number of these objects Examples: • Number of available phone numbers with 7 digits in the local calling area • Number of possible match starters (football, basketball) given the number of team members and their positions CS 441 Discrete mathematics for CS M. Hauskrecht 1 Basic counting rules • Counting problems may be hard, and easy solutions are not obvious • Approach: – simplify the solution by decomposing the problem • Two basic decomposition rules: – Product rule • A count decomposes into a sequence of dependent counts (“each element in the first count is associated with all elements of the second count”) – Sum rule • A count decomposes into a set of independent counts (“elements of counts are alternatives”) CS 441 Discrete mathematics for CS M. Hauskrecht Inclusion-Exclusion principle Used in counts where the decomposition yields two count tasks with overlapping elements • If we used the sum rule some elements would be counted twice Inclusion-exclusion principle: uses a sum rule and then corrects for the overlapping elements. We used the principle for the cardinality of the set union. •|A B| = |A| + |B| - |A B| U B A CS 441 Discrete mathematics for CS M. Hauskrecht 2 Inclusion-exclusion principle Example: How many bitstrings of length 8 start either with a bit 1 or end with 00? • Count strings that start with 1: • How many are there? 27 • Count the strings that end with 00.
    [Show full text]
  • Binomial Coefficients and Subsets
    page 1 Finite Mathematics Binomial Coefficients and Subsets In the worksheet “Combinations and Their Sums,” we saw how ibn Mun‘im, living in Morocco around 1200, used combinations C(n,r) to count the number of ways to select colored threads or other things from a pool of items, assuming that repeats aren’t allowed and the order of selection doesn’t matter. Let’s do some practice and warm-up. Exercise 1. a) In how many different ways can 3 employees be selected from an office of 7 employees? C(____, ____) = ______ b) Use the “row-sum pattern” to simplify: C(3,3) + C(4,3) + C(5,3) + C(6,3) = C(____, ____) = ______ c) Use the “column-sum pattern” to simplify: C(9,5) + C(9,6) = C(____, ____) = ______ Ibn Mun‘im wasn’t the first to explore combinations like these, but apparently they’d never been studied by mathematicians in ancient Greece and Mesopotamia, who excelled in many other topics. In the late 900s, an Indian poet named Halayudha presented the arithmetical triangle as a tool in categorizing the different kinds of poetic meter, the sequences of stressed or unstressed syllables in one line of poetry (see Exercise 9 below). A little later, around 1010, the Arab mathematician Abū Bakr al-Karajī in Baghdad used the arithmetical triangle to solve an algebra problem, that of figuring out the coefficients of binomial powers like (x + y) 4 (see Exercises 2-4 below). During the Middle Ages, it was the Arab world that was pre-eminent in science and mathematics.
    [Show full text]
  • Week 3-4: Permutations and Combinations
    Week 3-4: Permutations and Combinations March 10, 2020 1 Two Counting Principles Addition Principle. Let S1;S2;:::;Sm be disjoint subsets of a ¯nite set S. If S = S1 [ S2 [ ¢ ¢ ¢ [ Sm, then jSj = jS1j + jS2j + ¢ ¢ ¢ + jSmj: Multiplication Principle. Let S1;S2;:::;Sm be ¯nite sets and S = S1 £ S2 £ ¢ ¢ ¢ £ Sm. Then jSj = jS1j £ jS2j £ ¢ ¢ ¢ £ jSmj: Example 1.1. Determine the number of positive integers which are factors of the number 53 £ 79 £ 13 £ 338. The number 33 can be factored into 3 £ 11. By the unique factorization theorem of positive integers, each factor of the given number is of the form 3i £ 5j £ 7k £ 11l £ 13m, where 0 · i · 8, 0 · j · 3, 0 · k · 9, 0 · l · 8, and 0 · m · 1. Thus the number of factors is 9 £ 4 £ 10 £ 9 £ 2 = 7280: Example 1.2. How many two-digit numbers have distinct and nonzero digits? A two-digit number ab can be regarded as an ordered pair (a; b) where a is the tens digit and b is the units digit. The digits in the problem are required to satisfy a 6= 0; b 6= 0; a 6= b: 1 The digit a has 9 choices, and for each ¯xed a the digit b has 8 choices. So the answer is 9 £ 8 = 72. The answer can be obtained in another way: There are 90 two-digit num- bers, i.e., 10; 11; 12;:::; 99. However, the 9 numbers 10; 20;:::; 90 should be excluded; another 9 numbers 11; 22;:::; 99 should be also excluded. So the answer is 90 ¡ 9 ¡ 9 = 72.
    [Show full text]
  • A Combinatorial Proof of the Log- Concavity of the Numbers Of
    Journal of Combinatorial Theory, Series A 90, 293303 (2000) doi:10.1006Âjcta.1999.3040, available online at http:ÂÂwww.idealibrary.com on A Combinatorial Proof of the Log-Concavity of the Numbers of Permutations with k Runs MiklosBona1 University of Florida, Gainesville, Florida 32611 E-mail: bonaÄmath.ufl.edu and Richard Ehrenborg2 School of Mathematics, Institute for Advanced Study, Princeton, New Jersey 08540 E-mail: jrgeÄmath.ias.edu Communicated by the Managing Editors Received February 26, 1999 We combinatorially prove that the number R(n, k) of permutations of length n having k runs is a log-concave sequence in k, for all n. We also give a new com- binatorial proof for the log-concavity of the Eulerian numbers. 2000 Academic Press 1. INTRODUCTION Let p= p1 p2 }}}pn be a permutation of the set [1, 2, ..., n] written in the one-line notation. We say that p get changes direction at position i, if either pi&1<pi>pi+ j ,orpi&1>pi>pi+1, in other words, when pi is either a peak or a valley. We say that p has k runs if there are k&1 indices i so that p changes direction at these positions. So, for example, p=3561247 has 3 runs as p changes direction when i=3 and when i=4. A geometric way to represent a permutation and its runs by a diagram is shown in Fig. 1. The runs are the line segments (or edges) between two consecutive entries where p changes direction. So a permutation has k runs if it can be represented by k line segments so that the segments go ``up'' and ``down'' 1 The paper was written while the author's stay at IAS was supported by Trustee Ladislaus von Hoffmann, the Arcana Foundation.
    [Show full text]
  • MAT344 Week 1
    MAT344 Week 1 2019/Sep/9 1 Announcements 1. Make sure you have access to quercus and piazza. 2. Enroll in a tutorial. 3. Read the Syllabus and Study tips (also uploaded to https://www.math.toronto.edu/balazse/2019_Fall_ MAT344/). 4. Read Chapter 1 of the textbook [KT17]. It is an easy and fun read, and explores many of the questions that we will study later in the class. 5. Note: for some reason the textbook .pdf and print versions numbers differ slightly from the (more interactive) html version. When using references, we will refer to the .pdf version. 6. Problem set 1 will be sent out on Thursday. 2 This week This week, we are talking about 1. Basic counting techniques, 2. Permutations, 3. Combinations 3 Strings (Chapter 2.1 in [KT17]) Exercise 3.1 ([Bog04], Chapter 1.2 Problem 6). An ice cream parlor offers 12 different flavors of ice cream, and triple decker cones are made in homemade waffle cones. Having chocolate ice cream as the bottom scoop is different from having chocolate ice cream as the top scoop. How many different triple decker cones of ice cream are available? Solution: We have 12 choices for all of the bottom, middle, and top scoops, and if two sequence of choices differ at any point, they result in different triple decker ice cream cones. So we have 12 · 12 · 12 = 1728 different kinds of triple decker cones. The above problem is a typical one that we will encounter in this class. We are asked \How many...", and with some logic we come up with a number.
    [Show full text]