31
FACTORIALS, PERMUTATIONS AND COMBINATIONS USING EXCEL B. Heard (Not to be posted, used, etc. without my permission, students may download one copy for personal use)

Factorials permutations and_combinations_using_excel

Embed Size (px)

DESCRIPTION

Help with factorials, combinations and permutations

Citation preview

Page 1: Factorials permutations and_combinations_using_excel

FACTORIALS, PERMUTATIONS

AND COMBINATIONS

USING EXCELB. Heard

(Not to be posted, used, etc. without my permission, students may download one

copy for personal use)

Page 2: Factorials permutations and_combinations_using_excel

FACTORIALS, PERMUTATIONS & COMBINATIONS In any statistics class, you will come

across factorials, permutations and combinationsYou can use Minitab, your calculator, etc. for

these types of calculations I am going to show you how to use Excel

(because it is usually something everyone has on their computer)

Page 3: Factorials permutations and_combinations_using_excel

FACTORIALS

Factorials

Page 4: Factorials permutations and_combinations_using_excel

FACTORIALSThe factorial symbol “!” (an exclamation point) simply means the product of decreasing positive whole numbers.

For example, 4! = 4x3x2x1 = 24

Always remember that 0! = 1.

Page 5: Factorials permutations and_combinations_using_excel

FACTORIALS A little practice

5! = 5x4x3x2x1 = 1203! + 4! = (3x2x1) + (4x3x2x1) = 6 + 24 =

30 (7-3)! = 4! = 4x3x2x1 = 247! – 3! = 7x6x5x4x3x2x1 – 3x2x1 = 5040 –

6 = 50344!/0! = (4x3x2x1)/1 = 245(0!) = 5(1) = 5

Page 6: Factorials permutations and_combinations_using_excel

FACTORIALS You can easily do these in Excel by using

“=FACT(#)” (not including the quotation marks and putting the number in for the # sign)

In other words, pick a blank cell in Excel and type

=FACT(7)And hit the enter keyYou will see your result of 5040 which is 7!

Page 7: Factorials permutations and_combinations_using_excel

FACTORIALS

Hit Enter and you get 5040

Page 8: Factorials permutations and_combinations_using_excel

FACTORIALS What about a big number? Enter “=FACT(25)” and you will get

This is so large that exponential notation has to be used1.55112E+25 in Excel just means 1.55112x

1025 or15511200000000000000000000.0I moved the decimal 25 places to the right

Page 9: Factorials permutations and_combinations_using_excel

PERMUTATIONS

Permutations

Page 10: Factorials permutations and_combinations_using_excel

PERMUTATIONS

(n - r)!n rP = n!

If the preceding requirements are satisfied, the number of permutations (or sequences) of r items selected from n available items (without replacement) is

Permutation Requirements:

1. There are n different items available. (This rule does not apply if some of the items are identical to others.)

2. We select r of the n items (without replacement).

3. We consider rearrangements of the same items to be different sequences. (The permutation of ABC is different from CBA and is counted separately.) This just means “order matters” – I will give you examples

Page 11: Factorials permutations and_combinations_using_excel

PERMUTATIONS There are 10 finalists in a local radio

station’s contest. From the 10 finalists, 3 winners will be selected to win one of three prizes. The prizes are $10,000 , dinner for two at a local restaurant and a t-shirt from the radio station.

How many ways can the 3 winners be selected from the 10 finalists?

Page 12: Factorials permutations and_combinations_using_excel

PERMUTATIONS First ask yourself, “Does order matter?”

Yes, had you rather have $10,000 or the t-shirt? (the prizes are distinct)

So this is a permutation

(10 - 3)!10 3

P= 10!

Let’s use Excel!

Page 13: Factorials permutations and_combinations_using_excel

PERMUTATIONS You can easily do these in Excel by using

“=PERMUT(n,p)” (not including the quotation marks and putting the number in for n and p and don’t forget the comma in between)

In other words, pick a blank cell in Excel and type

=PERMUT(10,3)And hit the enter keyYou will see your result of 720

Page 14: Factorials permutations and_combinations_using_excel

PERMUTATIONS

Type =PERMUT(10,3) and hit Enter you get

720

Page 15: Factorials permutations and_combinations_using_excel

PERMUTATIONS Another Example There are 12 students in a classroom

and a committee of 4 is to be chosen. The committee has a President, VP, Secretary and Treasurer

How many ways can the 4 be selected from the 12 students?

Page 16: Factorials permutations and_combinations_using_excel

PERMUTATIONS First ask yourself, “Does order matter?”

Yes, there are distinct positions.So this is a permutation

(12 - 4)!12 4

P= 12!

Just use Excel!

Page 17: Factorials permutations and_combinations_using_excel

PERMUTATIONS Pick a blank cell in Excel and type

=PERMUT(12,4)And hit the enter keyYou will see your result of 11880

Page 18: Factorials permutations and_combinations_using_excel

COMBINATIONS

Combinations

Page 19: Factorials permutations and_combinations_using_excel

COMBINATIONS

(n - r )! r!n!

nCr =

If the preceding requirements are satisfied, the number of combinations of r items selected from n different items is

Combination Requirements:

1. There are n different items available.

2. We select r of the n items (without replacement).

3. We consider rearrangements of the same items to be the same. (The combination of ABC is the same as CBA.) This is saying “order does not matter.”

Page 20: Factorials permutations and_combinations_using_excel

COMBINATIONS There are 10 finalists in a local radio

station’s contest. From the 10 finalists, 3 winners will be selected to win $1,000.

How many ways can the 3 winners be selected from the 10 finalists?

Page 21: Factorials permutations and_combinations_using_excel

COMBINATIONS First ask yourself, “Does order matter?”

No, all three get the same prize.So this is a combination.

(10 - 3 )! 3!

10!10C3 =

Let’s use Excel!

Page 22: Factorials permutations and_combinations_using_excel

COMBINATIONS You can easily do these in Excel by using

“=COMBIN(n,p)” (not including the quotation marks and putting the number in for n and p and don’t forget the comma in between)

In other words, pick a blank cell in Excel and type

=COMBIN(10,3)And hit the enter keyYou will see your result of 120Note that the number of combinations is less

than permutations because we don’t have to consider order

Page 23: Factorials permutations and_combinations_using_excel

COMBINATIONS Another Example There are 12 students in a classroom

and a committee of 4 is to be chosen. How many ways can the 4 be selected

from the 12 students?

Page 24: Factorials permutations and_combinations_using_excel

COMBINATIONS First ask yourself, “Does order matter?”

No, there are no distinct positions mentioned, only a committee of 4.

So this is a combination of 12C4 . Just use “=COMBIN(12,4)” in an Excel cell

and hit the Enter key to get your answer of 495

Page 25: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF What about those funky questions about

how many distinct words or orderings you can make with the letters in the word “Colorado” or “Mississippi” etc.?

These are “distinct permutation” problems and can be easily explained with examples.

In these problems you generally have some duplicates you have to deal with.

Page 26: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF

n1! . n2! .. . . . . . . nk!

n!

If the preceding requirements are satisfied, and if there are n1 alike, n2 alike, . . . nk alike, the number of permutations (or sequences) of all items selected without replacement is

Permutations with we have identical items Summary:

1. There are n items available, and some items are identical to others.

2. We select all of the n items (without replacement).

3. We consider rearrangements of distinct items to be different sequences.

Page 27: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF How many different orderings can be made

from the letters in the word “book?” Ask yourself, how many total letters are

there? Then ask yourself, how many of each different

letter?

4 total letters1 “b”2 “o’s”1 “k”

4!1!x2!x1!

4x3x2x11x2x1x1

=12 (answer)

=

Page 28: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF How many different orderings can be made

from the letters in the word “Mississippi?” Ask yourself, how many total letters are

there? Then ask yourself, how many of each different

letter?There are 11 total letters (if I spelled it right).1 M, 4 I’s, 4 S’s and 2 P’s

11!1!x4!x4!

x2!

Page 29: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF For this calculation, use your calculator or

Excel, or do it by hand. You can do it in Excel, but you have to use

parentheses In Excel you would type=FACT(11)/(FACT(1)*FACT(4)*FACT(4)*FACT(2)) You have to watch your parentheses and not

forget about your *’s for multiplication The answer is 34650 (I checked by hand

also) The 1!’s in the denominator are unnecessary

because 1! Is one, but I say put them in because it helps you understand!

Page 30: Factorials permutations and_combinations_using_excel

PERMUTATIONS WITH IDENTICAL STUFF Similar problem

If there are 9 flags on a pole including 3 identical red flags, 2 identical blue flags and 4 identical green flags, how many different ways or patterns can be made?

9!3!x2!x4!

= 1260 different ways

Page 31: Factorials permutations and_combinations_using_excel

MY BEST TO YOU! Good luck, I hope this helps. If you enjoy reading the humor of an

absent minded math professor, come be a fan at www.facebook.com/cranksmytractor