You are on page 1of 1

Permutations and Combinations: Have a question? Ask it


here!
Undercounts and Overcounts
November 30, 2018 / NQOTW, Probability / Counting, Strategies / By Dave Peterson We are a group of experienced volunteers
whose main goal is to help you by
answering your questions about math. To
(A new question of the week) ask anything, just click here.

We have been looking at some combinatorics questions, both easy and challenging. Some questions have come to
us in recent weeks that can illustrate how to think your way through relatively difficult problems, including Recent Blog Posts
catching errors and interpreting a textbook’s solutions. We’ll see yet again that there are usually multiple ways to
solve these, and the book’s way is not always the best. Clarifying Definitions: Triangle, Rectangle,
Circle

Undercounting Mississippi permutations Experimenting with Triangles and Circles


Two Triangle and Circle Problems
Here is the first question: Prime Factorization of a Number
(Advanced)
Prime Factorization of a Number (Basics)
I am trying to solve this question:

Find the number of words made using all the letters of the word “MISSISSIPPI” such that both P’s
are together but all I’s are separate.
Blog Archive
I solved this question like this:

Firstly I have permuted M, S, S, S, S as (5!/4!) [I have applied the concept of permutation of alike February 2023 (2)
objects taken all at a time] January 2023 (4)
So, as there are 5 objects in total, hence, the total gaps created is 6. December 2022 (5)

Now consider [PP] as a single unit. November 2022 (4)


October 2022 (4)
The objects yet to be arranged are I, I, I, I, [PP]
September 2022 (5)
So, select 5 gaps out of six to place the 5 objects= 6C5
August 2022 (4)
And finally arrange the five objects like this = (5!/4!) [Divide by 4! because there are 4 similar objects –
July 2022 (5)
4 Is]
June 2022 (4)
Hence the final answer is (5!/4!) * 6C5 * (5!/4!)
May 2022 (4)
But the correct answer given in my textbook is (6!/4!)*7C4*1
April 2022 (5)
I don’t understand where am I doing wrong? March 2022 (4)
February 2022 (4)
January 2022 (4)
MISSISSIPPI is a common example in permutations of multisets (“words” with repeated letters, or “permutations
of alike objects”), just asking how many permutations there are. There is a formula for this, which I will be December 2021 (5)
discussing in a later post; but for the moment we won’t really need it. November 2021 (4)
October 2021 (5)
Let’s see what Navneet has done. He first counted the ways to permute the letters that are not constrained in the
problem, M S S S S. He used the formula he was taught; but we can just observe that we can put the M in any of 5 September 2021 (4)
places, so there are 5 ways to arrange them. August 2021 (4)
July 2021 (5)
Next, he inserts both P’s (as a single unit) and the 4 I’s; there are 6 places each of these 5 items can go: _ M _ S _
S _ S _ S _ (however the M’s and S’s have been placed). So he chooses 5 blanks (6 ways), and arranges the 5 June 2021 (4)
items in them (5 ways), for a total of 5 ⋅ 6 ⋅ 5 = 150 ways. May 2021 (9)
April 2021 (9)
But the book gives a different expression, with a different value, as its answer. What went wrong? I can see an
error; can you? These things can be subtle. We also have the question, what is it that they did? March 2021 (9)
February 2021 (7)
Doctor Rick answered, first commenting on the book’s answer:
January 2021 (7)
December 2020 (7)
I don’t really understand why a textbook would give an answer like this — evidently the individual
November 2020 (8)
factors are intended to indicate the thinking behind them (otherwise why include a factor of 1?), but
they do not do the job. It takes an explanation in words, such as you have given; thanks for doing that! October 2020 (9)
September 2020 (8)
I notice that your answer is 1/7 of the book’s answer; you are somehow significantly undercounting.
Let’s look at your work: August 2020 (9)

Firstly I have permuted M, S, S, S, S as (5!/4!) [I have applied the concept of permutation of alike July 2020 (8)
objects taken all at a time] June 2020 (9)
So, as there are 5 objects in total. Hence, the total gaps created is 6. May 2020 (8)

Now consider [PP] as a single unit. April 2020 (9)


March 2020 (9)
The objects yet to be arranged are- I, I, I, I, [PP]
February 2020 (8)
The last line above is where I see something wrong. Your method will find the number of permutations
with the P’s together but not adjacent to another I or to a P. For instance, you don’t count January 2020 (9)
MISSISSIPPI, though it fits the conditions. It’s OK for two I’s to be separated by PP as well as by M or December 2019 (9)
S. Maybe that is enough for me to say; try correcting your work with this hint.
November 2019 (8)
So, select 5 gaps out of six to place the 5 objects= 6C5 October 2019 (9)
And finally arrange the five objects like this= (5!/4!) [Divide by 4! because there are 4 similar September 2019 (9)
objects – 4 I’s] August 2019 (9)
By the way, I wouldn’t bother with 5!/4!, either here or earlier when you permuted M, S, S, S, S. I’d just July 2019 (9)
think: There are 5 possible positions for the M to go, and the other four positions are occupied by S’s.
June 2019 (8)
What you do isn’t wrong, but it’s overkill. Likewise, to select 5 gaps out of 6, I’d just think: Pick the one
gap I won’t be using. There are 6 choices. May 2019 (9)
April 2019 (9)
March 2019 (8)
So Navneet’s method is nice, but missed some possibilities, which we call an undercount. He accidentally February 2019 (8)
excluded too much.
January 2019 (9)
Navneet responded, December 2018 (13)
November 2018 (13)
Thank you Doctor Rick! October 2018 (14)

I have understood where I was doing wrong. September 2018 (12)


August 2018 (4)
July 2018 (5)
Of course, that leaves us hanging! We see what was wrong; but we still need to find a way to get the right answer. June 2018 (13)
What process can we follow to make all the legal choices, and no illegal ones?
May 2018 (13)
Maybe we just need to slow down. The P’s and the I’s have different restrictions, so we should deal with them April 2018 (13)
separately. We have 5 ways to arrange MSSSS; now let’s put in [PP] (keeping it as a unit): it can go in any of the 6 March 2018 (10)
slots in _ M _ S _ S _ S _ S _, so we now have a total of 30 ways to arrange MSSSS[PP]. Now we can insert the 4
February 2018 (12)
I’s; since they have to be separate, each must go in one of the 7 slots in _ M _ S _ S _ S _ S _ [PP] _. So we choose
January 2018 (14)
4 of 7 slots, and then we are finished. The total number of possibilities is 5 ⋅ 6 ⋅ 7 C 4 = 30 ⋅ 35 = 1050 .

I suspect that the book’s author used the multiset permutation formula to arrange MSSSS[PP], followed by our
insertion of the I’s. Categories

Overcounting cricketer combinations Algebra (167)


AQOTW (67)
Following this, Navneet had a new problem:
Arithmetic (90)
Ask Dr. Math (6)
I am stuck on another problem: Calculus (65)
A team of 11 is to be selected out of 10 batsmen, 5 bowlers, and 2 keepers such that in the team Geometry (82)
at least 4 bowlers should be included. Find the number of possible ways of selection.
Higher math (17)
I tried to solve this question like this: Logic (31)
First select 4 bowlers out of 5 = 5C1 NQOTW (151)
Then, remaining candidates = 10+2+(5-4) = 13 Probability (37)

Hence, select the remaining 7 players out of 13 = 13C7 Puzzles (29)


Statistics (25)
So, my final answer is 5C4*13C7
Study skills (6)
But, this is a wrong answer.
Trigonometry (52)
The correct answer given is (5C4*12C7)+(5C5*12C6)

Please explain me where I am doing the error?

Also, can you please tell me what should I check or do in order to avoid such errors in future? Tags

Again, a well-asked question, showing his thinking along with the problem and the provided answer, so we have
Algorithms Alternatives
all we need. He got 8580, while they say 4884. Why?
Ambiguity Assumptions
Doctor Rick responded:
Averages Challenges

I thought first of the same approach you took. Then I considered it more carefully, looking to see if I had
Checking Combinatorics
missed any possibilities or if I had counted any selection more than once.

I then realized that I was overcounting, and here’s why: You’re selecting four bowlers to include first, Complex numbers Context
and then maybe the fifth bowler will be among the remaining 7 players you choose. But if you chose a
different set of four bowlers to start, and then the fifth bowler, you’d end up with the same set of 11
Counting Curiosity
players — you just picked all five bowlers in a different order.

Definitions Derivatives

More specifically:
Estimation Factors Fibonacci

Say the five bowlers are A, B, C, D, and E. When you select four bowlers, you might get A, B, D, and E. Formulas Fractions
Then when you select 7 more players, you might get C — or you might not. If you do, then you get the
same set of players as if you had first selected B, C, D, and E, then got A as one of the 7 more players.
Functions Graphing History
So you have counted this same set of players more than once. (In fact you counted it five times, one for
each bowler you could have left out of the initial selection of bowlers (and then gotten among the other
Inconsistency Induction
seven).

Intuition Limits Logic

This is the essence of overcounting: selecting in such a way that the same selection can be made in more than one Methods Mistakes Models
way, so that it is counted more than once. There are several ways to fix this: you can do this, but then correct the
overcount as an additional step (this is what the inclusion-exclusion principle does, subtracting the excess that was Notation Pedagogy
added); or you can break things down into cases, adding together counts that do not overlap.

Since we know the book’s answer, we can also try to learn from that: PEMDAS Primes Proof

Proofs Real life Sequences


Have you considered how they got their answer? As I said, just showing an expression like this does
not constitute an explanation, but it does supply some hints. In particular, we can see that the writer
used two disjoint cases; I think you can figure out what those cases are. Sets Strategies

Textbook errors Vectors Why


That is a significant hint. Since Navneet just moved on without giving his answer, I will state it here: The two
cases are “exactly 4 bowlers” and “exactly 5 bowlers”. In the first case, we have 5 C 4 ways to choose the 4 Word problems Words
bowlers, and 12 C 7 ways to choose the remaining 7 from the 12 non-bowlers; in the second case, we have 5 C 5 = 1
ways to choose the 5 bowlers, and 12 C 6 ways to choose the remaining 6 from the 12 non-bowlers. The total, as
given in the book, is 5 C 4 ⋅ 12 C 7 + 5 C 5 ⋅ 12 C 6 = 5 ⋅ 792 + 1 ⋅ 924 = 4884 .
Recent Comments
As for the general question of avoiding errors:
Dave Peterson on Is a Square a Rectangle?
Classifying Shapes
All I can say in general is what I said above: Go over your selection method, looking for selections you
Dave Peterson on Experimenting with
either didn’t count or counted more than once. If you did either of these, you might be able to modify
Triangles and Circles
your approach by using the inclusion-exclusion principle, but you may decide (as the solution’s author
did) that it’s easier to take a somewhat different approach. Peng on Experimenting with Triangles and
Circles
Dave Peterson on Frequently Questioned
Answers: Trisecting an Angle
Miscounting words Experimenting with Triangles and Circles –
The Math Doctors on Two Triangle and
Continuing to pursue a better understanding of the whole process, Navneet compared his method of solving this Circle Problems
problem with another problem, this time a permutation:

Now, see another question:


About This Site
Find the number of 4 letter words that can be formed using the letters A, L, H, B, D such that the The Math Doctors is run entirely by
word ends with D but does not begin with H. volunteers who love sharing their
knowledge of math with people of all ages.
The solution given in my textbook of this question is, (3C1) * (3C2)* (1) * 2!
We have over 20 years of experience as a
If you would see clearly then the method of selection used is same in both the solutions. group, and have earned the respect of
educators. For some of our past history, see
But in the first question overcounting occurred whereas in the second question no overcounting occurs About Ask Dr. Math. If you would like to
(but opposite thing occurs, the counting is less) and we have to adjust our answer by multiplying the volunteer or to contribute in other ways,
result with 2!? please contact us.
Why such strange thing occurs?

Navneet sees this method of solution as paralleling his previous method; how can one be right and the other
wrong?

Doctor Rick answered:

As I have said before, I do not “see clearly the method of selection used”, based only on the solution
given. I have to think about it.

I take it that the 3C1 refers to selecting one of the letters A, L, B for the first letter of the word (it can’t be
H, and it can’t be D because that is taken). Personally, I’d just put 3 ways of choosing the first letter.
The (1) surely represents the number of choices for the last letter (it must be D).

Now, the two middle letters remain to be selected from a pool of three remaining letters (since we’ve
used two of the five letters already). The order of these two letters does matter, so we use
permutations: 3P2 = 6. According to the method you have evidently been taught, this is 3C2 * 2!.

The “undercounting” to which you refer is because, if we don’t take order of the middle two letters into
account, the words BLAD and BALD (for example) would be counted as the same word. We don’t want
to do that, so we must multiply by 2! (the number of different orderings of any two different letters).

Does this help?

So the “undercounting” he sees here is an entirely different kind than we had before, relating only to the difference
between combinations and permutations: combinations ignore order, and we don’t want to. It appears that Navneet
has been taught these concepts in a different way than we are accustomed to, perhaps not even using a notation for
permutations at all but building everything on the concept of combinations. I think of permutations as more
n!
fundamental and natural, so that we start with n P n = n! , generalize to n P r = , and then (because each
(n − r)!
nPr
combination corresponds to all possible permutations of the result) n C r = .
rPr

Navneet was not quite sure yet:

Thanks Doctor Rick!

Almost everything was clear to me.

I now understand that there is no clear cut formula or method to check overcounting, and every time we
need to use our logic/thinking to prevent overcounting.

I have a last question:

While solving this question – “Find the number of 4 letter words that can be formed using the letters
A,L,H,B,D such that the letter ends with D but does not begin with H.”

Why do we multiply with 2! and not 3! ?

I am asking this because in the question the position of only one letter “D” is fixed.

So, there are remaining 3 places. Hence, we need to multiply with 3! in order to get the total number or
arrangement.

And if we multiply by 2! then we permute between only two of the selected letters, not three. Hence, our
answer must be wrong (because of less counting). Isn’t it?

Doctor Rick first answered the general comment:

That’s true: There is no substitute for thinking! Formulas and rote procedures are useful when you’re
doing the exact same type of problem over and over; but that’s not usually the case with counting
problems. Each has something different about it, and it isn’t easy to choose a valid approach.

Likely it is an over-reliance on a taught procedure that led to the error. Doctor Rick continued:

Recall the procedure by which I found the answer last time. First we choose the last letter, because
it must be D. Then we choose the first letter, because it has a special condition: it can’t be H (or D,
since that must be used for the last letter). This leaves the middle two letters. Trying to follow the
procedure you seem to be learning, I pick a pair of letters out of the three remaining (in 3C2 ways), and
then multiply by 2! to get the number of orderings of those two letters.

Doing it my own way, I put D in the fourth position (1 choice), then choose one of the letters A, L, B to
go in the first position (3 choices). Then I choose one of the remaining three letters (H and those I didn’t
use from A, L, B) — 3 choices again. Finally I choose one of the two letters left, for the third position.

3 × 3 × 2 × 1 = 18 ways (the factors are for positions 1, 2, 3, 4 in order)

If it isn’t clear yet, note that we need to treat the first position differently from the middle two, because it
has an added condition: it can’t be H. If I were to multiply by 3! instead of 2!, it would correspond to
permuting the first three letters; but then I might be moving an H into the first position where it can’t be.

This is the fill-in-the-blanks approach, where we don’t try to follow a formulaic method, but just break the
problem down into a series of choices (permutation-first, we might say — taking order into account as long as
possible, rather than this teacher’s combination-first approach, multiplying by a factorial at the end).

Navneet remained unsure:

It is correct to take care that we don’t move the letter H into the first position by multiplying with 3!.

But, don’t you think we have missed some cases by just only multiplying with 2! ?

Because when we multiply with 3!, then, there are some extra cases when we are not moving the letter
H to the first position.

Like,

ALHD——-to———>LHAD

So, don’t you think we are going to miss many such cases if we just multiply with 2!? (or don’t permute
the first position)

I will be thankful for help!

Doctor Rick answered by actually listing the possibilities to leave no doubt:

Here was the problem — modified by stating the assumption that seems to be made in the textbook’s
solution:

Find the number of 4 letter words that can be formed using the letters A, L, H, B, D no more than
once each, such that the letter ends with D but does not begin with H.

Since the claimed answer is so small (18), we can just list all the 4-letter words that fit the condition:

ABHD ABLD AHBD AHLD ALBD ALHD

BAHD BALD BHAD BHLD BLAD BLHD

LABD LAHD LBAD LBHD LHAD LHBD

Can you show me a word that I have missed?

We multiply by 2! after we have already dealt with all the possibilities for the first letter, A, B, or L (the
factor 3C1 in the textbook’s solution) and we have selected two of the remaining 3 letters for the middle
two positions (the factor 3C2).

You’ll see that my list above consists of six words beginning with A, six beginning with B, and six
beginning with L. Let’s focus on the six words beginning with L. There are 3C2 = 3 choices for the pair
of letters in the middle: {A, B}; {A, H}; {B, H}. Each pair can be in either order: AB or BA; AH or HA; BH
or HB. That’s the factor of 2!.

You note that some permutations of the first 3 letters are valid — those that don’t put H in the first
position. If H is not one of the middle two letters, then we could permute freely among all the first 3
letters, making 6 words. But there are two problems with this.

First, in order to use the multiplication principle, the number of choices must not depend on other
choices — but I just said that multiplying by 3! only works when H is not in the pair chosen for the
middle two letters.

Second, we will be overcounting: for instance, we can choose L for the first letter and {A, B} for the
middle two, or A for the first letter and {L, B} for the middle two, and get LABD by permuting the first
three letters in both cases. Thus LABD would be counted twice.

← Previous Post Next Post →

3 thoughts on “Permutations and Combinations: Undercounts and


Overcounts”

FRED
NOVEMBER 23, 2019 AT 3:17 PM

It doesn’t seem that the word problem stated if repetition was / was not allowed. This will obviously affect the
answer.

Reply

DAVE PETERSON
NOVEMBER 23, 2019 AT 5:22 PM

Which of the three problems are you referring to?

The first, using all the letters of MISSISSIPPI, requires repetition.

The second, selecting a cricket team, clearly does not allow repetition, as a person can’t be on the same team
more than once.

The third, making four-letter words, as stated left it unclear whether duplicate letters were allowed (so this is
clearly what you were referring to); but Doctor Rick at the end restated it, making his assumption explicit:
“Find the number of 4 letter words that can be formed using the letters A, L, H, B, D no more than once
each, such that the letter ends with D but does not begin with H.” He made this assumption because it made
the book’s answer correct!

So, yes, as you indicate, removing that condition would change the answer, and the book definitely should
have stated it. My suspicion is that this problem was given in a context where all problems were permutations
of some sort, so that it was assumed. (In face-to-face interactions with students, I often look at the context in
their book to check for such contextual assumptions, or instructions at the start of a set of exercises, in order
to make sure I am interpreting a problem correctly.)

Thanks for the opportunity to emphasize this important point.

Reply

Pingback: Probability: Cards vs Dice – The Math Doctors

Leave a Comment
Your email address will not be published. Required fields are marked *

Type here..

Name* Email* Website

Post Comment »

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Have a question of your Search Blog Meta


own?
Log in
Search … Search
 Entries feed
Ask a Question
Comments feed
WordPress.org

Copyright © 2023 The Math Doctors | Powered by Astra WordPress Theme Email

You might also like