The Central Idea

A restriction changes the set of valid outcomes.

Instead of counting all imaginable outcomes, we count only those that satisfy every stated condition.

The basic workflow is:

\[ \boxed{\text{understand the restriction} \;\longrightarrow\; \text{adjust the available choices} \;\longrightarrow\; \text{count only valid outcomes}.} \]

Restrictions Can Act in Different Ways

Common restrictions include:

Start with the Unrestricted Structure

Before handling the restriction, identify what the count would look like without it.

For example, a four-character code using \(10\) digits with repetition allowed has

\[ 10^4 \]

unrestricted possibilities.

The restriction then tells us how that structure must be modified.

Direct Restriction Counting

The simplest method is to reduce the number of choices at the stage where the restriction applies.

Suppose a four-digit code may use digits \(0\) through \(9\), but the first digit cannot be \(0\).

The first position has \(9\) choices and each later position has \(10\):

\[ \boxed{9\cdot10^3=9000}. \]

Position Restrictions

A restriction may apply to one particular position.

Suppose a five-character code must begin with a letter and end with a digit.

If the middle positions may contain any letter or digit, then the stage counts are

\[ 26,\qquad36,\qquad36,\qquad36,\qquad10. \]

Therefore,

\[ \boxed{26\cdot36^3\cdot10}. \]

Forbidden Symbols

If a particular symbol is forbidden everywhere, remove it from the available alphabet.

Suppose strings of length \(6\) are formed from \(8\) symbols, but one designated symbol may not be used.

Each position then has only

\[ 7 \]

choices.

\[ \boxed{7^6} \]

valid strings remain.

No Repetition

If choices cannot be repeated, later stages have fewer options.

Suppose a four-letter string is formed from \(9\) distinct letters without repetition.

The stage counts are

\[ 9,\qquad8,\qquad7,\qquad6. \]

Therefore,

\[ \boxed{9\cdot8\cdot7\cdot6}. \]

Track What Has Already Been Used

In no-repetition problems, every earlier choice removes an option from later stages.

If \(k\) ordered positions are filled from \(n\) distinct objects without repetition, then the count is

\[ \boxed{n(n-1)(n-2)\cdots(n-k+1)}. \]

Later lessons will connect this pattern to permutations.

Example: Three-Digit Integers without Repetition

Count three-digit positive integers with no repeated digit.

The first digit cannot be \(0\), so it has

\[ 9 \]

choices.

The second digit may be \(0\), but cannot repeat the first digit, so it also has

\[ 9 \]

choices.

The third digit then has

\[ 8 \]

choices.

Therefore,

\[ \boxed{9\cdot9\cdot8=648}. \]

Required Symbols

A requirement such as “contains at least one \(A\)” can be difficult to impose directly because the \(A\) might appear in many positions.

In such cases, complementary counting is often more efficient.

Count all strings, subtract those containing no \(A\), and obtain the desired total.

Example: At Least One Required Symbol

A five-character string is formed from \(7\) symbols, and repetition is allowed. How many strings contain at least one \(X\)?

Total strings:

\[ 7^5. \]

Strings with no \(X\):

\[ 6^5. \]

Therefore,

\[ \boxed{7^5-6^5}. \]

Exactly One Required Symbol

“Exactly one” is often easier to count directly.

Suppose a four-character string is formed from

\[ \{X,A,B,C,D\} \]

and must contain exactly one \(X\).

Choose the position of \(X\):

\[ 4. \]

Each remaining position has \(4\) non-\(X\) choices:

\[ 4^3. \]

Therefore,

\[ \boxed{4\cdot4^3}. \]

Exactly \(r\) Special Positions

A general version of the same idea is:

  1. choose which positions are special;
  2. fill those positions with allowed special choices;
  3. fill the remaining positions with allowed nonspecial choices.

This structure appears repeatedly in binomial counting.

Restrictions May Depend on Earlier Choices

A later option may be allowed or forbidden depending on what happened before.

When this occurs, a single constant factor at that stage may not exist.

Split into cases according to the earlier choice or use a decision tree.

Example: Conditional Second Stage

A product has two base models.

The number of valid configurations is

\[ 5+3=8. \]

The second-stage choice count depends on the first-stage model.

Adjacency Restrictions

Some arrangements require two objects to be adjacent or forbid them from being adjacent.

These problems often require grouping, complementary counting, or a position-based case split.

Objects That Must Stay Together

Suppose two distinguished objects \(A\) and \(B\) must appear next to each other in a linear arrangement.

Treat the pair as one temporary block.

The internal order of the block may be

\[ AB \]

or

\[ BA. \]

This block method converts an adjacency restriction into a simpler arrangement count.

Example: Two People Together

Arrange \(5\) distinct people in a row so that Alex and Blair sit together.

Treat Alex and Blair as one block.

Then there are effectively

\[ 4 \]

objects to arrange:

\[ 4!. \]

Alex and Blair can switch positions inside the block in

\[ 2 \]

ways.

Therefore,

\[ \boxed{2\cdot4!=48}. \]

Objects That Must Stay Apart

“Not adjacent” is often easiest to count by complement.

Count all arrangements, subtract those in which the restricted objects are adjacent.

Example: Two People Not Together

Arrange \(5\) distinct people in a row so that Alex and Blair are not adjacent.

Total arrangements:

\[ 5!=120. \]

Adjacent arrangements:

\[ 2\cdot4!=48. \]

Therefore,

\[ \boxed{120-48=72}. \]

Separation by Gaps

When several identical or categorized objects must be separated, a gap method can be useful.

First arrange the objects that create the gaps.

Then place restricted objects into those gaps so that forbidden adjacency cannot occur.

A Simple Gap Structure

Suppose three objects

\[ A,\ B,\ C \]

are arranged in a row.

They create four gaps:

\[ \_A\_B\_C\_. \]

If another kind of object must not be adjacent to itself, placing at most one such object in each gap automatically enforces the restriction.

Restrictions on the First or Last Position

Leading and trailing restrictions should usually be handled first.

For example, if a code cannot begin with \(0\) and cannot end with \(5\), then those two positions should be counted using their restricted option sets before treating the unrestricted middle positions.

Example: First and Last Restrictions

Count four-digit codes using digits \(0\) through \(9\) such that the first digit is nonzero and the last digit is not \(5\).

First digit:

\[ 9 \]

choices.

Two middle digits:

\[ 10^2 \]

choices.

Last digit:

\[ 9 \]

choices.

Therefore,

\[ \boxed{9\cdot10^2\cdot9=8100}. \]

Overlapping Restrictions

Two restrictions may interact.

For example:

The first restriction changes the first-stage count, while the second changes every later stage.

Both must be incorporated together.

Example: Four-Digit Integers without Repetition

Count four-digit positive integers with no repeated digits.

First digit:

\[ 9 \]

nonzero choices.

Second digit:

\[ 9 \]

remaining choices, including \(0\).

Third digit:

\[ 8. \]

Fourth digit:

\[ 7. \]

Therefore,

\[ \boxed{9\cdot9\cdot8\cdot7=4536}. \]

When Direct Counting Becomes Awkward

A restriction may be easier to express as an unwanted condition.

In that situation, complementary counting can be more efficient:

\[ \boxed{\text{valid} = \text{total} - \text{invalid}}. \]

Example: At Least One Repeated Digit

Count three-digit codes using digits \(0\) through \(9\) that contain at least one repeated digit.

Total codes:

\[ 10^3. \]

Codes with all digits distinct:

\[ 10\cdot9\cdot8. \]

Therefore,

\[ \boxed{10^3-10\cdot9\cdot8=280}. \]

Multiple Forbidden Conditions

If several invalid conditions overlap, simply subtracting each invalid set may remove some outcomes more than once.

In such cases, inclusion–exclusion may be required.

The structure becomes

\[ \text{valid} = \text{total} - \text{bad}_1 - \text{bad}_2 + \text{bad}_1\cap\text{bad}_2. \]

Example: Two Forbidden Properties

Suppose a collection has \(500\) possible outcomes.

Let \(A\) be the \(120\) outcomes violating rule \(A\), and \(B\) the \(90\) outcomes violating rule \(B\).

Suppose \(30\) outcomes violate both.

Invalid outcomes:

\[ 120+90-30=180. \]

Valid outcomes:

\[ \boxed{500-180=320}. \]

Restrictions Can Suggest Casework

Sometimes a restriction behaves differently depending on an early structural choice.

Split into cases according to that choice, count each case, and add.

This is often cleaner than forcing one formula to handle all branches at once.

Example: First Digit Determines the Rule

Suppose a three-digit code follows these rules:

There are \(5\) even first digits and \(5\) odd first digits.

Even-first case:

\[ 5\cdot4\cdot10=200. \]

Odd-first case:

\[ 5\cdot7\cdot10=350. \]

Therefore,

\[ \boxed{200+350=550}. \]

Restrictions and Decision Trees

A decision tree is useful when available options depend heavily on earlier choices.

Invalid branches can simply be omitted.

Different branch totals can then be added at the end.

Restrictions and State Tracking

More advanced restricted counting problems can be solved by tracking only the information needed to determine what choices remain legal.

Examples of useful state information include:

This idea leads naturally to recursive counting and dynamic methods.

Restrictions involving Capacities

A category may have a maximum capacity.

Once that capacity is reached, later choices cannot use that category.

Capacity restrictions often require casework, recursion, or generating functions in more advanced settings.

Restrictions involving Minimum Requirements

A condition may require at least one or at least \(r\) occurrences of a particular feature.

These problems may be handled by:

Choose the Method That Simplifies the Restriction

There is no single universal technique for every restriction.

A practical decision sequence is:

  1. Can I adjust the stage counts directly?
  2. Would the complement be simpler?
  3. Would splitting into cases make the rule uniform?
  4. Do several bad conditions overlap?
  5. Would a decision tree or recursive description help?

Example: Exactly Two Even Digits

Count four-digit codes containing exactly two even digits.

Assume leading zero is allowed and repetition is allowed.

Choose the two positions that will contain even digits:

\[ \binom{4}{2}. \]

Each even position has \(5\) choices:

\[ 0,2,4,6,8. \]

Each odd position has \(5\) choices:

\[ 1,3,5,7,9. \]

Therefore,

\[ \boxed{\binom{4}{2}5^2 5^2=6\cdot5^4}. \]

Example: At Most One Repeated Choice

Restrictions involving repetition patterns can quickly become more complex.

Before writing a formula, clarify exactly what the phrase means.

For example, “at most one repeated choice” could mean:

Precise definitions are essential before counting.

Restrictions Must Be Interpreted Literally

Small wording differences can change the count substantially.

Compare:

Each describes a different valid set.

Common Error: Applying the Restriction Too Late

Suppose repetition is forbidden.

Writing

\[ 10^4 \]

and then trying to “remove repeats somehow” may create unnecessary work.

If the no-repetition rule can be built directly into the stages, use

\[ 10\cdot9\cdot8\cdot7. \]

Common Error: Forgetting a Restriction after the First Stage

In a no-repetition problem, the choice count continues to decrease.

After choosing one object, it remains unavailable at every later stage.

Common Error: Treating a Required Condition as a Fixed Position

“Contains at least one \(A\)” does not mean the first position is \(A\).

The required symbol may appear in any allowed position and may appear more than once unless the problem says otherwise.

Common Error: Subtracting Bad Cases without Checking Overlap

If invalid outcomes can violate more than one rule, subtracting each bad set separately may remove some outcomes multiple times.

Use inclusion–exclusion when needed.

Common Error: Forgetting Leading-Zero Rules

A code may begin with \(0\), but a positive integer usually cannot.

Distinguish carefully between:

\[ \text{digit strings} \]

and

\[ \text{ordinary decimal integers}. \]

Common Error: Using a Block without Counting Internal Order

If two distinct objects must stay together, treating them as one block counts their placement but not necessarily their order inside the block.

For two distinct objects, there are usually

\[ 2 \]

internal orders.

A Reliable Procedure

  1. State exactly what one valid outcome is.
  2. Write every restriction in plain language.
  3. Identify where each restriction affects the counting process.
  4. Use direct stage adjustment when possible.
  5. Use decreasing counts when repetition is forbidden.
  6. Use complements when the invalid set is simpler.
  7. Use cases when different branches follow different rules.
  8. Use inclusion–exclusion when forbidden conditions overlap.
  9. Use blocks or gaps for adjacency and separation restrictions.
  10. Check that every counted outcome satisfies every restriction.

Example: Full Restricted-Counting Workflow

Count four-digit positive integers with no repeated digits and an even last digit.

The even last digit may be \(0\) or one of

\[ 2,4,6,8. \]

Because \(0\) behaves differently from the nonzero even digits, split into cases.

Case 1: last digit is \(0\).

The first digit has \(9\) nonzero choices, then the two middle positions have \(8\) and \(7\) remaining choices:

\[ 9\cdot8\cdot7=504. \]

Case 2: last digit is one of \(2,4,6,8\).

Choose the last digit:

\[ 4. \]

The first digit must be nonzero and cannot equal the last digit, so it has

\[ 8 \]

choices.

The two middle positions then have \(8\) and \(7\) choices.

\[ 4\cdot8\cdot8\cdot7=1792. \]

Therefore,

\[ \boxed{504+1792=2296}. \]

Practice 1: Forbidden First Digit

How many four-digit codes can be formed from digits \(0\) through \(9\) if the first digit cannot be \(0\)?

Practice 2: No Repetition

How many five-letter strings can be formed from \(8\) distinct letters if no letter may repeat?

Practice 3: At Least One \(X\)

How many four-character strings formed from \(6\) symbols contain at least one designated symbol \(X\), assuming repetition is allowed?

Practice 4: Exactly One \(X\)

How many four-character strings formed from \(\{X,A,B,C,D\}\) contain exactly one \(X\)?

Practice 5: Two People Together

In how many arrangements of \(6\) distinct people are Alex and Blair adjacent?

Practice 6: Two People Apart

In how many arrangements of \(6\) distinct people are Alex and Blair not adjacent?

Practice 7: Four-Digit Integers without Repetition

How many four-digit positive integers have no repeated digits?

Practice 8: Exactly Two Even Digits

How many three-digit codes contain exactly two even digits if leading zero and repetition are allowed?

Practice 9: At Least One Repeat

How many four-character strings formed from \(7\) symbols contain at least one repeated symbol?

Practice 10: Identify the Error

A student counts five-digit positive integers without repetition as

\[ 10\cdot9\cdot8\cdot7\cdot6. \]

Explain the error and give the correct expression.

Practice Answers

Practice 1

\[ \boxed{9\cdot10^3=9000}. \]

Practice 2

\[ \boxed{8\cdot7\cdot6\cdot5\cdot4=6720}. \]

Practice 3

Total strings:

\[ 6^4. \]

Strings with no \(X\):

\[ 5^4. \]

Therefore,

\[ \boxed{6^4-5^4=671}. \]

Practice 4

Choose the position of \(X\), then fill the other three positions with one of \(4\) non-\(X\) symbols:

\[ \boxed{4\cdot4^3=256}. \]

Practice 5

Treat Alex and Blair as one block. There are \(5!\) arrangements of the block and the other four people, and \(2\) internal orders:

\[ \boxed{2\cdot5!=240}. \]

Practice 6

Total arrangements:

\[ 6!=720. \]

Adjacent arrangements:

\[ 2\cdot5!=240. \]

Therefore,

\[ \boxed{720-240=480}. \]

Practice 7

\[ \boxed{9\cdot9\cdot8\cdot7=4536}. \]

Practice 8

Choose the two even positions:

\[ \binom{3}{2}=3. \]

Each even position has \(5\) choices and the odd position has \(5\) choices:

\[ \boxed{3\cdot5^3=375}. \]

Practice 9

Total strings:

\[ 7^4. \]

Strings with all symbols distinct:

\[ 7\cdot6\cdot5\cdot4. \]

Therefore,

\[ \boxed{7^4-7\cdot6\cdot5\cdot4=1561}. \]

Practice 10

A five-digit positive integer cannot begin with \(0\), so the first position has only \(9\) choices.

After choosing a nonzero first digit, the second position has \(9\) remaining choices, including \(0\), followed by \(8\), \(7\), and \(6\).

\[ \boxed{9\cdot9\cdot8\cdot7\cdot6}. \]

What to Remember

Restrictions modify the available choices and sometimes the best counting method.

The most important habit is to let the restriction shape the counting method, rather than forcing every problem into one formula.

Where We Go Next

Restrictions often make later choices depend on earlier ones. In many counting problems, that dependency can be described by reducing the problem to smaller versions of itself.

The next lesson, Recursive Counting, develops this self-referential structure into recurrence relations and step-by-step counting rules.