Math 3134 Applied Combinatorics Comprehensive Practice Test 1 Notes

Evaluation Rules & Closed-Form Expressions

  • Numerical answers on Applied Combinatorics assessments may be submitted in closed-form expression format unless explicitly stated otherwise.
  • Examples of acceptable closed-form numerical expressions include:
    • Binomial coefficients such as (31255)\binom{312}{55}
    • Rational or transcendental constants such as 87e\frac{87}{e}
  • Evaluation of (62)\binom{6}{2}:
    • Formula: (nk)=n!k!(n−k)!\binom{n}{k} = \frac{n!}{k!(n-k)!}
    • Computation: (62)=6×52×1=15\binom{6}{2} = \frac{6 \times 5}{2 \times 1} = 15

Basic Combinatorics & Selection Problems

  • Problem configuration: A pizza parlor provides 88 distinct pizza toppings. A customer orders a 33-topping pizza.
  • Case (a): All three toppings must be distinct (order does not matter).
    • Selection type: Unordered combination without replacement.
    • Calculation: (83)=8×7×63×2×1=56\binom{8}{3} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56
  • Case (b): Repeating toppings is permitted.
    • Selection type: Unordered combination with replacement (Multiset / Stars and Bars).
    • Formula for choosing kk items from nn types with repetition: (n+k−1k)\binom{n + k - 1}{k}
    • Parameters: n=8n = 8, k=3k = 3
    • Calculation: (8+3−13)=(103)=10×9×83×2×1=120\binom{8 + 3 - 1}{3} = \binom{10}{3} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120

Casting and Rule of Product Applications

  • Production context: The play Huis Clos by Jean-Paul Sartre features a small cast of 33 characters: Estelle, Inès, and Joseph.
  • Audition outcomes:
    • 33 auditioners are suitable for Estelle.
    • 44 auditioners are suitable for Inès.
    • 33 auditioners are suitable for Joseph.
  • Assumption: All auditioners are distinct individuals; no auditioner is suitable for more than one role.
  • Total casting combinations calculation:
    • By the Rule of Product (Fundamental Counting Principle), the total number of ways to cast the play is: 3×4×3=363 \times 4 \times 3 = 36

Non-Negative Integer Solutions & Team Configurations

  • Governing rules: Under International Football Association rules, a soccer team consists of 1111 players.
    • Exactly 11 player is assigned as the goalkeeper.
    • The remaining 1010 outfield players consist of defenders, midfielders, and strikers.
    • There is no minimum or maximum restriction on any outfield position, provided the sum of outfield players equals 1010.
  • Combinatorial model:
    • Equivalent to finding the number of non-negative integer solutions to: x1+x2+x3=10x_1 + x_2 + x_3 = 10
    • Here x1x_1 represents defenders, x2x_2 represents midfielders, and x3x_3 represents strikers.
    • Stars and Bars formula with n=3n = 3 categories and k=10k = 10 elements: (k+n−1k)=(10+3−110)=(1210)\binom{k + n - 1}{k} = \binom{10 + 3 - 1}{10} = \binom{12}{10}
    • Simplified form: (122)=12×112×1=66\binom{12}{2} = \frac{12 \times 11}{2 \times 1} = 66

Restricted Sequence Permutations & Alphabet Problems

  • Alphabet specifications:
    • Total characters: 2626
    • Consonants: 2121 (with 'y' treated explicitly as a consonant)
    • Vowels: 55
  • Sequence specification: Count the number of 1111-letter sequences containing exactly 33 vowels.
  • Construction steps:
    1. Choose 33 positions out of 1111 for the vowels: (113)\binom{11}{3}
    2. Assign a vowel to each chosen position (with repetition allowed): 535^3
    3. Assign a consonant to each of the remaining 88 positions: 21821^8
  • Total unique sequences: (113)×53×218\binom{11}{3} \times 5^3 \times 21^8

Permutations of Multisets (Repeated Letters)

  • Word analyzed: DEFENSIVENESS
  • Letter frequencies:
    • D: 11
    • E: 44
    • F: 11
    • I: 11
    • N: 22
    • S: 33
    • V: 11
    • Total length n=1+4+1+1+2+3+1=13n = 1 + 4 + 1 + 1 + 2 + 3 + 1 = 13
  • Multinomial coefficient formula for multiset permutations: n!n1! n2! … nk!\frac{n!}{n_1! \, n_2! \, \dots \, n_k!}
  • Calculation: 13!1!×4!×1!×1!×2!×3!×1!=13!4!×2!×3!=21,621,600\frac{13!}{1! \times 4! \times 1! \times 1! \times 2! \times 3! \times 1!} = \frac{13!}{4! \times 2! \times 3!} = 21,621,600

Combinatorial Identity Proofs

  • Identity 1: Prove n2+2(n2)=(2n2)n^2 + 2\binom{n}{2} = \binom{2n}{2}

    • Algebraic Proof:
    • Left-Hand Side (LHS):       n2+2(n2)=n2+2(n(n−1)2)=n2+n(n−1)=n2+n2−n=2n2−nn^2 + 2\binom{n}{2} = n^2 + 2 \left(\frac{n(n-1)}{2}\right) = n^2 + n(n-1) = n^2 + n^2 - n = 2n^2 - n
    • Right-Hand Side (RHS):       (2n2)=2n(2n−1)2=n(2n−1)=2n2−n\binom{2n}{2} = \frac{2n(2n-1)}{2} = n(2n-1) = 2n^2 - n
    • Since LHS = RHS, the identity is proven.
    • Combinatorial Proof:
    • Consider choosing 22 elements from a set of size 2n2n, split into two disjoint sets AA and BB, each of size nn.
    • Total ways to pick 22 elements: (2n2)\binom{2n}{2}.
    • Alternative selection cases:
      • Pick 22 elements from set AA: (n2)\binom{n}{2}
      • Pick 22 elements from set BB: (n2)\binom{n}{2}
      • Pick 11 element from AA and 11 element from BB: n×n=n2n \times n = n^2
    • Summing the cases gives: (n2)+(n2)+n2=n2+2(n2)\binom{n}{2} + \binom{n}{2} + n^2 = n^2 + 2\binom{n}{2}.
  • Identity 2: Prove (72)=(42)+(32)+12\binom{7}{2} = \binom{4}{2} + \binom{3}{2} + 12

    • Algebraic Proof:
    • LHS: (72)=7×62×1=21\binom{7}{2} = \frac{7 \times 6}{2 \times 1} = 21
    • RHS: (42)+(32)+12=4×32+3×22+12=6+3+12=21\binom{4}{2} + \binom{3}{2} + 12 = \frac{4 \times 3}{2} + \frac{3 \times 2}{2} + 12 = 6 + 3 + 12 = 21
    • LHS = RHS = 2121
    • Combinatorial Interpretation:
    • Consider choosing 22 elements from a set of 77 items partitioned into a group of 44 items and a group of 33 items.
    • Selecting both from the group of 44: (42)=6\binom{4}{2} = 6
    • Selecting both from the group of 33: (32)=3\binom{3}{2} = 3
    • Selecting one from each group: 4×3=124 \times 3 = 12
    • Total combinations: 6+3+12=216 + 3 + 12 = 21

String Naming Constraints & Language Grammars

  • Java legal variable name specifications:
    • First character allowed set: Uppercase letters (2626), Lowercase letters (2626), Dollar sign \ (11), Underscore _\_ (11).
    • Total valid first characters: 26+26+1+1=5426 + 26 + 1 + 1 = 54
    • Subsequent character allowed set: All valid first characters plus numeric digits (1010).
    • Total valid subsequent characters: 54+10=6454 + 10 = 64
    • Reserved three-character Java words: for, int, new, try (44 words).
  • Calculation of legal 3-character variable names:
    • Unrestricted combinations: 54×64×64=54×642=221,18454 \times 64 \times 64 = 54 \times 64^2 = 221,184
    • Subtracting reserved words: 54×642−4=221,184−4=221,18054 \times 64^2 - 4 = 221,184 - 4 = 221,180

Election Combinatorics with District Constraints

  • Unconstrained Election (Part a):
    • 77 candidates running for 44 identical seats on a town council.
    • Total valid selections: (74)=7×6×5×44×3×2×1=35\binom{7}{4} = \frac{7 \times 6 \times 5 \times 4}{4 \times 3 \times 2 \times 1} = 35
  • District-Constrained Election (Part b):
    • 77 total candidates: 33 from District 1, 44 from District 2.
    • Goal: Fill 44 seats with at least 11 representative from each district.
    • Complementary Counting Approach:
    • Total unrestricted ways: (74)=35\binom{7}{4} = 35
    • Invalid selections (0 candidates from District 1): (30)×(44)=1\binom{3}{0} \times \binom{4}{4} = 1
    • Invalid selections (0 candidates from District 2): (34)×(40)=0\binom{3}{4} \times \binom{4}{0} = 0 (impossible since only 3 are from District 1)
    • Valid choices: 35−1=3435 - 1 = 34
    • Direct Summation Approach:
    • 11 from District 1, 33 from District 2: (31)×(43)=3×4=12\binom{3}{1} \times \binom{4}{3} = 3 \times 4 = 12
    • 22 from District 1, 22 from District 2: (32)×(42)=3×6=18\binom{3}{2} \times \binom{4}{2} = 3 \times 6 = 18
    • 33 from District 1, 11 from District 2: (33)×(41)=1×4=4\binom{3}{3} \times \binom{4}{1} = 1 \times 4 = 4
    • Total: 12+18+4=3412 + 18 + 4 = 34

Combinations with Repetition Applications

  • Scenario: A florist supplies red, pink, and white roses. A customer orders a bouquet of a dozen (1212) roses in any combination of those 33 colors.
  • Combinatorial Structure: Unordered selection with repetition (Stars and Bars).
  • Parameters: n=3n = 3 types, k=12k = 12 selections.
  • Expression: (3+12−112)=(1412)=(142)\binom{3 + 12 - 1}{12} = \binom{14}{12} = \binom{14}{2}

Card Combination Counting

  • Deck structure: 5252 standard cards across 1313 ranks and 44 suits.
  • Full House Definition: 33 cards of one rank and 22 cards of a different rank.
  • Step-by-Step Counting:
    1. Choose rank for the three-of-a-kind: (131)=13\binom{13}{1} = 13
    2. Choose 33 suits out of 44 for that rank: (43)=4\binom{4}{3} = 4
    3. Choose rank for the pair from remaining ranks: (121)=12\binom{12}{1} = 12
    4. Choose 22 suits out of 44 for that rank: (42)=6\binom{4}{2} = 6
  • Total possible full houses: (131)×(43)×(121)×(42)=13×4×12×6=3,744\binom{13}{1} \times \binom{4}{3} \times \binom{12}{1} \times \binom{4}{2} = 13 \times 4 \times 12 \times 6 = 3,744

Fixed-Point Free Permutations (Derangements) & Graph Structures

  • Neighborhood emergency phone tree scenario with 2020 homes where no person calls themselves:
    • Standard Derangement Model (D20D_{20}):
    • A permutation with no fixed points.
    • Formula: Dn=n!∑k=0n(−1)kk!D_n = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!}
    • Exact derangement expression for 2020 homes: D20=20!∑k=020(−1)kk!D_{20} = 20! \sum_{k=0}^{20} \frac{(-1)^k}{k!}
    • Single Cycle / Directed Hamiltonian Cycle Model:
    • If the phone tree requires a single continuous loop containing all 2020 households:
    • Total cyclic permutations: (20−1)!=19!(20 - 1)! = 19!

Circular Permutations & Adjacency Constraints

  • Context: Seating the 66 members of the band Maroon 5 at a symmetrical round table.
  • Case (a): Unconstrained circular seating.
    • Formula for nn items in a circle: (n−1)!(n - 1)!
    • Computation: (6−1)!=5!=120(6 - 1)! = 5! = 120
  • Case (b): Adam Levine and James Valentine must NOT sit next to each other.
    • Complementary Counting Method:
    • Total circular seatings: 5!=1205! = 120
    • Treat Adam Levine and James Valentine as a single block:
      • Internal arrangements of the block: 2!=22! = 2
      • Circular seating of 55 effective units: (5−1)!=4!=24(5 - 1)! = 4! = 24
      • Restricted seatings where they are adjacent: 2!×4!=2×24=482! \times 4! = 2 \times 24 = 48
    • Valid seating arrangements: 120−48=72120 - 48 = 72

Principle of Inclusion-Exclusion (PIE)

  • Survey Data (100100 Computer Science majors total):
    • Java (JJ): 4545
    • C++ (CC): 3030
    • Python (PP): 2020
    • C++ and Java (C∩JC \cap J): 66
    • Java and Python (J∩PJ \cap P): 11
    • C++ and Python (C∩PC \cap P): 55
    • All three (J∩C∩PJ \cap C \cap P): 11
  • Union calculation using PIE:
    • ∣J∪C∪P∣=∣J∣+∣C∣+∣P∣−∣J∩C∣−∣J∩P∣−∣C∩P∣+∣J∩C∩P∣|J \cup C \cup P| = |J| + |C| + |P| - |J \cap C| - |J \cap P| - |C \cap P| + |J \cap C \cap P|
    • ∣J∪C∪P∣=45+30+20−6−1−5+1=84|J \cup C \cup P| = 45 + 30 + 20 - 6 - 1 - 5 + 1 = 84
  • Students not proficient in any of the three languages:
    • Total students minus proficient students: 100−84=16100 - 84 = 16

Binomial Theorem & Power Series Expansions

  • Expansion 1: Coefficient of x4y6x^4 y^6 in (x+y)10(x + y)^{10}

    • Binomial Theorem general term: (10k)x10−kyk\binom{10}{k} x^{10-k} y^k
    • For x4y6x^4 y^6, setting k=6k = 6:
    • Coefficient: (106)=(104)=10×9×8×74×3×2×1=210\binom{10}{6} = \binom{10}{4} = \frac{10 \times 9 \times 8 \times 7}{4 \times 3 \times 2 \times 1} = 210
  • Expansion 2: Coefficient of x11x^{11} in (2x+3)25(2x + 3)^{25}

    • Binomial Theorem general term: (25k)(2x)k(3)25−k=(25k)2k325−kxk\binom{25}{k} (2x)^k (3)^{25-k} = \binom{25}{k} 2^k 3^{25-k} x^k
    • Setting k=11k = 11:
    • Coefficient: (2511)211314\binom{25}{11} 2^{11} 3^{14}
  • Expansion 3: Generalized Binomial Theorem for (1−2x)−3(1 - 2x)^{-3}

    • Formula: (1+z)r=∑k=0∞(rk)zk(1 + z)^r = \sum_{k=0}^{\infty} \binom{r}{k} z^k
    • Generalized coefficient: (−nk)=(−1)k(n+k−1k)\binom{-n}{k} = (-1)^k \binom{n + k - 1}{k}
    • For (1−2x)−3(1 - 2x)^{-3}, set z=−2xz = -2x and r=−3r = -3:
    • Term kk: (−3k)(−2x)k=(−1)k(k+2k)(−1)k2kxk=(k+2k)2kxk\binom{-3}{k} (-2x)^k = (-1)^k \binom{k + 2}{k} (-1)^k 2^k x^k = \binom{k + 2}{k} 2^k x^k
    • For x4x^4, set k=4k = 4:
    • Coefficient: (4+24)24=(64)×16=15×16=240\binom{4 + 2}{4} 2^4 = \binom{6}{4} \times 16 = 15 \times 16 = 240
  • Expansion 4: Coefficient of x5x^5 in y=1(1+x)2=(1+x)−2y = \frac{1}{(1 + x)^2} = (1 + x)^{-2}

    • Term kk: (−2k)xk=(−1)k(k+1k)xk=(−1)k(k+1)xk\binom{-2}{k} x^k = (-1)^k \binom{k + 1}{k} x^k = (-1)^k (k + 1) x^k
    • For x5x^5, set k=5k = 5:
    • Coefficient: (−1)5(5+1)=−6(-1)^5 (5 + 1) = -6
  • Expansion 5: Coefficient of x4x^4 in y=1(1−2x)5=(1−2x)−5y = \frac{1}{(1 - 2x)^5} = (1 - 2x)^{-5}

    • Term kk: (−5k)(−2x)k=(−1)k(k+4k)(−1)k2kxk=(k+4k)2kxk\binom{-5}{k} (-2x)^k = (-1)^k \binom{k + 4}{k} (-1)^k 2^k x^k = \binom{k + 4}{k} 2^k x^k
    • For x4x^4, set k=4k = 4:
    • Coefficient: (4+44)24=(84)×16=70×16=1120\binom{4 + 4}{4} 2^4 = \binom{8}{4} \times 16 = 70 \times 16 = 1120

Ordinary Generating Functions in Discrete Problems

  • American Football Scoring Play Values:
    • Safety: 22 points
    • Field goal: 33 points
    • Touchdown: 66 points
    • Touchdown plus extra point: 77 points
    • Touchdown plus two-point conversion: 88 points
    • Conversion safety: 11 point (Historical note: achieved in the NFL in 1940)
  • Generating Function Construction:
    • Assuming unrestricted repetition of scoring plays where order of scoring does not matter, each scoring play value vv contributes a factor of 11−xv=1+xv+x2v+x3v+…\frac{1}{1 - x^v} = 1 + x^v + x^{2v} + x^{3v} + \dots
    • Primary generating function (excluding conversion safety):     f(x)=1(1−x2)(1−x3)(1−x6)(1−x7)(1−x8)f(x) = \frac{1}{(1 - x^2)(1 - x^3)(1 - x^6)(1 - x^7)(1 - x^8)}
    • Generating function including conversion safety (1 point play):     f(x)=1(1−x)(1−x2)(1−x3)(1−x6)(1−x7)(1−x8)f(x) = \frac{1}{(1 - x)(1 - x^2)(1 - x^3)(1 - x^6)(1 - x^7)(1 - x^8)}
    • The number of ways to score exactly 1616 points corresponds to the coefficient of x16x^{16} in [x16]f(x)\left[x^{16}\right] f(x).

Recurrence Relations Formulation & Solution

  • Recurrence Construction for Substring Avoidance:

    • Goal: Construct a recurrence relation for ana_n, the number of ternary strings (using digits 00, 11, and 22) of length nn that do NOT contain the exact substring "12".
    • Analysis by starting character:
    • If string starts with 00: Remaining n−1n-1 characters form a valid string (an−1a_{n-1} ways).
    • If string starts with 22: Remaining n−1n-1 characters form a valid string (an−1a_{n-1} ways).
    • If string starts with 11:
      • Second digit cannot be 22
      • If second digit is 00: Remaining n−2n-2 characters form a valid string (an−2a_{n-2} ways).
      • If second digit is 11: String starts with "11", remaining n−2n-2 characters start with 11 (an−1−an−2a_{n-1} - a_{n-2} effectively when solved via system).
    • System Derivation:
    • Let ana_n be valid strings of length nn.
    • A valid string ending in 00 or 11 can be formed by appending 00 or 11 to any valid string of length n−1n-1 (2an−12a_{n-1} ways).
    • A valid string ending in 22 can only be formed by appending 22 to a valid string of length n−1n-1 that does NOT end in 11.
    • Since valid strings of length n−1n-1 ending in 11 are formed by appending 11 to any valid string of length n−2n-2 (an−2a_{n-2} ways), the number of length n−1n-1 valid strings not ending in 11 is an−1−an−2a_{n-1} - a_{n-2}.
    • Therefore: an=2an−1+(an−1−an−2)=3an−1−an−2a_n = 2a_{n-1} + (a_{n-1} - a_{n-2}) = 3a_{n-1} - a_{n-2}
    • Final Recurrence Relation: an=3an−1−an−2a_n = 3a_{n-1} - a_{n-2} for n≥2n \ge 2
    • Initial Conditions: a0=1a_0 = 1, a1=3a_1 = 3 (and a2=8a_2 = 8)
  • Linear Recurrence Solution 1:

    • System: an=−3an−1+10an−2a_n = -3a_{n-1} + 10a_{n-2}, with a0=1,a1=9a_0 = 1, a_1 = 9
    • Characteristic equation: r2+3r−10=0  ⟹  (r+5)(r−2)=0r^2 + 3r - 10 = 0 \implies (r + 5)(r - 2) = 0
    • Roots: r1=2,r2=−5r_1 = 2, r_2 = -5
    • General solution: an=C1(2)n+C2(−5)na_n = C_1 (2)^n + C_2 (-5)^n
    • Apply initial conditions:
    • a0=C1+C2=1a_0 = C_1 + C_2 = 1
    • a1=2C1−5C2=9a_1 = 2C_1 - 5C_2 = 9
    • Solve linear system:
    • C2=1−C1C_2 = 1 - C_1
    • 2C1−5(1−C1)=9  ⟹  7C1−5=9  ⟹  7C1=14  ⟹  C1=22C_1 - 5(1 - C_1) = 9 \implies 7C_1 - 5 = 9 \implies 7C_1 = 14 \implies C_1 = 2
    • C2=−1C_2 = -1
    • Closed-form solution: an=2(2)n−(−5)n=2n+1−(−5)na_n = 2(2)^n - (-5)^n = 2^{n+1} - (-5)^n
  • Linear Recurrence Solution 2 (Repeated Root):

    • System: an=10an−1−25an−2a_n = 10a_{n-1} - 25a_{n-2}, with a0=1,a1=15a_0 = 1, a_1 = 15
    • Characteristic equation: r2−10r+25=0  ⟹  (r−5)2=0r^2 - 10r + 25 = 0 \implies (r - 5)^2 = 0
    • Repeated root: r=5r = 5 (multiplicity 2)
    • General solution: an=(C1+C2n)5na_n = (C_1 + C_2 n) 5^n
    • Apply initial conditions:
    • a0=C1=1a_0 = C_1 = 1
    • a1=(C1+C2)5=15  ⟹  1+C2=3  ⟹  C2=2a_1 = (C_1 + C_2) 5 = 15 \implies 1 + C_2 = 3 \implies C_2 = 2
    • Closed-form solution: an=(1+2n)5na_n = (1 + 2n) 5^n
  • Linear Recurrence Solution 3 (Complex Roots):

    • System: an+an−2=0  ⟹  an=−an−2a_n + a_{n-2} = 0 \implies a_n = -a_{n-2}, with a0=2,a1=3a_0 = 2, a_1 = 3
    • Characteristic equation: r2+1=0  ⟹  r=±ir^2 + 1 = 0 \implies r = \pm i
    • Polar representation: i=eiπ/2i = e^{i \pi / 2}
    • General solution form: an=C1cos⁡(nπ2)+C2sin⁡(nπ2)a_n = C_1 \cos\left(\frac{n\pi}{2}\right) + C_2 \sin\left(\frac{n\pi}{2}\right)
    • Apply initial conditions:
    • a0=C1cos⁡(0)+C2sin⁡(0)=C1=2a_0 = C_1 \cos(0) + C_2 \sin(0) = C_1 = 2
    • a1=C1cos⁡(π2)+C2sin⁡(π2)=C2=3a_1 = C_1 \cos\left(\frac{\pi}{2}\right) + C_2 \sin\left(\frac{\pi}{2}\right) = C_2 = 3
    • Closed-form solution: an=2cos⁡(nπ2)+3sin⁡(nπ2)a_n = 2\cos\left(\frac{n\pi}{2}\right) + 3\sin\left(\frac{n\pi}{2}\right)