Combinatorics

This topic has expert replies
Master | Next Rank: 500 Posts
Posts: 199
Joined: Sat Apr 26, 2014 10:53 am
Thanked: 16 times
Followed by:4 members
GMAT Score:780

Combinatorics

by 800_or_bust » Sat Jun 11, 2016 9:35 am
So this is a question I devised. It's a more difficult variation of a question from one of the Magoosh video modules. I just wanted to think of something that would really test my understanding of a counting question with restrictions. I'm interested in seeing if my thoughts are correct, or whether there are any other ways of attacking a question like this. Here goes...

A school has six periods. Each student takes science, math, history, social studies, English, and science lab. How many possible orders are there for a student's schedule if science lab must either immediately follow or immediately precede science class?

I approached this as follows:

If science class is first or last on the schedule, there is only one possible period for science lab in either case. The remaining four classes can be arranged in 4! ways in both cases.

If science class is 2nd through 5th period, then in each case, there are 2 possible periods for science lab. The remaining four classes can be arranged in 4! in all four cases.

Summing these together gives: 4! + 4! + 2x4! + 2x4! + 2x4! + 2x4! = 10x4! = 10 x 24 = 240.

An alternative approach...

If there were no restrictions, the total number of possible arrangements would be 6! = 720. Now determine the fraction of those cases where science lab is not either immediately in front of or immediately before science class. To do so, one could calculate the average probability from all six cases as follows:

If science class is first or last, there is a 1/5 chance in either case that science lab would be immediately before or immediately after.

If science class is in one of the four middle slots, there is a 2/5 chance that science lab would be immediately before or immediately after it.

Thus, the average overall probability in all 720 cases is (2 x (1/5) + 4 x (2/5))/6 = 1/3. This means in exactly 2/3rds of all cases, science lab is not either immediately before or immediately after science class. Thus, the total number of cases where science lab is either immediately before or immediately after science class must be 1/3rd of the total, which is 240 as calculated above.

Is my logic correct in both of these approaches?
800 or bust!

Master | Next Rank: 500 Posts
Posts: 199
Joined: Sat Apr 26, 2014 10:53 am
Thanked: 16 times
Followed by:4 members
GMAT Score:780

by 800_or_bust » Sat Jun 11, 2016 9:46 am
800_or_bust wrote:So this is a question I devised. It's a more difficult variation of a question from one of the Magoosh video modules. I just wanted to think of something that would really test my understanding of a counting question with restrictions. I'm interested in seeing if my thoughts are correct, or whether there are any other ways of attacking a question like this. Here goes...

A school has six periods. Each student takes science, math, history, social studies, English, and science lab. How many possible orders are there for a student's schedule if science lab must either immediately follow or immediately precede science class?

I approached this as follows:

If science class is first or last on the schedule, there is only one possible period for science lab in either case. The remaining four classes can be arranged in 4! ways in both cases.

If science class is 2nd through 5th period, then in each case, there are 2 possible periods for science lab. The remaining four classes can be arranged in 4! in all four cases.

Summing these together gives: 4! + 4! + 2x4! + 2x4! + 2x4! + 2x4! = 10x4! = 10 x 24 = 240.

An alternative approach...

If there were no restrictions, the total number of possible arrangements would be 6! = 720. Now determine the fraction of those cases where science lab is not either immediately in front of or immediately before science class. To do so, one could calculate the average probability from all six cases as follows:

If science class is first or last, there is a 1/5 chance in either case that science lab would be immediately before or immediately after.

If science class is in one of the four middle slots, there is a 2/5 chance that science lab would be immediately before or immediately after it.

Thus, the average overall probability in all 720 cases is (2 x (1/5) + 4 x (2/5))/6 = 1/3. This means in exactly 2/3rds of all cases, science lab is not either immediately before or immediately after science class. Thus, the total number of cases where science lab is either immediately before or immediately after science class must be 1/3rd of the total, which is 240 as calculated above.

Is my logic correct in both of these approaches?
I guess a third easier approach would be to just treat science class and science lab as a single unit, but recognize there are two different ways in which the components of this unit could be arranged. Then you would just have 2 x 5! = 2 x 120 = 240. Is this also correct? It looks like there are many ways to attack this problem.
800 or bust!