SOLUTION: How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5, provided that any two distinct digits in this number are consecutive?

Algebra ->  Complex Numbers Imaginary Numbers Solvers and Lesson -> SOLUTION: How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5, provided that any two distinct digits in this number are consecutive?      Log On


   



Question 1208378: How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5, provided that any two distinct digits in this number are consecutive?
Found 3 solutions by Edwin McCravy, ikleyn, mccravyedwin:
Answer by Edwin McCravy(20055) About Me  (Show Source):
You can put this solution on YOUR website!
I think you need to insert the word "NEIGHBORING" in there like this:

How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5,
provided that any two distinct NEIGHBORING digits in this number are
consecutive?

Otherwise, without the word "NEIGHBORING", the only solutions would be these 9:
1111111, 2222222, 3333333, 4444444, 5555555, where there would be no distinct
digits.  Or these, 1222222, 2333333, 3444444, 4555555, where the only distinct
digits are consecutive. 

An even better way to state the problem would be this way:

How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5,
provided that any two consecutive digits are also consecutive integers?
 
I will also assume that by two integers being 'consecutive', that you mean the
one on the right is 1 more than the one on the left, not vice-versa. 

I will assume the above is what you mean.  If not, post again with clear
explanation, and perhaps a sample or two of what you want to be enumerated. 

------------------------------------------------

This asks for the number of 7-digit numbers whose 7 digits left to right form a
non-decreasing sequence of digits, beginning with p and ending with q, such that
1%3C=p%3C=q%3C=5. The smallest is 1111111 and the largest is 5555555. All digits
p%3C=x%3C=q will be included. We need to find the number of 7 digit numbers
of the form p-----q, for all p,q, 1%3C=p%3C=q%3C=5  

I cannot remember all the partition formulas, so I'll have to derive them all
from the method of stars and bars.

To illustrate, let's pick the sample 2334445.  There is 1 two, then 2 threes,
then 3 fours, and finally 1 five.
This sample illustration is the partition of 7 which does not contain any 0's:
1+2+3+1 = 7, 
which corresponds to the partition of 3 which does contain 0's (subtracting 1
from each of the 4 terms on the left, and subtracting 4 from the term on the
right):

0+1+2+0 = 3 

which we write as

 0| 1| 2| 0

Now we replace each number by that number of stars, leaving the first and last
empty since they are 0's:
  | *|**|

Thus, the number of required 7-digit numbers of the form 2-----5 is 

C%286%2C3%29=6%21%2F%283%214%21%29=20

for there is a total of 6 stars and bars, and we can choose any 3 of the 6
positions to place the bars in 

This, incidentally, is also the number of required 7-digit numbers of the form
1-----4. 

In general, the number of 7-digit numbers p-----q where 
q and p differ by k is C(6,k)

For the number-types 1------1, 2------2, ..., 5-----5 
there are 5%2AC%286%2C0%29=5%2A6%21%2F%280%216%21%29=5%2A1=5 

For the numbers 1------2, 2------3, ..., 4-----5 
there are 4%2AC%286%2C1%29=4%2A6%21%2F%281%215%21%29=4%2A6=24
   
For the numbers 1------3, 2------4, 3-----5 
there are 3%2AC%286%2C2%29=3%2A6%21%2F%282%214%21%29=3%2A15=45

For the numbers 1------4, 2-----5 
there are 2%2AC%286%2C3%29=2%2A6%21%2F%283%213%21%29=2%2A20=40

For the number 1------5 (actually 12345) 

there are 1%2AC%286%2C4%29=2%2A6%21%2F%284%212%21%29=1%2A15=15

So the answer is 5+24+45+40+15 = 129   <--ANSWER

Ikleyn probably has all the partition formulas memorized and
would write down the answer as a summation like this:

sum%28%285-k%29%2AC%286%2Ck%29%2Ck=0%2C4%29

and probably even generalize it to this problem and answer as a summation:

How many non-decreasing sequences of n positive integers can be formed from the
integers {1,2,...,r} provided that any two consecutive terms are also
consecutive integers.  

Edwin

Answer by ikleyn(52781) About Me  (Show Source):
You can put this solution on YOUR website!
.
How many 7-digit numbers can be formed using the digits 1, 2, 3, 4, and 5,
provided that any two distinct digits in this number are consecutive?
~~~~~~~~~~~~~~~~~~~~~~~~~~~


The formulation of the problem is murky and unclear.

Looking at this problem, I see that a person who created it (math composer)
has no necessary skills to make this post as correct, clear, accurate,
interesting and meaningful mathematical problem.

I also do not see an attractive mathematical idea behind it.

Therefore, I prefer do not touch it and do not participate.

Had it be differently, I would (probably) think differently.


//////////////////////////


Edwin, to your post as @mccravyedwin, you may have your own view and opinion,
and I may have my own view and opinion, and they not necessary should be the same.
I respect your opinion and do not impose my opinion.


Regarding their writing, in our days, any Internet browser has a built-in translator,
which provides perfect (or almost perfect) translation.

So, if their wording was not perfect, it was only because they did not work on it, and it was their fault.

To guess the thoughts in their head is not my task and is not my specialty/desire/function here.

If they can not formulate perfectly and accurately, it means that they can not think accurately;
in turn, it means that they are not ready to understand the solutions (and even formulations)
of such problems, at all.

One wise man said once that if people can nor speak English clearly,
it is often because they can not speak clearly in their native language.



Answer by mccravyedwin(407) About Me  (Show Source):
You can put this solution on YOUR website!
But Ikleyn, the way I interpreted it, it was so challenging coming up with a
solution that I just couldn't resist! I'm pretty sure that's the interpretation
he or she intended.  

You must remember that English isn't some of these students' first language, and
they are translating from their native language to English.  So we must be
forgiving if they make language mistakes.   

Edwin