- WELCOME TO A VIDEO THAT WILL SHOW SEVERAL COUNTING PROBLEMS.
THE GOALS OF THIS VIDEO ARE TO SOLVE COUNTING PROBLEMS
USING THE COUNTING PRINCIPLE, PERMUTATIONS AND COMBINATIONS.
LET'S TAKE A LOOK AT THE FIRST QUESTION.
A COMBINATION LOCK CONSISTS OF 3 NUMBERS FROM 0 TO 39.
IF THERE ARE NO RESTRICTIONS ON THE NUMBERS,
HOW MANY POSSIBLE COMBINATIONS ARE THERE?
SINCE THE COMBINATION CONSISTS OF 3 DIFFERENT NUMBERS,
WE CAN THINK OF THIS AS 3 INDEPENDENT EVENTS.
THERE ARE 40 NUMBERS FROM 0 TO 39,
SO THERE ARE 40 WAYS TO SELECT THE FIRST NUMBER,
40 WAYS TO SELECT THE SECOND AND 40 WAYS TO SELECT THE THIRD.
THIS PRODUCT = 64,000,
SO THERE ARE 64,000 POSSIBLE COMBINATIONS FOR THIS LOCK.
NOW ONE THING I WANT TO POINT OUT HERE IS,
NORMALLY WHEN WE THINK OF A COMBINATION,
WE THINK OF THE ORDER NOT MATTERING.
BUT IN FACT WE DO REALIZE THAT WHEN WE HAVE A COMBINATION LOCK
THE ORDER OBVIOUSLY IS IMPORTANT,
SO MAYBE IT SHOULD BE CALLED A PERMUTATION LOCK
INSTEAD OF A COMBINATION LOCK.
NOW, WE WANT TO KNOW
HOW MANY WAYS CAN 7 BOOKS BE PLACED ON A SHELF.
SO WE CAN THINK OF THE SHELF AS HAVING 7 SLOTS,
AND WE HAVE TO FILL EACH OF THEM.
SO THERE ARE 7 CHOICES FOR THE FIRST POSITION.
ONCE THERE'S A BOOK IN THIS POSITION,
THERE'S ONLY 6 CHOICES FOR THE SECOND,
5 FOR THE THIRD AND SO ON, ALL THE WAY DOWN TO 1 CHOICE.
SO THIS = 7 FACTORIAL, AND 7 FACTORIAL = 5,040.
NOW, WE CAN ALSO THINK OF THIS AS A PERMUTATION.
WE HAVE THE PERMUTATION OF 7 ITEMS TAKEN 7 AT A TIME.
REMEMBER THAT WOULD BE N FACTORIAL
DIVIDED BY N - R FACTORIAL,
THAT WOULD BE 7 - 7 FACTORIAL,
THAT WOULD BE 7 FACTORIAL/0 FACTORIAL.
REMEMBER 0 FACTORIAL = 1,
SO WE WOULD HAVE 7 FACTORIAL AS WE HAD ABOVE.
HERE YOU WANT TO ORDER A PIZZA.
IF YOU HAVE A CHOICE OF 5 DIFFERENT TOPPINGS,
HOW MANY DIFFERENT PIZZAS CAN BE ORDERED?
NOW, THESE PROBLEMS CAN BE TRICKY.
ALL THESE PROBLEMS CAN BE TRICKY BECAUSE OF THE WORDING.
WE HAVE A CHOICE OF 5 TOPPINGS,
BUT IT DOESN'T SAY WE HAVE TO PUT 5 TOPPINGS ON EACH PIZZA.
SO WE COULD SELECT 0 TOPPING FOR A CHEESE PIZZA,
1 TOPPING, 2 TOPPINGS, 3 TOPPINGS AND SO ON,
ALL THE WAY UP TO 5 DIFFERENT TOPPINGS.
AND OF COURSE THE ORDER IN WHICH WE SELECT THE TOPPINGS
IS NOT GOING TO AFFECT THE TYPE OF PIZZA,
SO THESE WILL BE COMBINATIONS.
SO THE NUMBER OF WAYS WE CAN ORDER A PIZZA
WOULD BE THE COMBINATION OF 5 ITEMS CHOSEN 0 AT A TIME,
THAT WOULD BE LIKE THE CHEESE PIZZA,
+ COMBINATION OF 5 ITEMS CHOSEN 1 AT A TIME
+ THE COMBINATION OF 5 ITEMS CHOSEN 2 AT A TIME,
5 ITEMS CHOSEN 3 AT A TIME, 5 ITEMS CHOSEN 4 AT A TIME,
AND THEN LASTLY, WE HAVE THE COMBINATION OF 5 ITEMS
CHOSEN 5 AT A TIME.
SO THE SUM OF THESE COMBINATIONS
WOULD BE THE TOTAL NUMBER OF WAYS THAT WE CAN ORDER A PIZZA
WITH A CHOICE OF UP TO 5 DIFFERENT TOPPINGS.
SO HERE WE HAVE 5 CHOOSE 0 + 5 CHOOSE 1
+ 5 CHOOSE 2 + 5 CHOOSE 3 + 5 CHOOSE 4 + 5 CHOOSE 5.
AND WE'D SEE THAT SUM WOULD BE 32 POSSIBLE WAYS
TO ORDER A PIZZA
WHEN WE HAVE UP TO 5 CHOICE OF TOPPINGS.
OKAY, ON THIS PROBLEM, WE WANT TO KNOW
HOW MANY WAYS CAN WE DRAW 4 CARDS FROM A DECK OF 52 CARDS.
WELL, THE ORDER DOESN'T MATTER WHEN WE DRAW CARDS FROM A DECK.
IT'S STILL GOING TO PRODUCE THE SAME HAND.
SO THIS WOULD BE A COMBINATION, WE'D HAVE 52 CHOOSE 4.
AND JUST TO REVIEW,
THIS WOULD BE 52 FACTORIAL DIVIDED BY N - R FACTORIAL.
52 - 4 = 48 FACTORIAL
AND THEN R FACTORIAL WHICH WOULD BE 4 FACTORIAL.
SO LET'S GO AHEAD AND DO THIS ONE BY HAND.
WE'D HAVE 52 x 51 x 50.
NOW, I'M GOING TO STOP HERE AND WRITE 48 FACTORIAL,
BECAUSE I NOTICE THAT IT'S GOING TO SIMPLIFY WITH 48 FACTORIAL
IN THE DENOMINATOR
BUT I WILL WRITE OUT 4 FACTORIAL.
SO HERE WE HAVE 48 FACTORIAL.
SIMPLIFY THAT, THAT WOULD BE 1.
YOU COULD SIMPLIFY A LITTLE BIT MORE HERE IF YOU WANTED TO,
BUT I'M GOING TO GO AHEAD AND JUST GO TO THE CALCULATOR.
HERE'S OUR NUMERATOR.
NOW, YOUR DENOMINATOR WOULD BE 4 FACTORIAL WHICH WOULD BE 24.
SO WE HAVE 270,000,725 WAYS TO DRAW 4 CARDS
FROM A DECK OF 52 CARDS.
NOW, THE NEXT COUPLE OF QUESTIONS
WON'T BE QUITE AS STRAIGHTFORWARD.
HERE WE WANT TO KNOW
HOW MANY WAYS 5 PEOPLE CAN SIT AROUND A TABLE,
AND THIS IS DIFFERENT THAN IF THEY WERE SITTING IN A LINE.
BECAUSE IN A LINE, THERE'S A FRONT AND A BACK.
BUT IF YOU HAVE A CIRCULAR ARRANGEMENT,
THERE'S NOT GOING TO BE A FRONT AND BACK OF A LINE.
SO LET'S GO AHEAD AND MODEL THIS
BY REPRESENTING THE PEOPLE AS "A," B, C, D, E,
AND LET'S DRAW 5 POSITIONS AT THE TABLE, 1, 2, 3, 4 AND 5.
SO OF COURSE, 1 POSSIBLE ARRANGEMENT WOULD BE
IF "A" SAT HERE, B, C, D AND E.
SO WHAT'S DIFFERENT HERE
IS IF EVERYONE MOVED 1 POSITION IN THIS DIRECTION,
IT WOULD NOT PRODUCE ANOTHER PERMUTATION
OR SEATING ARRANGEMENT.
SO WHAT WE COULD DO TO FIGURE THIS OUT
IS PICK 1 PERSON AND HAVE THEM STAY IN A FIXED POSITION.
AND IF THIS PERSON STAYS IN THE FIXED POSITION,
THEN WE COULD PERMUTE THE OTHER 4 INDIVIDUALS,
AND IT WOULD CREATE A DIFFERENT SEATING ARRANGEMENT.
SO THE WAY THAT WE CAN DETERMINE A CIRCULAR PERMUTATION
IS TAKE THE VALUE OF N, IN THIS CASE 5, SUBTRACT 1
AND THEN TAKE THE FACTORIAL OF THAT.
THE NUMBER OF WAYS TO PERMUTE 5 PEOPLE AROUND A CIRCULAR TABLE
WOULD BE 4 FACTORIAL,
OF COURSE 4 FACTORIAL IS 4 x 3 x 2 x 1 = 24.
SO IN GENERAL,
THE NUMBER OF WAYS AND OBJECTS CAN BE PERMUTED IN A CIRCLE
IS N - 1 FACTORIAL.
AGAIN, BECAUSE IF YOU FIX THE 1 PERSON ON THE CIRCLE,
IT DOES IN A WAY CONVERT THIS BACK TO A LINEAR ARRANGEMENT.
IT'S JUST THAT WE HAVE 1 LESS PERSON TO CONSIDER,
BECAUSE THEY'RE USED AS THE REFERENCE POINT.
LET'S GO AHEAD AND TAKE A LOOK AT 1 MORE.
HOW MANY WAYS CAN 5 GIRLS AND 2 BOYS BE ARRANGED IN A ROW
WITHOUT RESTRICTION?
WELL, THAT'S A TOTAL OF 7 PEOPLE.
SO AGAIN, THERE'S A COUPLE WAYS TO THINK OF IT.
IF WE HAVE 7 POSITIONS IN A ROW, 7 CHOICES FOR THE FIRST,
6 FOR THE SECOND, 5 FOR THE THIRD,
ALL THE WAY DOWN TO 1 FOR THE LAST POSITION,
THAT'S 7 FACTORIAL,
OR WE COULD THINK OF THIS AS JUST 7 PERMUTE 7.
THE RESULT WOULD BE THE SAME.
WE ACTUALLY FOUND 7 FACTORIAL EARLIER ON A PREVIOUS PROBLEM,
AND IT WAS 5,040.
AND THIS LAST QUESTION GET'S A LITTLE MORE INTERESTING.
WE WANT TO ARRANGE THE BOYS AND GIRLS IN A ROW,
BUT THE 2 BOYS MUST SIT NEXT TO EACH OTHER.
SO IF WE WERE TO SKETCH OUT 7 POSITIONS,
TO ILLUSTRATE, LET'S JUST GO AHEAD AND SAY
THAT THE BOYS WERE GOING TO SIT HERE.
WELL, THERE'S 2 BOYS,
SO THE NUMBER OF WAYS WE COULD PERMUTE THEM
IN THESE 2 SEATS WOULD BE, SO THAT WOULD BE 2 FACTORIAL.
THE REMAINING 5 SEATS WOULD BE TAKEN UP BY THE GIRLS,
SO THAT WOULD BE 5 FACTORIAL.
NOW, THIS IS A NUMBER OF WAYS
THAT WE COULD PERMUTE THESE BOYS AND GIRLS
IF THE BOYS SAT NEXT TO EACH OTHER
AND THEY WERE IN THESE 2 SEATS,
BUT THEY DON'T HAVE TO BE IN THESE 2 SEATS.
SO HOW MANY OTHER SEATS CAN THEY SIT IN?
WELL, THEY COULD SIT IN THESE 2 SEATS THAT'D BE 1 WAY,
OR THESE 2 SEATS THAT'S 2, OR THESE 2 THAT'D BE 3,
OR THESE 2 THAT'D BE 4, OR THESE 2 THAT'D BE 5,
AND LASTLY THEY COULD SIT IN THESE 2 THAT WOULD BE 6.
SO WE HAVE TO TAKE ALL OF THIS AND MULTIPLY IT BY 6
TO CONSIDER THE DIFFERENT PAIRS OF SEATS
THAT THE 2 BOYS COULD SIT IN.
SO THIS WOULD BE 6 x 2 x 5 FACTORIAL,
1,440 WAYS FOR THESE 2 BOYS AND 5 GIRLS TO BE ARRANGED IN A ROW
GIVEN THE 2 BOYS MUST SIT NEXT TO EACH OTHER.
OKAY. I HOPE YOU FOUND THIS VIDEO HELPFUL.
THANK YOU FOR WATCHING.