Looking for Combination/Permutation Formula

Bones53

New member
Joined
Feb 11, 2015
Messages
3
I don't know if I'm in the correct section for this question, so admin. may want to move it to another.

I am wondering if a formula can be devised (ie., not a computer program, but a formula that can be solved on a scientific calculator.)

I have certain objects, let's say marbles, to be arranged in a row. The formula will take into account (3) variables concerning these marbles. The 1st variable will be the number of sizes available per marble. The 2nd variable will be the number of marbles used in the row. At this point, without a 3rd variable, the number of combinations is a simple exponent problem.

The 3rd variable is the kicker: There is a limitation to the size difference between adjacent marbles. For example, take (5) marbles, with (5) sizes per marble, but with a maximum adjacent marble size difference of (2). This reduces the total number by about half. I can figure the answer out by progressing each combination by hand, but it takes forever. Especially when I would be using real-life examples of (5) to (8) objects, with (8) to (12) sizes per object.
 
Continuing:

I have been told in the past, that the answer lies in the field of matrices...and was shown a slightly quicker way by multiplying identical matrices together. I can go into more detail if needed, but ultimately, however clever this method is, it still is not a "formula", and is time consuming.

I realize that a simple computer program can be written nowadays that will produce an answer in 1/20 second, but I've been curious about this and have asked numerous folks from time to time over the last 45 years. (Fortunately, my livelihood does not depend on the answer to this question!) I can further explain if I get a bite on this.

Thank you!

PS: When I first pondered this circa 1970, my slide rule was of no help either.
 
I will progress a very small example to further clarify:

(3) marbles side-by-side (in a row)
(4) sizes per marble, labeled 1, 2, 3, 4.
With only these 2 variables, the total combinations is (4) raised to power of (3)= (64)

Now I'll introduce the 3rd variable, the "max. adjacent size difference" which in this
example will be (1). Thus:

111, 112, 121, 122, 123, 211, 212, 221, 222, 223, 232, 233, 234, 321,
322, 323, 332, 333, 334, 343, 344, 432, 433, 434, 443, 444..................= (26)

If I made the 3rd variable in this example to be (2), then the combinations would
progress to (47)

Anybody?
 
Top