COMP 2711H: Lecture 7

Date: 2024-09-16 02:53:37

Reviewed: 2024-10-07 02:47:38

Topic / Chapter: More Counting Problems

summary

❓Questions

Notes

Arrangement Along the Circle
  • Problem 1

    • how many ways can people sit around a circle?
    • rotation / shifting of an arrangement: is considered equivalent / same permutation
  • Problem 2

    • how many ways cab we put distinct people around identical circles?
      • i.e. no. of tables
    • assume: ?
    • find relation using induction-like approach
    • πŸ‘¨β€πŸ« let's notate the solution as
    • base case:
    • person is either
      1. in a circle on their own:
        • as we need to place the rest
      2. sharing a circle
        • how many ways can we insert?
        • at least ways, as there are tables
        • as there are people already on the table, and we are choosing, "who is on the left?"
  • Problem 3

    • in how many ways can we people around circle if 2 people must not be next to each other?
    • as there are ways of ordering people around the table.
    • πŸ‘¨β€πŸ« or:
      • no. of ways to put them together(when ),
      • and there are total permutation
      • thus
  • Problem 4

    • how many ways cab we put distinct people around identical circles?
      • if 2 people must not be next to each other?
    • case: no. of ways to put two people together
      • case 1: setting up a new table for them
      • case 2: sharing table w/ people
    • finally:
      • (and subtracted from all no. of permutations)
      • ❓ can't we simply treat two people as one?
      • i.e.
  • Problem 5

    • let be a set of elements
      • what is the no. of pairings in
      • πŸ‘¨β€πŸ«
      • and no element can be pair of itself
    • solution 1
      • steps
        • after choosing an element, there are ways to choose its pair
        • after choosing the next element, there are ways to choose its pair
        • ...
        • after choosing the penultimate element, there are 1 way to choose its pair
      • i.e.
    • solution 2
      • simply showing all linear permutations
      • and grouping them together
      • there are ways to ordering the elements
      • and ways to order different groups and ways to order groups within it
      • thus
    • solution 3
      • if order is accounted:
      • and there are different ways to order them
      • thus,
Weekly Problems
  • Problem 1: Week 2

    • how many permutations of people satisfy ?
    • πŸ‘¨β€πŸ« aka: derangement
    • show recursive solution
    • let no. of ways to arrange w/ people / elements
    • (similar logic as then )
    • general cases
      • person sits on chair
      • two cases
        1. sits on chair ()
        2. does not sit on chair
          • as: each people (except ): has exactly ine forbidden sit
            • for :
            • for : (as that is the condition)
          • so: it's a direct subproblem of size
      • solution:
        • i.e. no. of choosing , then recurrence holds for each cases
  • Problem 5: Week 2

    • 73 boys, 9 girls; 82 total
    • how many permutations s.t. all girls appear before all boys?
    • part 2: having 7 girls in top half, and 2 girls in bottom half
      • top half: 7 girls & 34 boys
      • bottom half: 2 girls & 39 boys
    • one of the solution:
      • choose who will go in the top half
        • (no need to choose who will go in the bottom, as those are complements from top half)
    • part 3: no two girls are next to each other
      • detour:
        • no. of solutions of ;
        • consider: 10 blocks, separated by 2 (=3-1) bars
          • there are 11 slots total
          • so
        • no. of solutions of ;
          • let
          • then the same condition!
          • thus:
      • similarly: consider girls as blocks, and boys as bars
      • first, there are ways to order the girls
        • and let no. of boys after girl (and : no. of boys before girl 1)
      • ;
      • let:
        • and for all others:
        • now we have
        • thus:
      • however, boys (nor girls) are considered distinct
        • so:
    • and with permutations:
    • part 4: no three girls are next to each other
      • one solution: adding constraints, such as:
      • let : no. of solutions for the question
      • solution: either starts w/ boy or a girl
        • case 1: seq. starts w/ a boy
          • as any boy can be the first
        • case 2: seq. starts w/ exactly one girl?
          • ways to choose
        • case 3: seq. starts w/ exactly two girls?
      • πŸ‘¨β€πŸŽ“ how about the base case..?
  • Problem 6

    • 01_rectangles
    • how many rectangles are there?
    • i.e.
      • and
    • finally:
  • Problem 7

    • how many ways are there of moving, from blue to green?
    • πŸ‘¨β€πŸ« you can only move up & right
    • so there are 16 possible moves, 10 being R and 6 being U
    • thus: