Why count it this way?

128 Views Asked by At

This is a very very elementary problem solving technique I was taught some time back. I have been using it but now looking at it, I find it kinda strange why it should be this way.

Typically, the type of question, involving the technique goes like this:

you have five cards, one of them cannot be put at either end of the arrangement, how many possible arrangements are there?

The correct way of doing this is simply to do: 4*3*2*1*3. You draw five blanks, first write 4 and 3 on both ends. Then from there you go as if without that restriction.

If you do 4*4*3*2*1, which is wrong, the question would be the same exception that same card cannot be put, this time, at only one of the two ends,

Here is something I don't get. If I do 4*4*3*1*1, then it seems like a completely different story. It seems to me like the correct as answer to the first problem ( both ends). By doing this way, the situation is like I cannot put that card at the first slot, but I can at the second slot (going from left to right, instead of jumping back and forth), then I draw a card to put at the second slot, the card I drew is not that card, the same keeps happening until I am at the fourth slot, I know if I don't draw that card now, I will violate the rule. So technically, there is one choice for this slot, this is when I jump to the last slot before going back to the fourth, second to last, slot.

My other question: do I necessarily have to go the last slot before going back to the second slot?

4

There are 4 best solutions below

2
On

The problem is that the cards that occur as middle cards determine the last card. Consider the cards numbered $1,2,3,4,5$ where the card numbered $1$ cannot be first or last.

In the product $4\cdot 4\cdot 3\cdot 2\cdot 1$, think about what you're actually doing:

1) Pick one of $2,3,4,5$ for the first card.

2) Pick one of the remaining four cards for the second card

3) Pick one of the remaining three cards for the third card

4) Pick one of the remaining two cards for the second card

5) There is only one card left for the last card. Now, here's where the problem is: what card is left? If you're left with the $1$ card, then this is not a valid sequence. If you're not left with the $1$ card, then the sequence is valid.

Now, you must figure out which of the sequences you've constructed will have a $1$ at the end. This is precisely $4\cdot 3\cdot 2\cdot 1$. Therefore, there are $$4\cdot 4\cdot 3\cdot 2\cdot 1-4\cdot 3\cdot 2\cdot 1=4\cdot 3\cdot 3\cdot 2\cdot 1$$ ways to not have the $1$ at either end.

0
On

Let's say it is card 5 that can't be put at either end. The fact that these restrictions are on the cards at "the ends" is not relevant. There are two types of card position: those that are restricted (i.e. you can't put the 5 there) and those that aren't. The result would be the same no matter where the restricted positions are, as long as there are two of them.

If you're thinking of a step-by-step procedure where you first place one card, then another, ..., you always want to start with the restricted positions, because one you have decided what cards go there the rest can go anywhere. On the other hand, if you place a card in an unrestricted position before a restricted position, you make things more complicated: when you get to the restricted position, the 5 may or may not have been placed already, and this changes the number of allowed possibilities.

2
On

If you use the multiplication method, you must fill restricted positions first.

The trouble with $4\cdot4\cdot3\cdot 1\cdot 1$ starts with the 2nd slot onwards. We are uncertain whether we have "used up" the "forbidden at ends" card or not, so the result is also uncertain !

If you want an alternative method, there are 5! unrestricted ways, and $\frac{1}{5} th $ of them will have have the "forbidden at ends" card, thus ans = $5!\cdot4/5$

1
On

It is possible to do it from left to right, but you will need to consider all cases, as the forbidden card can be put in any of the middle 3 slots, and each time it is drawn it will have a different number of ways. Let's call the forbidden card $F$ for forbidden.

Slot 1 is going to be 4, of course.

If $F$ is at slot 4, as we fail to put it in slot 2 and 3: $$4 \cdot 3 \cdot 2 \cdot 1 \cdot 1$$

Notice the second slot and third slot is 3 and 2, because we assumed that $F$ is at slot 4, not slot 2 or 3.

Now it is also possible we had it in slot 3, but not in slot 2 or 4.

$$4 \cdot 3 \cdot 1 \cdot 2 \cdot 1$$

The middle 1 means that card HAS to be in slot 3.

Same thing if we know we have it in slot 2 right away, and we don't care about the rest.

$$4 \cdot 1 \cdot 3 \cdot 2 \cdot 1$$.

Notice these 3 cases covers ALL possible cases, as

a) It takes care of all possible position of $F$

b) Other cards locations are not restricted other than where the forbidden cards is---which is as it should be.

These 3 cases are independent, as $F$ cannot be in two different slots, we can then apply the sum rule.

$$24 + 24 + 24 = 72$$

Voila! You got your answer again!

Summary: Your approach is fine, it's intuitive and is a good way to start. But you need to be careful whenever you make the statement "there is one choice for this slot"---look at is it possible for you to change your card choices so far to give it a second choice, if it is possible, you will need to do multiple cases.

In this case, it is indeed the case, as if the forbidden card is already chose, then there will be 2 cases for that slot.

It's a common mistake when relying on intuition.