Re: Can someone please explain this to me? Thanks in advance
Hello, Muppers3262!
I have an answer for the "reverse" problem:
. . Given the position of the number, find the number.
I know that the digits 1, 2, 3, and 4 can be arranged 24 different ways when forming four-digit numbers,
but how do I found out what position 3142 is in
when the 24 four-digit numbers are listed in order from smallest to largest?
In 1961, a high school student, Dale Kozniuk, found this procedure.
<u>Example</u>
Given the digits {1,2,3,4,5},
.5! = 120 different five-digit numbers can be formed.
Arranging them in increasing order, what is the 37<sup>th</sup> number on ths list?
Write 37 as a "factorial polynomial".
. . 37
.=
.1(4!) + 2(3!) + 0(2!) + 0(1!) + 1(0!)
That is, divide 37 by successively smaller factorials.
. . Important:
.37
.=
.1(4!) + 2(3!) + 1
. . . . The final 1 could be written:
.0(2!) + 1(1!)
. . . . However, the rule is:
always include the 0!.
. . Although 2 = 1(2!), it must be written:
.2
.=
.0(2!) + 1(1!) + 1(0!)
. . . . That is, we must "spread it out as thin as possible."
Note the coefficients of the "polynomial:
.1, 2, 0, 0, 1
Add 1 to all coefficients but the last:
.2, 3, 1, 1, 1
These are
ordinal numbers:
.2<sup>nd</sup>, 3<sup>rd</sup>, 1<sup>st</sup>, 1<sup>st</sup>, 1<sup>st</sup>.
We begin with the first permuation "12345" and select the digit in the indicated position.
position
. . permutation
. . digit
. 2nd
. . . . . 1
2 3 4 5
. . . . . 2
. 3rd
. . . . . 1
. .3
4 5
. . . . . .4
. 1st
. . . . . 1 . .3
. .5
. . . . . .1
. 1st
. . . . . . . . 3 . .5
. . . . . .3
. 1st
. . . . . . . . . . . 5 . . . . . .5
Therefore, the 37<sup>th</sup> number on the list is 24135.
This result can be checked by a "reverse problem".
Writing the 120 five-digit in <u>decreasing</u> order,
. . What is the:
.120 - 37
+ 1 .=
.84<sup>th</sup> number?
84
.=
.3(4!) + 1(3!) + 2(2!) + 1(2!) + 1(0!)
The coefficients are:
.3, 1, 2, 1, 1
The ordinals are:
.4<sup>th</sup>, 2<sup>nd</sup>, 3<sup>rd</sup>, 2<syp>nd</sup>, 1<sup>st</sup>
position
. . permutation
. . digit
. 4th
. . . . . 5 4 3
2 1
. . . . . 2
. 2nd
. . . . .5
4 3
. .1
. . . . . 4
. 3rd
. . . . . 5
. 3
. . 1 . . . . . 1
. 2nd
. . . . .5
. 3 . . . . . . . . .3
. 1st
. . . . . 5 . . . . . . . . . . . 5
Therefore, the 84<sup>th</sup> number "from the other end" is:
.24135.