Showing posts with label equivalent problem. Show all posts
Showing posts with label equivalent problem. Show all posts

Friday, April 10, 2015

[OlymPri20150408CBP] Paths to avoid {#Combinatorics}

Question

Introduction
     This is an mathematics olympiad question for primary schools, and it is also a good mind-stretching exercise for students taking H2 Mathematics or IB Mathematics.  The problem can be solved using good tactics (heuristics) and some knowledge of combinations.  The number of ways to choose  r  objects out of  n  (a.k.a. “n choose r”) is 
For example, if you have  8  different balls  and you want to choose  3  out of the  8, the number of combinations is  8C3 = 56.   You write 8 on top and 3 below and then introduce new factors by successively decreasing each number by one, until the bottom factor reaches 1.  Notice that the number of factors in the numerator is equal to the number of factors in the denominator.
     Sometimes, nCr is written like a  2 by 1  column vector.  Many teachers introduce the concept with a formula using factorials, but the above formula is more practical for calculations.  Combinations have a nice symmetrical property.  For example, 8C5 = 8C3 = 56.  Why?  That is because choosing  5  objects out of  8  is the same as choosing  3  to be rejected.  This can be verified by writing  8C5  out in full and cancelling the factors.

Solution

     First, let us note that every path from  A  to  B  is equivalent to a sequence of right arrows (®) and up arrows (á).  In the above example, the path corresponds to a sequence “®áᮮᮮá”.  There are  9  symbols in each sequence, of which  5  must be “go right” and  4  must be “go forward”.  [H12* Think of a related problem]  The number of such paths is
          W = # of paths from  A  to  B  = 9C4  = 9C4  =  126.

However, we do not want the paths that pass through  P  or  Q.  So we need to consider
          X = # of paths from  A  to  B  passing through  P
          Y = # of paths from  A  to  B  passing through  Q

The problem is, if you added these, the paths that pass through  P  and  Q  would have been double-counted.  So we also need to consider
          Z = # of paths from  A  to  B  passing through  P  and  Q
The required number of paths would be  W – (X + Y – Z) = W – X – Y + Z.  Let us calculate part by part.
          X = # of paths from  A  to  B  passing through  P
             = (# of paths from  A  to  P) ´ (# of paths from  P  to  B)
             = 3C1 ´ 6C3  = 3 ´ 20 = 60
          Y = # of paths from  A  to  B  passing through  Q
             = (# of paths from  A  to  Q) ´ (# of paths from  Q  to  B)
             = 6C2 ´ 3C2  = 15 ´ 3 = 45
          Z = # of paths from  A  to  B  passing through  P  and  Q
             = (# paths A  to  P) ´ (# paths  P  to  Q) ´ (# paths  Q  to  B)
             = 3C1 ´ 3C1 ´ 3C2  = 3 ´ 3 ´ 3 = 27
The paths from  A  to  P  are chosen independently from the paths from  P  to  B.  That is why we are able to multiply the numbers.  Likewise, the other multiplications are justified because of independence.  Putting everything together,
                 # of paths from  A  to  B  passing through neither  P  nor  Q
             = W – X – Y + Z = 126 – 60 – 45 + 27 = 48   J

H02. Use a diagram / model
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
* GCE ‘A’ Level H2 Mathematics (“Permutations and Combinations”)
*  IB Mathematics HL / SL (“Counting Principles”)
* Primary School Mathematics Olympiad
* anyone, young or old, who is interested in thinking



Friday, April 6, 2012

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




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


 

Sunday, February 26, 2012

JCCDQBHWH_FN021(b) Range of Composite Functions

[original source unknown]



Introduction

     This question is from the usual book which did not credit the source.  It comes from some unknown junior college in an unknown year.  It is a challenging question because most students are poor at finding the range of composite functions.  Furthermore, this question has a little twist: you are given the range of the composite function, but you are required to solve for something.  So you need to, in a way, work backwards and/or use inequalities (another weak point for many students).

     Students are reminded of the right-to-left convention for functions in JC as well as GCE ‘A’ level examinations.  This means in ‘fg’ the  g  is done first before the  f.  There are some university professors who use a left-to-right convention, but here we do not.  So take note.

     Again metacogntion and heuristics are very important and I will illustrate their use.


Stage 1:  Understanding the Problem

What is this (part of a) question about?
range of composite functions, solving for unknown

What is given in the question?
The range of  fg.

What is the question asking for?
The value of  k  that leads to the given range.


Stage 2:  Planning the strategy

What heuristics do you think can be used for this question?
· Working forwards (considering the meanings, asking “so what?” “what next?”)
· Setting up equation/inequality
· Working/thinking backwards
· Consider equivalent expressions or rephrasing the problem

Can you recall the definition of the range of a function?  The range of a composite function?


Stage 3:  Execution

Any observations that can make your job simpler?
     Yes.  Observe that  g(x)  is a quadratic with positive  x2  coefficient.  So this is a parabola that looks like a happy smile.  To locate the minimum point, we can complete the square (a technique learnt in secondary school).
     g(x)  =  x2 + 2x – 1  =  x2 + 2x + 12 – 12 – 1  =  (x + 1) 2 – 2
when  x = -1,  g(x) = -2.  The minimum point is (-1,-2).  So the range of  g  is all the
numbers from  -2  upwards.  i.e.  Rg = [-2,` \oo `).

So what now?
     With the two-stage method, suppose now we have
                  x ` \in ` Rg
That means?
                  x > -2
That means?
                  x + k + 1 > -2 + k + 1
Why do you do that?
     I want to slowly manipulate the LHS to get  ln(x + k + 1)  which is  f(x).  Continuing,
                  ln(x + k + 1) > ln(k – 1)
                                f(x) > ln(k – 1)
i.e.                            Rfg = [ln(k – 1), ` \oo `).
Why is there no switching in the inequality sign?
     The slope of the graph of  the natural logarithm is always positive (albeit getting less steep for increasing  x).  So applying  ‘ln’  on both sides does not change the inequality.

What is the clue again?
     We are told that  Rfg = [ln 3, ` \oo `).  Aha!  *epiphany*  *light bulbs flashing*
ln(k – 1) must be equal to ln 3!!!  This can be solved easily!


figure 1 – working forward and backwards

Stage 4:  Evaluation

Is the answer correct?
     Substituting  k = 4,  we see that    ln(x + k + 1) =  ln(x + 5)  and with  x > -2,  this will be  > ln 3  as given in the clue.

And why  x > -2?
     This is because g(x) > -2, which we knew  from completing the square.  We treat the  ‘g(x)’  as the  ‘x’  when applying  f,  because this is what  fg(x)  really means.



Stage 5:  Reflection

What did we learn from solving this question?
     We used metacognition to do self-monitor and self-questioning during the 5 stage problem-solving process.
     We used the following heuristics.
· Working forwards (considering the meanings, asking “so what?” “what next?”)
· Setting up equation/inequality
· Working/thinking backwards
· Consider equivalent expressions or rephrasing the problem
     We learned to apply the definition of the range of fg.  There are two possible methods: the one-stage method and the two-stage method.  The latter is usually better.
     In the two-stage method, the range of  fg  is found by first finding the range of  g  and then applying the function  f  to it.  After the first step of finding the inequality for  g(x),  we can simply use  x  in the formula for  f.  How?  We set  x  to be in the range of  g(x) from the previous step,  then slowly manipulate the inequality until the expression for  f(x)  appears.  This will give us the range of  fg.
     From the formula for the range of  fg,  we learned how to make use of the given clue to work backwards to find the unknown k.
     Difficult questions can be tackled by thinking systematically and logically, and using heuristics and metacognition.  Mathematics is hard, but it is fun after you have learned it.  If you have really learned it, you become more powerful because you can use the same technique to solve all kinds of problems in future.

Any of your own reflections?  Please post in the comments below.