Showing posts with label swapping. Show all posts
Showing posts with label swapping. Show all posts

Saturday, January 9, 2016

[OlymLSec_20160109CBDR] Derangement of Cars in a Roundabout

Problem / Question

Introduction
     Some enthusiastic student posted this “deranged” question on Facebook.  It is taken from the Singapore Math Kangaroo Contest.  The question involves derangements, which does not appear in any syllabus in Singapore before university level.
     If the problem involved a circular permutation, the correct answer would have been  (5 – 1)! = 4 × 3 × 2 × 1 = 24.  But this is not a circular permutation, because the roads are distinguished by their different positions.  If one rotates the roundabout, this would be considered a different pattern.  If it were a permutation, the answer would have been  5! = 5 × 4 × 3 × 2 × 1 = 120.  However, it is not a permutation, because the cars cannot go back to their original road in the opposite direction.  That is what the Kangaroo phrase “drives less than one round” mean.
     A derangement is a some rearrangement in which things are not allowed to go back to their original position.  If one has not learned the formula for derangements, how could this be solved?

Strategy
     We can consider simpler cases [H10] of the problem and build up the answer from there.  We may also split the problem into two cases.  [H11]


Solution

     Let  !n  denote the number of derangements if there are  n  cars and  n  road branches in the roundabout.  [This is called the subfactorial of  n.]

     For  n = 1,  !n = 0  because the car has no way but to go back on the original road.

     For  n = 2,  !n = 1  because the only way is for the two cars to swap.

     For  n = 3:  Car  #1  has two choices: either road  #2  or road  #3.  But it cannot end up swapping roads with any car, else the remaining car would have to go back to its original road, which is not allowed.  So it is either  #1 ® #2 ® #3 ® #1  or  #1 ® #3 ® #2 ® #1.  Therefore  !3 = 2.

     For  n = 4:  Car  #1  has 3 choices.  For each of these choices, either it ends up (1) swapping roads with the other car, or  (2) it does not swap.  
Case (1):  If it swaps with the other car, then the remaining  2  cars will have  !2 = 1 way.
Case (2):  If car  #1  goes to some road but not swapping roads with it,  then the other  3  cars will have  !3 = 2  ways to choose roads different from their original roads.
Therefore  !4 = 3 × (!3 + !2) = 3 × (2 + 1) = 9.

     For  n = 5:  Car  #1  has 4 choices.
Case (1):  It swaps with the other car.  The remaining  3  cars will have  !3 = 2 ways.
Case (2):  It does not swap with any car.  The other  4  cars will have  !4 = 9  ways.
Therefore  !5 = 4 × (!4 + !3) = 4 × (9 + 2) = 44.

Ans:  (B)  44.

Remarks
     For more information regarding derangements, please refer to here and here.

H02. Use a diagram / model   (can be used for small number cases)
H03. Make a systematic list   (can be used for small number cases)
H04. Look for pattern(s)
H05. Work backwards
H09. Restate the problem in another way
H10. Simplify the problem
H11. Solve part of the problem

Suitable Levels
* Lower Secondary Mathematics Competition
* University / College Combinatorics
* other syllabuses that involve derangements
* any precocious or interested learner who is interested






Tuesday, May 5, 2015

[S2_20150501AXC] 2011: Chunking and Substitution with Algebra

Question

Introduction
     This lower secondary algebra question seems complicated, doesn’t it?  Can you spot any chunk that is repeated, or almost the same?  This is one of the keys to solving the problem.  Another key that you need is the relevant algebraic identities and tricks.

Reminders
     First, let us review some of these useful formulas.                                        
     Looking back at the question, do you notice anything that is repeated?  Can you see any chunks that are the same or almost the same?  (n – 2011)  is almost the same as  (2012 – n)  isn’t it?  Whenever you see a repeated chunk, it is a good idea to substitute that chunk with another variable that you invent.  To name this new variable, you can use any letter that is not used before, so as not to conflict with existing letter(s).

Solution

Summary
     To solve the given problem, we have used the following:-
     (1)  square-of-difference identity
     (2)  swapping technique
     (3)  observation of repeated chunks
     (4)  using substitution with the chunks

H04. Look for pattern(s)  e.g. chunking, observation
H09. Restate the problem in another way  e.g. swapping, identities
H10. Simplify the problem e.g. substitution for chunks
H11. Solve part of the problem
H12* Think of a related problem
H13* Use Equation / write a Mathematical Sentence

Suitable Levels
· Lower Secondary Mathematics
· other syllabuses that involve whole numbers and ratios


[S2 Expository] Negation and Swapping a difference

Introduction

     In this article, I introduce a neat and very useful trick for algebra and arithmetic.  Let us say you want to buy something that costs  $5,  but you only have  $2.  You need to borrow from your friend to help pay for it.  How much do you owe?  $3  Obviously.  Using negative numbers to denote debts, we can write out the story as  2 – 5 = -(5 – 2) = -3.  It is a ‘-’ because you know you are owing something.  To calculate the amount you owe, you just swap the  2  and the  5.
     In other words, you are instinctively using the following identity without realising it.                                             

This algebraic identity (something that is always true, not just sometimes true) actually works for all types numbers that the student will encounter, including positive and negative numbers.  It basically says that swapping a difference is the same as negating it. 
     How do we know it is always true?  This is easily shown:-
                      RHS = -(b – a) = -b + a = a + (-b) = a – b = LHS
The equality relationship is symmetrical.  Since  RHS = LHS,  we have  LHS = RHS.  Equations work both ways.

How to use it?
     (1) You can use it for calculations involving positive and negative numbers, as above.
     (2) Whenever you see difference e.g.  pet – cat,  you can swap the quantities, put brackets around it and attach a negative sign in front to get  -(cat – pet).  Remember that equations work both ways.  You can use it in the other direction.  Hence
     (3) Whenever you see a negated difference e.g.  -(train – van),  you can imagine that the negative sign causes the two quanties to swap.  After swapping, the ‘-’  is used up and you end up with  van – train.
     May the swapping power be with you!


Suitable Levels
* Lower Secondary Mathematics
* other syllabuses that involve algebra and negative numbers