Showing posts with label combinations. Show all posts
Showing posts with label combinations. Show all posts

Sunday, November 8, 2015

[H2_ACJC2015P2Q7] Choosing balls by another method

Question


Introduction
     This question is taken from a Junior College examination in Singapore.  It looks deceptively simple.  Actually, there is an easy way to solve it.  But reading the question made me do a double take.  Since we are choosing a maximum of  4  balls for a given colour and balls of the same colour are indistinguishable, why bother having  6  balls?  It turns out that as long as we have  4  balls or more for each colour, the number of balls would not matter.  So this issue is a distractor.
     I shall explain my standard approach to solving this type of problem.  I present a solution in which part (iii) is solved via a case-by-case analysis.  I suspected that there is a short cut that avoids case-by-case analysis and I finally found a short cut by a flash of inspiration.  So I shall also present the short cut to part (iii).

My Approach
     When there are repeated indistinguishable objects, I imagine objects of the same type being stacked up in columns.  For part (i) of our problem, see the diagram on the left.  I am just choosing  4  columns out of  5  (indicated by the up arrows).  Once I have chosen the columns, I just take one ball out from each column and put it into my selection.  Imagine putting them into a plastic bag – the order of the balls does not matter.  The number of ways to do this is  5C4 = 5.

For part (ii), see the diagram on the right.  First I choose one of the 5 columns and automatically take three balls (it does not matter which three actually) from that column.  From the remaining 4 columns, I choose one and pick out one of the balls from that column.  I can do this in  5 × 4 = 20 ways.  I call the pattern in part (i) “{XYZW}” (all different colours) and the pattern in part (ii) “{XXXY}” (three of one colour and another one of a different colour).  The curly brackets are a reminder that the order does not matter.   For part (iii), we can work out the other patterns and total up the number of ways.


Solution 1

(i)    Number of ways = 5C4 = 5.

(ii)   Number of ways = 5 × 4 = 20.

(iii) 
Pattern
Working
Number
{XXXX}
5C1  [5 columns, choose 1]
5
{XXXY}
done in part (ii)
20
{XXYY}
5C2  [5 columns, choose 2]
10
{XXYZ}
5 × 4C2  [5 ways for X, 4C2 ways for YZ]
30
{XYZW}
done in part (i)
5

Total =
70
             Number of ways = 5 + 20 + 10 + 30 + 5 = 70


Remarks
     Don’t you hate case-by-case analysis?  After thinking for a while, I found a short cut.  This requires thinking of a related problem.  Let us say, for example, we choose  2  orange balls,  1  green ball and  1  blue ball.  This is equivalent to throwing  4  grey (AmE. gray) balls with  2  of them going into a bin for marked “orange”,  1  into a bin marked “green”  and  1  into a bin marked “blue”.  There are  5  bins, one corresponding to each colour and they are separated by  4  grey separators (one less than the number of bins).  The number of grey balls in each bin indicates the number of balls of the respective colour chosen.  The aforementioned configuration can be codified as a string of symbols consisting of two dots followed by two separators, then a dot, a separator, a dot, and finally a separator.  Every balls-and-bins configuration can thus be codified as a string of consisting of 4 grey dots (representing 4 grey balls) and 4 separators. 

     Because of this one-to-one correspondence, the number of ways of choosing  4  coloured balls is exactly the same as the number of strings of symbols.  There are 8 symbols (4  dots and 4 separators).  Of the 8 positions for the symbols, we need to choose  4  to put in the dots.  The rest will, of course, be filled by separators.  That means  8C4 , which is  70.

Short-cut for part (iii)
     Number of ways = 4+4C4 = 70.

I hope you have learned something useful.   J


H02. Use a diagram / model
H03. Make a systematic list
H04. Look for pattern(s)
H08. Make suppositions
H09. Restate the problem in another way
H10. Simplify the problem
H11. Solve part of the problem
H12* Think of a related problem


Suitable Levels
* ‘A’ Level H2 Mathematics (» Grade 11 / 12)
* IB Mathematics SL and HL (Binomial coefficients, counting principles)
* other syllabuses that involve combinatorics (combinations and selections)
* whoever is interested







Thursday, May 21, 2015

[IB-HL H&H_8G Q16] Sum of Squares of some Binomial Coefficients

Question

Introduction
     This problem is taken from the Haese textbook for International Baccalaureate, 3rd Edition, page 262.  It looks pretty daunting doesn’t it?  Where do we even begin?  The key to solving this problem is to realise that the binomial coefficients are coefficients of (numbers attached to) certain powers of  x  in the expansion.  The question is:  which power or powers?
     Before we go into that, let us review some important relevant facts.

Reminders
Solution


Final Remarks
     This problem was solved by using the symmetry property and treating binomial coefficients as coefficients of certain powers of  x.  We also worked backwards by noting that the RHS of the equation to be proven is the coefficient of  xn.  This suggests that we compare this with the coefficients of  xn  on the LHS.


H03. Make a systematic list
H04. Look for pattern(s)
H05. Work backwards
H09. Restate the problem in another way
H13* Use Equation / write a Mathematical Sentence

Suitable Levels
International Baccalaureate Mathematics (HL)
GCE ‘A’ Levels H2 Mathematics
* other syllabuses that involve complex numbers and polynomials


Friday, April 6, 2012

JCCDQBHWHCB007(ii) Combinatorics : “Choose, then Automatically fill” technique



     The question says “the captain must stand between the two youngest players” which I interpret literally to mean: not necessarily directly next to each other, but there can be intervening players.  Although I suspect that the one who set this question might have meant that the captain is supposed to be in between directly next to the two youngest players, I shall attempt the question according to its prima facie meaning.  Later, I shall consider what if the captain and two youngest players are together next to one another with the captain in the middle.

Suggested Approach and Solution:-


 

Number of rows to choose from = 2

The condition that “the captain must stand between the two youngest players” seems difficult, because there can be one or more intervening players.  Generally we do not favour complicated case-by-case analyses.  The good news is that we can use a “choose, then automatically fill” technique to tackle this.  Within the row with the captain, there are 5 positions and we choose 3 of them.  Then we automatically fill them with a youngest player, the captain and then the other youngest player.  The number of ways to do this is  5C3 = 10.

Number of ways the two youngest players can swap around = 2!.
Number of ways the rest of the players can shuffle around   = 7!.

Total number of ways = 2 x 5C3 x 2! x 7! = 201 600.



What if …
     What if the captain is in between directly next to the two youngest players?
 

Number of rows to choose from = 2

     If the captain is in between and directly beside the two youngest players, we treat these 3 players as a unit.  There are 3C1 = 3 ways to position this group within the row.  Note that within this group, the two youngest players can still swap around while the captain stays in their middle.  Everything else is the same as above.

Total number of ways = 2 x 3C1 x 2! x 7! = 60 480.


JCCDQBHWHCB007(i) Combinatorics : Choosing with special conditions



     This sort of question has appeared in the GCE ‘A’ levels before.  For questions with special conditions, a good approach is to consider to the special conditions first.

Suggested Approach and Solution:-
 

Number of ways to choose the young player = 2C1 = 2
The captain must be in, so two vacancies have been taken up and there are 3 left.  These places must be filled from the 7 eligible other players (excluding the captain and the two youngest players).  There are   7C3 = 35  ways to do this.  The total number of ways is
          35 x 2 = 70

JCCDQBHWHCB002(iii) Combinatorics : Partitioning and team shuffling


Suggested Approaches and Solutions:-

     Though not compulsory, a diagram is very useful to help visualise the situation.



There are three subgroups, with sizes 1,1,2.  Let’s call them teams A, B, and C.  Within each team, the order of individual members does not matter.  However, human beings are deemed to have distinct identities.

Now, how many ways are there to partition the ladies into the above three teams?  Think of an equivalent problem (another heuristic): Imagine the ladies lining up and then put on T-shirts, with letters A, B, C, C for the teams.  So how many words can you spell with four letters, two of which are repeated?
Number of ways to partition the ladies into the three teams = 4! / 2!

Number of ways to put the men into the teams                     = 3!

Note that teams A and B, which have the same number of people, are interchangeable (the team names do not matter, but rather who gets teamed up with who), so we need to divide by 2!
So the answer is
          4! / 2! x 3! x 1 / 2! = 36


Reflection
Are there other methods or ways to think about this problem?
Yes!  Having different methods that give you the same answer increases your confidence that the answer is correct.  If you have different answers, try to find out why.  You might learn something valuable!

Method 2 (“Phantom” or “Joker” method)
     Imagine that, in lieu of the missing guy, we have a ghost (or a Joker card).  We try to pair up the ladies with the men (or ghost) as usual, and there are  4P4  = 4! = 4 x 3 x 2 x 1 = 24 ways to do this.  The lucky/unlucky lady who got the ghost or Joker card joins one of the 3 actual men.  So there are 24 x 3 = 72 ways … Ooops!  Why is this not the same as the above method?  That is because in each case, the other lady who ended up with the same guy could have been the one that had the Joker card and this possibility was already counted.  That means we have uniformly over-counted by exactly a factor of 2! = 2, so we must divide by this number.  Thus the correct calculation using this approach is
          4! x 3 / 2! = 36

Method 3 (MCP method)
     Here I shall use a Multi-stage Combination Product method.  Just kidding.  There is no such term.  Actually MCP means “Must Choose Properly” for Male Ch….. P...  We first arrange the guys in order.

Number of ways to choose the “lucky” guy with 2 ladies = 3C1 = 3
Number of ways to choose the “lucky” 2 ladies                = 4C2 = 6
Number of ways to shuffle the other 2 ladies                    = 2!   = 2
Total number of ways = 3 x 6 x 2 = 36




JCCDQBHWHCB015 Combinatorics : Conditional Over-counting



Introduction

     This question is particularly challenging, because it does not conform to any of the usual types of problems taught at ‘A’ level.  However, we can still use the following problem solving heuristics:-
     · drawing a diagram
     · considering a simpler problem first

Suggested Approach and Solution:-

     Consider first the case for 3 couples and draw a diagram with arrows.

Suggested Approach and Solution:-

     We use the same problem-solving tactics as for question 11.  Consider first the case for 3 couples and draw a diagram with arrows.

 

We now discover that this problem is a little more complicated than that of question 11. 
Each of the 3 men has arrows coming out to 2 x 3 – 2 = 4 persons (everyone except himself and his wife).  So there are 3 x (2 x 3 – 2) = 12 arrows.  There is double-counting (arrows in both directions), but only among the men.  So we need to subtract the number of lines connecting i.e.
3C2 = 3 pairs of men.  Thus for the case of 3 couples, the calculation is:
          3 x (2 x 3 – 2) – 3C2 = 12 – 3 = 9
We verify by counting from the diagram that this is correct.

For 13 couples, we have
          13 x (2 x 13 – 2) – 13C2 = 247 ways.
         
FYI, the general formula is
          n x (2n – 2) – nC2

JCCDQBHWHCB019 Combinatorics : Circular Permutations



Suggested Approach and Solution:-

     Draw a diagram.  Let’s assume that the special woman (W*) is at the 12 o’clock reference position.  [If not, we can always rotate our heads or rotate the table so that she is.] 

 

Together with the two lucky(?) men M1 and M2, they form one entity.  There are 3C2 x 2!
= 3P2 = 6 ways to choose and arrange these two men to sit besides this special woman.  The other 4 persons can arrange themselves relative to the reference entity in 4! = 24 ways (this is same as (5 – 1)! or 5! / 5).  Hence the number of ways = 6 x 24 = 144.



JCCDQBHWHCB011(i) Combinatorics : Uniform Over-counting (Division Principle)



     [ As an ice-breaker game, this is stupid!  Anyway … ]

Suggested Approach and Solution:-

     If the problem seems difficult, try a simpler problem first.  This is a useful heuristic / tactic, especially for permutation and combination problems.  Let’s say there are only six students.  Draw a diagram (a heuristic) with dots representing students, and arrows from each dot to other dots except the two dots beside it.  You will soon realize that each arrows goes in two directions.  This means there is over-counting by a factor of 2.  Whatever answer you get by counting the arrows forward must be divided by 2.


 

How many arrows are there?  (Heuristic: Think of an equivalent problem).  For each of the 6 dots, there are 6 – 3 = 3 arrows coming out (minus 3 because excluding itself and two beside it).
So the number of arrows is 6 x (6 – 3) = 18.  But we don’t really care about the direction of the arrows.  Because of the double-counting (and this is uniformly true for every pair of arrows), we must now divide this answer by 2 to get 9.  We can verify by counting from the diagram that this answer is correct.

Another approach: there are 6C2 = 15 possible line segments (connections between two dots).  But we don’t count those on the perimeter of the hexagon, so we subtract 6 (because there are six sides all round the hexagon).  This gives 15 – 6 = 9.

For 17 students, the answer is: 17 x (17 – 3) / 2 = 119