Download COUNTING - Wildstrom Home Page

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Addition wikipedia , lookup

Location arithmetic wikipedia , lookup

Elementary mathematics wikipedia , lookup

Transcript
Counting Techniques and Some
Other Math Team Strategies
Susan Schwartz Wildstrom
Walt Whitman High School
Bethesda, MD
NCTM National Meeting
April 6, 2001
Orlando, FL
COUNTING
Review of familiar ideas
If we have n distinct objects and we want to
put them in some sort of ordered set
(arrangement) we use permutations,
denoted n Pn or P  n, n  and equal to
n! n  n 1 n  2 n  3 ...2 1
If we have n distinct objects and we want to
order some subset (r) of them, we again
want permutations, but this time we want to
use just part of the set and denote this n Pr
or P  n, r  which equals
n!
 n  n  1 n  2  ...  n   r  1 
 n  r  1!
Notice that you have r factors in this
expansion.
HARDER THINGS TO COUNT
Suppose that we still have n objects in our
set but that some of them are
indistinguishable from one another (an
example of this would be the set of letters in
the word “googol”). Suppose that we are
interested in using all of the letters for each
arrangement but we want to know how
many distinguishably different
arrangements there can be.
Here we want to use permutations again but
we want to divide out those permutations
which are not distinguishable from one
another by virtue of their containing some of
the repeated objects in different locations.
Suppose there are p of one object, q of
another, etc. Our calculation can be done as
n!
p !q !
Suppose we have m identical objects to place in n (n<m)
“boxes. If each box must contain at least one object, the
task is like placing n-1 partitions in the m-1 spaces between
the individual objects.
 m  1


n

1


But, if it is acceptable for one or more of the boxes to be
empty, the task is a bit more difficult. We can find the
number of possibilities here by using the m objects and n
additional “virtual” objects, ie, m+n objects. We then place
n-1 partitions in the m+n-1 spaces between the objects,
“remove” the one virtual object from each box and have the
desired arrangement. Computationally then, this is
 m  n  1
 n 1 


Paths on a grid
Suppose we want to compute the number of
paths there are from point A to point B
travelling only along grid lines and through
lattice points, each step moving us closer to
B. And suppose, further that B is a point
that is to the right and above A on a grid.
(For simplicity, let’s place A at the origin
(0,0).)
If B(m,n), then the task consists of a total of
m+n steps each of which is either a move to
the right or a move up. So, counting the
number of paths that can be found consists of
counting the number of ways that m moves
to the right can be taken in a sequence of
m+n total moves (not coincidentally, this is
the same number that we get if we count the
number of ways that n moves upward can be
taken in m+n moves.)
So to find the number of possible paths, we
need only compute the number of ways to
choose m from m+n, ie,  m  n 
 m 


Now, what if we want to insure that we pass
through some specific point C (between A
and B) on our way? Just find the product of
the number of paths from A to C and the
number of paths from C to B.
Derangements
If we have n numbered objects and n
numbered positions for these objects, there
is exactly one (and only one) way for each
object to go into its correct position. There
are a lot of ways for some of the objects to
be correctly placed and some others to be
out of place. But a more interesting question
now is, how many ways are there for all of
the objects to be in the wrong position?
This problem is much more difficult than it
looks at first glance. There are two
reasonable ways to analyze this situation-count them directly or count them by
developing a recursive pattern.
Let’s do a few of the early derangements
directly and learn a bit about inclusionexclusion at the same time.
n
1
2
3
4
5
6
7
D(n)
0
1
2
For n=2, we have 12 or
21. Only one of these is
a derangement.
For n=3, we have:
123
132
213
231
312
321
Of these 231 and 312 are
derangements.
n
1
2
3
4
5
6
7
D(n)
0
1
2
9
Let’s list the permutations for 4:
1234 2134 3124 4123
1243 2143 3142 4132
1324 2314 3214 4213
1342 2341 3241 4231
1423 2413 3412 4312
1432 2431 3421 4321
How many of these are
derangements? This is getting
pretty hard to count by hand.
It’s time to organize our thoughts in a more
efficient way. (Let’s look at n=4 again)
1. There are 4! = 24 orderings.
2. There are 6 with a 1 in position 1, 6 with a 2 in
position 2, 6 with a 3 in position 3, and 6 with a 4
in position 4. Subtract these from the total number
of orderings. (24-24)
3. But now we have subtracted too many since, for
example, 1243 has both a 1 in position 1 and a 2 in
position 2. So now we need to add back in the ones
that have two numbers in the right positions
because we subtracted them out twice.
There are 6 pairings of digits that could have
both been in the correct place (12, 13, 14,
23, 24, 34) and each such pairing occurs in 2
numbers (eg, 1234 and 1243) so add back in
62
4. But now we’ve added some of them back
in extra times, namely those with three
numbers in the right positions (there are 4
such sets, each occurring 1 time). To undo
this, we subtract out 4 1 .
5. Then, lastly, add back in the one we have
subtracted out too often, the one that has all
four in the right position.
So what we have constructed now looks like
this:
4! 4  6  6  2  4 1  1  9
Analyze 5 this way:
Total number of possible arrangements
- arrangements with 1 correct
+ arrangements with 2 correct
- arrangements with 3 correct
+ arrangements with 4 correct
- arrangements with 5 correct
 5
5
 5
5
 5
5!    4!    3!    2!   1!    0!
1 
 2
 3
 4
 5
 120  120  60  20  5  1  44
Notice that the first factors of each term
after the first are binomial coefficients for n,
and the second factors of each are the
permutations of the remaining quantity of
numbers. Notice that we alternately subtract
and add (inclusion-exclusion) to counteract
the excesses of the previous counting
operation.
You try 6 on your own and see whether you
can come up with the right value, which is
265.
n
1
2
3
4
5
6
7
D(n)
0
1
2
9
44
265
Notice how quickly the
numbers get large. Also,
notice that there doesn’t
seem to be an obvious
pattern. But we can find a
recursive pattern. Do you
see one?
D  n   n  D  n  1   1
n
Finding the values of trig functions
for angles of 15 and 75 
Sometimes we need to use the trig function values
for the semi-special angles of 15 and 75  (/12
and 5/12).
If you really know your trig formulas you can
derive them using sum and difference or halfangle formulas.
Now we are going to look at a diagram that you
can draw anytime you need them that will show
them all to you at once.
45
30
45
1
60
45
45
Label all of the
missing sides and
angles of this rectangle
based on what you
know about the
45-45-90 and
30-60-90 right triangle
patterns, and you get
all the extra
information about 15
and 75  as well.
6
2
45
90
30
6
2
15
3
45
2
6 2
2
90
90
75
6 2
2
1
45
45
90
60
2
2
2
2
And lastly, there is this old standby, (No
calculators, of course.) a problem in which
finding the final answer requires an
intermediate evaluation step like
simplifying
114  36 10
Whenever we see something like this in a
math competition we are pretty sure that it
will simplify, but how?
We can “experiment” but most of the time
that will be too far-ranging, time-consuming
and unproductive, so let’s develop a strategy
that will solve the problem directly.
Suppose that 114  36 10  a  b
(And in this case, it’s a  b since the
value inside the surd is a difference.)
114  36 10  a  b
114  36 10  a 2  2ab  b 2
Regardless of whether a and b are rational or
irrational a 2  b 2 will be rational. So,
a 2  b 2  114
2ab  36 10  ab  18 10
Solve the system: Use
18 10
a
b
3240 2
 b  114
2
b
4
2
3240  b  114b
b 4  114b 2  3240   b 2  60  b 2  54   0
 b 2  60 or 54 and a 2  54 or 60
Since
114  36 10  a  b  0
we want a  b
So,
114  36 10  60  54  2 15  3 6