Math Problem Statement

Consider all permutations of abcde.

How many contain ab or bc?

Solution

We want to count the number of permutations of the letters a,b,c,d,ea, b, c, d, e that contain the substrings abab or bcbc.

Step 1: Total permutations

The total number of permutations of the letters a,b,c,d,ea, b, c, d, e is: 5!=1205! = 120

Step 2: Inclusion-exclusion principle

To find the number of permutations that contain abab or bcbc, we use the inclusion-exclusion principle: AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B| where:

  • AA: Permutations that contain abab as a substring.
  • BB: Permutations that contain bcbc as a substring.

Step 3: Count A|A| (Permutations containing abab)

Treat abab as a single block. Now, we are arranging the blocks {ab,c,d,e}\{ab, c, d, e\}, which gives: 4!=244! = 24 So, A=24|A| = 24.

Step 4: Count B|B| (Permutations containing bcbc)

Similarly, treat bcbc as a single block. Now, we are arranging the blocks {a,bc,d,e}\{a, bc, d, e\}, which also gives: 4!=244! = 24 So, B=24|B| = 24.

Step 5: Count AB|A \cap B| (Permutations containing both abab and bcbc)

If both abab and bcbc appear, the substring abcabc must appear as a single block. Now, we are arranging the blocks {abc,d,e}\{abc, d, e\}, which gives: 3!=63! = 6 So, AB=6|A \cap B| = 6.

Step 6: Apply inclusion-exclusion

Substitute the values into the formula: AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B| AB=24+246=42|A \cup B| = 24 + 24 - 6 = 42

Final Answer:

The number of permutations that contain abab or bcbc is: 42\boxed{42}

Let me know if you'd like further clarification or details! Here are some related questions to explore:

  1. How many permutations contain both abab and dede?
  2. What is the probability that a random permutation contains bcbc?
  3. How many permutations contain abab but not bcbc?
  4. Can this approach generalize to strings longer than 5 letters? How?
  5. How would the solution change if repetitions of letters were allowed?

Tip: When solving permutation problems, breaking the problem into blocks and using the inclusion-exclusion principle can simplify calculations significantly!

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

Permutations
Inclusion-Exclusion Principle
Combinatorics

Formulas

Total permutations formula: n! = n × (n - 1) × ... × 1
Inclusion-Exclusion Principle: |A ∪ B| = |A| + |B| - |A ∩ B|

Theorems

Inclusion-Exclusion Principle

Suitable Grade Level

Grades 10-12