Sunday, 10 July 2016

PERMUTATION COMBINATION




What's the Difference?

In English we use the word "combination" loosely, without thinking if the order of things is important. In other words:
"My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.
"The combination to the safe is 472". Now we do care about the order. "724" won't work, nor will "247". It has to be exactly 4-7-2.
So, in Mathematics we use more accurate language:
If the order doesn't matter, it is a Combination.
If the order does matter it is a Permutation.

So, we should really call this a "Permutation Lock"!
In other words:
A Permutation is an ordered Combination.

To help you to remember, think "Permutation ... Position"

Permutations

There are basically two types of permutation:
  1. Repetition is Allowed: such as the lock above. It could be "333".
  2. No Repetition: for example the first three people in a running race. You can't be first and second.

1. Permutations with Repetition

These are the easiest to calculate.
When we have n things to choose from ... we have n choices each time!
When choosing r of them, the permutations are:
n × n × ... (r times)
(In other words, there are n possibilities for the first choice, THEN there are npossibilites for the second choice, and so on, multplying each time.)
Which is easier to write down using an exponent of r:
n × n × ... (r times) = nr
Example: in the lock above, there are 10 numbers to choose from (0,1,...9) and we choose 3 of them:
10 × 10 × ... (3 times) = 103 = 1,000 permutations
So, the formula is simply:
nr
where n is the number of things to choose from, and we choose r of them
(Repetition allowed, order matters)

2. Permutations without Repetition

In this case, we have to reduce the number of available choices each time.
For example, what order could 16 pool balls be in?
After choosing, say, number "14" we can't choose it again.
So, our first choice has 16 possibilites, and our next choice has 15 possibilities, then 14, 13, etc. And the total permutations are:
16 × 15 × 14 × 13 × ... = 20,922,789,888,000
But maybe we don't want to choose them all, just 3 of them, so that is only:
16 × 15 × 14 = 3,360
In other words, there are 3,360 different ways that 3 pool balls could be arranged out of 16 balls.
Without repetition our choices get reduced each time.
But how do we write that mathematically? Answer: we use the "factorial function"
The factorial function (symbol: !) just means to multiply a series of descending natural numbers. Examples:
  • 4! = 4 × 3 × 2 × 1 = 24
  • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
  • 1! = 1
Note: it is generally agreed that 0! = 1. It may seem funny that multiplying no numbers together gets us 1, but it helps simplify a lot of equations.
So, when we want to select all of the billiard balls the permutations are:
16! = 20,922,789,888,000
But when we want to select just 3 we don't want to multiply after 14. How do we do that? There is a neat trick ... we divide by 13! ...
16 × 15 × 14 × 13 × 12 ...
= 16 × 15 × 14 = 3,360
13 × 12 ...
Do you see? 16! / 13! = 16 × 15 × 14
The formula is written:
where n is the number of things to choose from, and we choose r of them
(No repetition, order matters)

Examples:

Our "order of 3 out of 16 pool balls example" is:
16! = 16! = 20,922,789,888,000 = 3,360
(16-3)!13!6,227,020,800
(which is just the same as: 16 × 15 × 14 = 3,360)
How many ways can first and second place be awarded to 10 people?
10! = 10! = 3,628,800 = 90
(10-2)!8!40,320
(which is just the same as: 10 × 9 = 90)

Notation

Instead of writing the whole formula, people use different notations such as these:
Example: P(10,2) = 90

Combinations

There are also two types of combinations (remember the order does not matter now):
  1. Repetition is Allowed: such as coins in your pocket (5,5,5,10,10)
  2. No Repetition: such as lottery numbers (2,14,15,27,30,33)

1. Combinations with Repetition

Actually, these are the hardest to explain, so we will come back to this later.

2. Combinations without Repetition

This is how lotteries work. The numbers are drawn one at a time, and if we have the lucky numbers (no matter what order) we win!
The easiest way to explain it is to:
  • assume that the order does matter (ie permutations),
  • then alter it so the order does not matter.
Going back to our pool ball example, let's say we just want to know which 3 pool balls are chosen, not the order.
We already know that 3 out of 16 gave us 3,360 permutations.
But many of those are the same to us now, because we don't care what order!
For example, let us say balls 1, 2 and 3 are chosen. These are the possibilites:
Order does matterOrder doesn't matter
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
1 2 3
So, the permutations will have 6 times as many possibilites.
In fact there is an easy way to work out how many ways "1 2 3" could be placed in order, and we have already talked about it. The answer is:
3! = 3 × 2 × 1 = 6
(Another example: 4 things can be placed in 4! = 4 × 3 × 2 × 1 = 24 different ways, try it for yourself!)
So we adjust our permutations formula to reduce it by how many ways the objects could be in order (because we aren't interested in their order any more):
That formula is so important it is often just written in big parentheses like this:
where n is the number of things to choose from, and we choose r of them
(No repetition, order doesn't matter)
It is often called "n choose r" (such as "16 choose 3")
And is also known as the Binomial Coefficient.

Notation

As well as the "big parentheses", people also use these notations:

Just remember the formula:
n!
r!(n−r)!

Example

So, our pool ball example (now without order) is:
16! = 16! = 20,922,789,888,000 = 560
3!(16-3)!3!×13!6×6,227,020,800
Or we could do it this way:
16×15×14 = 3360 = 560
3×2×16


It is interesting to also note how this formula is nice and symmetrical:
In other words choosing 3 balls out of 16, or choosing 13 balls out of 16 have the same number of combinations.
16! = 16! = 16! = 560
3!(16-3)!13!(16-13)!3!×13!

Pascal's Triangle

We can also use Pascal's Triangle to find the values. Go down to row "n" (the top row is 0), and then along "r" places and the value there is our answer. Here is an extract showing row 16:
1    14    91    364  ...

1    15    105   455   1365  ...

1    16   120   560   1820  4368  ...

1. Combinations with Repetition

OK, now we can tackle this one ...
Let us say there are five flavors of icecream: banana, chocolate, lemon, strawberry and vanilla.
We can have three scoops. How many variations will there be?
Let's use letters for the flavors: {b, c, l, s, v}. Example selections include
  • {c, c, c} (3 scoops of chocolate)
  • {b, l, v} (one each of banana, lemon and vanilla)
  • {b, v, v} (one of banana, two of vanilla)
(And just to be clear: There are n=5 things to choose from, and we choose r=3 of them.
Order does not matter, and we can repeat!)
Now, I can't describe directly to you how to calculate this, but I can show you aspecial technique that lets you work it out.
Think about the ice cream being in boxes, we could say "move past the first box, then take 3 scoops, then move along 3 more boxes to the end" and we will have 3 scoops of chocolate!
So it is like we are ordering a robot to get our ice cream, but it doesn't change anything, we still get what we want.
We can write this down as  (arrow means move, circle meansscoop).
In fact the three examples above can be written like this:
{c, c, c} (3 scoops of chocolate):
{b, l, v} (one each of banana, lemon and vanilla):
{b, v, v} (one of banana, two of vanilla):
OK, so instead of worrying about different flavors, we have a simpler question: "how many different ways can we arrange arrows and circles?"
Notice that there are always 3 circles (3 scoops of ice cream) and 4 arrows (we need to move 4 times to go from the 1st to 5th container).
So (being general here) there are r + (n−1) positions, and we want to choose r of them to have circles.
This is like saying "we have r + (n−1) pool balls and want to choose r of them". In other words it is now like the pool balls question, but with slightly changed numbers. And we can write it like this (note: r+(n−1) is the same as n+r−1):
where n is the number of things to choose from, and we choose r of them
(Repetition allowed, order doesn't matter)
Interestingly, we can look at the arrows instead of the circles, and say "we have r + (n−1) positions and want to choose (n−1) of them to have arrows", and the answer is the same:
So, what about our example, what is the answer?
(5+3−1)! = 7! = 5040 = 35
3!(5−1)!3!×4!6×24



References:

PROBABILITY



How likely something is to happen.
Many events can't be predicted with total certainty. The best we can say is how likely they are to happen, using the idea of probability.
 

Tossing a Coin 

When a coin is tossed, there are two possible outcomes:
  • heads (H) or
  • tails (T)
We say that the probability of the coin landing H is ½.
And the probability of the coin landing T is ½.
pair of dice 

Throwing Dice 

When a single die is thrown, there are six possible outcomes:1, 2, 3, 4, 5, 6.
The probability of any one of them is 1/6.

Probability 

In general:
Probability of an event happening = Number of ways it can happenTotal number of outcomes

Example: the chances of rolling a "4" with a die

Number of ways it can happen: 1 (there is only 1 face with a "4" on it)
Total number of outcomes: 6 (there are 6 faces altogether)
So the probability = 16

Example: there are 5 marbles in a bag: 4 are blue, and 1 is red. What is the probability that a blue marble gets picked?

Number of ways it can happen: 4 (there are 4 blues)
Total number of outcomes: 5 (there are 5 marbles in total)
So the probability = 45 = 0.8

Probability Line

We can show probability on a Probability Line:
Probability is always between 0 and 1

Probability is Just a Guide

Probability does not tell us exactly what will happen, it is just a guide

Example: toss a coin 100 times, how many Heads will come up?

Probability says that heads have a ½ chance, so we can expect 50 Heads.
But when we actually try it we might get 48 heads, or 55 heads ... or anything really, but in most cases it will be a number near 50.

References:

MEASURES OF DISPERSION




DEFINITION

A measures of dispersion is a method of measuring the degree by which numerical data or value tend to spread from or cluster about control point of average.

The common measures of dispersion are the following:
  1. RANGE
  2. MEAN ABSOLUTE DEVIATION
  3. VIARANCE
  4. STANDARD DEVIATION


1.  Range:  The simplest of our methods for measuring dispersion is range.  Range is the difference between the largest value and the smallest value in the data set.  While being simple to compute, the range is often unreliable as a measure of dispersion since it is based on only two values in the set. 


A range of 50 tells us very little about how the values are dispersed.
Are the values all clustered to one end with the low value (12) or the high value (62) being an outlier?
Or are the values more evenly dispersed among the range?



Before discussing our next methods, let's establish some vocabulary:
Population form:Sample form:
The population form is used when the data being analyzed includes the entire set of possible data.  When using this form, divide by n, the number of values in the data set.


All people living in the US.
The sample form is used when the data is a random sample taken from the entire set of data.  When using this form, divide by n - 1.
(It can be shown that dividing by - 1 makes S2 for the sample, a better estimate of for the population from which the sample was taken.)


Sam, Pete and Claire who live in the US.
The population form should be used unless you know a random sample is being analyzed.

2.  Mean Absolute Deviation (MAD):
The mean absolute deviation is the mean (average) of the absolute value of the difference between the individual values in the data set and the mean.  The method tries to measure the average distances between the values in the data set and the mean.
 

3.  Variance:  To find the variance:
     • subtract the mean,  , from each of the values in the data set,  .


     • square the result
     • add all of these squares
     • and divide by the number of values in the data set.



4.  Standard Deviation:  Standard deviation is the square root of the variance.  The formulas are:



Mean absolute deviation, variance and standard deviation are ways to describe the difference between the mean and the values in the data set without worrying about the signs of these differences.
These values are usually computed using a calculator.

Examples:

1.  
Find, to the nearest tenth, the standard deviation and variance of the distribution:


Score100200300400500
Frequency1521192417


Solution:  For more detailed information on using the graphing calculator, follow the links provided above.
Grab your graphing calculator.



Enter the data and frequencies
in lists.

Choose 1-Var Stats and
enter as grouped data.

Population standard deviation
is 134.0

Population varianceis 17069.7



2. Find, to the nearest tenth, the mean absolute deviation for the set

     {2, 5, 7, 9, 1, 3, 4, 2, 6, 7, 11, 5, 8, 2, 4}.



Enter the data in list.

Be sure to have the calculator
first determine the mean.




Mean absolute deviationis 2.3
For more detailed information on using the graphing calculator, follow the links provided above.


References:

SET & VENN DIAGRAM


Sets and Venn Diagrams

Sets

A set is a collection of things.
For example, the items you wear is a set: these would include shoes, socks, hat, shirt, pants, and so on.
You write sets inside curly brackets like this:
{socks, shoes, pants, watches, shirts, ...}
You can also have sets of numbers:
  • Set of whole numbers: {0, 1, 2, 3, ...}
  • Set of prime numbers: {2, 3, 5, 7, 11, 13, 17, ...}

Ten Best Friends

You could have a set made up of your ten best friends:
  • {alex, blair, casey, drew, erin, francis, glen, hunter, ira, jade}
Each friend is an "element" (or "member") of the set (it is normal to use lowercase letters for them.)


Now let's say that alex, casey, drew and hunter play Soccer:
Soccer = {alex, casey, drew, hunter}
(The Set "Soccer" is made up of the elements alex, casey, drew and hunter).

And casey, drew and jade play Tennis:
Tennis = {casey, drew, jade}
You could put their names in two separate circles:

Union

You can now list your friends that play Soccer OR Tennis.
This is called a "Union" of sets and has the special symbol :
Soccer  Tennis = {alex, casey, drew, hunter, jade}
Not everyone is in that set ... only your friends that play Soccer or Tennis (or both).
We can also put it in a "Venn Diagram":

Venn Diagram: Union of 2 Sets
A Venn Diagram is clever because it shows lots of information:
  • Do you see that alex, casey, drew and hunter are in the "Soccer" set?
  • And that casey, drew and jade are in the "Tennis" set?
  • And here is the clever thing: casey and drew are in BOTH sets!

Intersection

"Intersection" is when you have to be in BOTH sets.
In our case that means they play both Soccer AND Tennis ... which is casey and drew.
The special symbol for Intersection is an upside down "U" like this: 
And this is how we write it down:
Soccer  Tennis = {casey, drew}
In a Venn Diagram:

Venn Diagram: Intersection of 2 Sets

Difference

You can also "subtract" one set from another.
For example, taking Soccer and subtracting Tennis means people that play Soccer but NOT Tennis ... which is alex and hunter.
And this is how we write it down:
Soccer  Tennis = {alex, hunter}
In a Venn Diagram:

Venn Diagram: Difference of 2 Sets

Summary So Far

  •  is Union: is in either set
  •  is Intersection: must be in both sets
  •  is Difference: in one set but not the other

Three Sets

You can also use Venn Diagrams for 3 sets.
Let us say the third set is "Volleyball", which drew, glen and jade play:
Volleyball = {drew, glen, jade}
But let's be more "mathematical" and use a Capital Letter for each set:
  • S means the set of Soccer players
  • T means the set of Tennis players
  • V means the set of Volleyball players
The Venn Diagram is now like this:
Union of 3 Sets: S  T  V
You can see (for example) that:
  • drew plays Soccer, Tennis and Volleyball
  • jade plays Tennis and Volleyball
  • alex and hunter play Soccer, but don't play Tennis or Volleyball
  • no-one plays only Tennis
We can now have some fun with Unions and Intersections ...

This is just the set S
S = {alex, casey, drew, hunter}


This is the Union of Sets T and V
 V = {casey, drew, jade, glen}


This is the Intersection of Sets S and V
 V = {drew}
And how about this ...
  • take the previous set S  V
  • then subtract T:

This is the Intersection of Sets S and V minus Set T
(S  V)  T = {}
Hey, there is nothing there!
That is OK, it is just the "Empty Set". It is still a set, so we use the curly brackets with nothing inside: {}
The Empty Set has no elements: {}

Universal Set

The Universal Set is the set that contains everything. Well, not exactlyeverything. Everything that we are interested in now.
Sadly, the symbol is the letter "U" ... which is easy to confuse with the  for Union. You just have to be careful, OK?
In our case the Universal Set is our Ten Best Friends.
U = {alex, blair, casey, drew, erin, francis, glen, hunter, ira, jade}
We can show the Universal Set in a Venn Diagram by putting a box around the whole thing:
Now you can see ALL your ten best friends, neatly sorted into what sport they play (or not!).
And then we can do interesting things like take the whole set and subtract the ones who play Soccer:
We write it this way:
 S = {blair, erin, francis, glen, ira, jade}
Which says "The Universal Set minus the Soccer Set is the Set {blair, erin, francis, glen, ira, jade}"
In other words "everyone who does not play Soccer".

Complement

And there is a special way of saying "everything that is not", and it is called "complement".
We show it by writing a little "C" like this:
Sc
Which means "everything that is NOT in S", like this:
Sc = {blair, erin, francis, glen, ira, jade}
(just like the U − C example from above)

Summary

  1.  is Union: is in either set
  2.  is Intersection: must be in both sets
  3.  is Difference: in one set but not the other
  4. Ac is the Complement of A: everything that is not in A
  5. Empty Set: the set with no elements. Shown by {}
  6. Universal Set: all things we are interested in


References: