This GRE quant practice question is a permutation combination problem solving question. A classic example of sampling without replacement and where the order matters. An ^{n}p_{r} question. The explanation discusses more than one way in which the answer to the question can be arrived.

#### Question: There are 5 doors to a lecture room. In how many ways can a student enter the room through a door and leave the room by a different door?

- 10
- 9
- 20
- 625
- 1024

#### Video Explanation

Scroll down for explanatory answer text#### Explanatory Answer

#### Use these hints to get the answer

- Find the number of ways the student can enter the classroom.
- Find the number of ways the student can leave the classroom through a different door.
- Compute the total number of possibilities.

#### 3 steps to the answer

Let us name the doors A, B, C, D, E.

#### Step 1: Find the number of ways the student can enter the classroom

There are 5 doors to the classroom. The student can enter the class through any one of these doors.It could be any one of A or B or C or D or E. So, there are 5 ways.

#### Step 2: Find the number of ways the student can leave the classroom through a different door

The student cannot leave the classroom through the door she entered.The number of choices to choose a door to leave is down to 4

#### Step 3: Compute the number of possibilities

- If the student entered through A, she could leave through B or C or D or E.

There are 4 possibilities of entering through A and leaving through a different door viz., AB, AC, AD, AE. - If the student entered through B, she could leave through A or C or D or E.

There are 4 possibilities of entering through B and leaving through a different door viz., BA, BC, BD, BE. - If the student entered through C, she could leave through A or B or D or E.

There are 4 possibilities of entering through C and leaving through a different door viz., CA, CB, CD, CE. - If the student entered through D, she could leave through A or B or C or E.

There are 4 possibilities of entering through D and leaving through a different door viz., DA, DB, DC, DE. - If the student entered through E, she could leave through A or B or C or D.

There are 4 possibilities of entering through E and leaving through a different door viz., EA, EB, EC, ED.

We could also arrive at the same answer by saying - there are 5 ways to enter AND 4 ways to leave.

So, a total of 5 * 4 = 20 ways.

#### Alternative ways to express the answer

The answer to this question may also be expressed in alternative ways. Here are couple of those and the rational behind those expressions.Ask yourself the following two questions

##### Q1. Sampling with replacement or without replacement?

Is the problem in hand one of sampling with replacement or sampling without replacementIf the outcome of the first sampling is not put back into the sample space, we are dealing with sampling without replacement.

An effective way of determining will be to look at the choices available for each of the sampling. There were 5 choices to select a door to enter. But we were left with only 4 to exit. So, the door selected to enter is no longer available in the sample space when we had to select a door to exit.

If we had 'n' choices for the first sampling and it reduces to (n -1) and further down to (n -2) and so on, we are dealing with sampling without replacement.

So, without doubt this question is an example of "

**sampling without replacement**".

If the question is a "sampling without replacement question", the number of ways of selecting r objects from n objects is^{n}C_{r}.

So your first step is to compute this value. For this question, we can select 2 doors out of 5 in^{5}C_{2}ways.

##### Q2. Whether or not order matters in this sampling?

One of the outcomes was selecting doors AB. Another one of the outcomes was selecting doors BA.Are these two choices the same or are they different?

If AB is the same as BA, then

**order does not matter**.

If AB is not the same as BA, then

**order matters**.

In this question, entering by A and leaving by B is entirely different from entering by B and leaving by A. Therefore, AB is not the same as BA. So, order matters

If order matters, multiply the answer you got in the previous step with the number of ways things can be reorderedWe have selected two doors and they can be reordered in 2! or 2 ways.

r distinct objects can be reordered in r! ways.

Therefore, total outcomes =

^{5}C

_{2}* 2!

The same may also be expressed as

^{5}P

_{2}

^{n}P_{r}=^{n}C_{r}* r!