Difficult Counting Problem involving Conditions Without Replacement

65 Views Asked by At

So I came across the following problem and am having trouble interpreting how to solve. It's a counting problem.

Given a six digit code, how many possible codes are there if the first digit can not be 0, the fourth digit is a 6, and the last digit must be odd. No digit may repeat.

So the thing that is throwing me off is the last statement, that no digit may repeat (I dont think the teacher meant to put this here because, well, ... see below), because if the last digit must be odd, we must look at cases then, for the previous 5 (albeit only 4, since digit #4 is automatically a 6, so we can almost disregard it in the problem).

So, we run through the possibilities below. For the last odd number placement (the 6th position) there could be:

  1. one odd left,
  2. two odds left,
  3. three odds left,
  4. four odds left,

Now, if there is only one odd number left for the last spot, that means, of the previous four available spots, all must be odd.

$$5\times 4\times 3\times 2\times 1=120$$

Now, if there are two possible odd numbers left for the last spot, that means, of the previous four available spots, 3 must be odd and 1 must be even. Now the first number can't be $0$, so there are $8$ possibilities, ...

At this point, I'm confusing my conditions and am getting lost. WHile I think the question (which was posed to an elementary high school probability class) was posed incorrectly (with replacement would have been appropriate), i find myself in need of a solution, but see things getting harder and I'm getting lost in it. Any help would be wonderful.

2

There are 2 best solutions below

3
On BEST ANSWER

Since the fourth digit is already fixed to be 6, I will consider the question as 5-digit code but no digit can be six.

Last digit has to be odd. There are five options: 1,3,5,7,9. Choose one.

First digit cannot be 0, 6 or same as the last digit. There are seven options left. Choose one.

Second, third and fourth digits can be anything aside from 6, first digit and last digit. There are seven options. Choose three. Ordering of these matter, so keep that in mind.

There are ${5 \choose 1}{7 \choose 1}{7 \choose 3} 3!$ codes.

1
On

You can perform the following steps:

(a) Determine the last digit. Since it must be odd, there are only $5$ possible choices: $1,3,5,7,9$.

(b) Then determine the first digit. As required, it is nonzero, so there are $7$ possibilities. (You are supposed to ignore $0,6$ and the digit you used in last step.)

(c) Now you still have $7$ digits to fill the remaining $3$ slots, so the number of ways is $7\times 6\times 5=210$.

By the principle of multiplication, the total number of combination is $5\times 7\times 210=7350$.