User:Niseide/sandbox

-

HOWEVER: 552+ septillion is NOT CORRECT ! It is FAR too large !

WHY ?

The discussion above allows the numbers assigned to a column to appear in any order (ascending [4,5,6], descending [6,5,4]or mixed [5,6,4])

But in reality the numbers MUST appear ONLY IN ASCENDING ORDER

This has vast implications, greatly reducing the possible arrangements.

Using columnn 1 as an example, note that the first cell can only contain 1 of 11 numbers, not 1 of 15, because the numbers 12, 13, 14 and 15 cannot appear there. (WHY?)

So let's enumerate all the possibilities:

It is easier to start with 11 and work downwards toward 1

If cell 1 contains 11, then the remaining 4 cells must be 12,13,14,15 and this is the only possible ascending sequence

If cell 1 contains 10, then the remaining 4 cells are selected from 11, 12, 13, 14, 15 and there are 5 possible ascending sequences:


 * 10, 11, 12, 13, 14
 * 10, 11, 12, 13, 15
 * 10, 11, 12, 14, 15
 * 10, 11, 13, 14, 15
 * 10, 12, 13, 14, 15

If cell 1 contains 9, then the remaining 4 cells are selected from 10, 11, 12, 13, 14, 15 and there are 15 possible ascending sequences. Go ahead, try to list them all.

I will save you some computations:


 * If cell 1 contains an 8, there are exactly  35 ascending sequences.
 * If cell 1 contains an 7, there are exactly  70 ascending sequences.
 * If cell 1 contains an 6, there are exactly 126 ascending sequences.
 * If cell 1 contains an 5, there are exactly 210 ascending sequences.
 * If cell 1 contains an 4, there are exactly 330 ascending sequences.
 * If cell 1 contains an 3, there are exactly 495 ascending sequences.
 * If cell 1 contains an 2, there are exactly 715 ascending sequences.
 * If cell 1 contains an 1, there are exactly 1001 ascending sequences.

Adding up the total number of all possible ascending sequences from the cases cited above (1 + 5 + 15 + 35 + ..... + 715 + 1001) = 3003, just for column 1.

Listing the arrays for all of the 3003 ascending sequences, one by one, will quickly become tedious and error prone. Lucky for us there is a math formula for 'permutations' that provides a quick answer.

If N = the number of values to choose from, and K = how many of these values can be taken at a time, and 'N factorial' = N! = [ N * (N-1) * (N-2) * .... 3 * 2 * 1 ] then N things taken K at a time = N! / [ (K!)(N-K)! ]

Ex: If cell 1 contains a 4, there are 11 numbers to choose 4 from
 * This is 11 things taken 4 at a time:
 * 11! / [ (4!)(11-4)! ] = 11! / (4!)(7!) ] =
 * 11*10*9*8*7*6*5*4*3*2*1 /(4*3*2*1)(7*6*5*4*3*2*1) =
 * 11 * 10 * 3 = 330

Ex: If cell 1 contains a 1, there are 14 numbers to choose 4 from
 * This is 14 things taken 4 at a time
 * 14! / [ (4!)(14-4)! ] = 14! / [ (4!)(10!) ] =
 * 7 * 11 * 13 =  77 * 13 = 1001

Columns 2, 4 and 5 are similar; each of them has exactly 3003 ascending sequences.

Column 3 fas a FREE space in the middle cell so it is
 * 15 things taken 4 at a time =
 * 15! / [ (4!)/(15-4)! ] =
 * 15! / (4!)(11!) = 15 * 91 = 1365 ascending sequences.

FINAL SOLUTION: 4 columns @ 3003 sequences and 1 column of 1365 sequences
 * = (3003) * (3003) * (3003) * (3003) * (1365) =

an 18-digit number  111,007,923,832,370,565 which is 9 digits shorter than the value previously cited.