Having a lot of time at home and in my train room now I started wondering how many different combinations are there and how do you figure it ?     If you had;

3 tracks

5 trains

each having 7 cars 



Original Post

Wild guess of 105? 

(Don't have time for any more than that and all the details will be broken off if more:-)

Last edited by BobbyD

First look at how many ways you can arrange 3 trains on 3 tracks.  There are 6 combinations: ABC, ACB, BAC, BCA, CAB, CBA.  Now, how many ways can you choose 3 trains out of 5?  The general formula for combinations is:

Combinations of t chosen from n = C(n,t) = n!/(t!x(n-t)!) where n! = n x (n-1) x (n-2) x...x 1.

Choosing 3 out of 5 = 5!/(3!2!) = (5x4x3x2x1)/((3x2x1)x(2x1)) = (5x4)/(2x1) = 10

So there are 10 ways to choose the 3 trains and 6 ways to arrange them on the 3 tracks.  You have 60 combinations (10x6) once you have built the 5 trains.

You have 35 cars (5 trains of 7 cars each).  How many ways can you select 7 cars for the first train?

Choosing 7 out of 35 = 35!/(7!28!) = (35x34x33x32x31x30x29)/(7x6x5x4x3x2x1) = over 6 million.

Essentially you have a lotto drawing for the cars and the combinations are HUGE.  Note that this is only the first train.  For the second train, you are choosing 7 cars out of the remaining 28, then choosing 7 out of 21 for the 3rd train, etc.  All of these combinations get multiplied together just like the trains and tracks did above.

You'll certainly never run out of different trains to run, that's for sure! 

The full answer is it depends .

If you want to arrange the 5 trains on 3 tracks and it matters which track if each train is on, you can have your choice of 5 trains for the first, 4 for the second, and 3 for the third. which multiplies to 60.

If you do not care which track, just asking how many combinations of 3 trains you can have on the layout, and not worrying about which track each train is on, the answer is only 10.

How you make up the trains is more complicated. Since you have 35 cars, the number of combinations of 35 cars taken 7 at a time (in no unique order), is 35!/(7!*28!)  which equals 6,724,520 combinations. You would then need to multiple this number by 5 to include the number of engines you have 33,622,600 different trains.

If order mattered for the cars you would get 33,891,580,800 different combinations. Taking into account the number of engines comes to 169,457,904,000 different trains.

Lad Nagurney



Funny - I was just going to reply "don't worry about it - it's more than you'll ever be able to make". 

Reminds me of a funny story my son told me - he was taking a geometry test when all of a sudden he bursts out laughing.  The teacher just says "looks like someone got the joke and will get an A".

The question: Write the expression for the volume of a circular shaped food with height 'A' and radius "Z".

The formula for volume is:  π·(radius)2·(height)

This makes the answer: pi·z·z·a





I don't know about that, but I do have a funny story about meeting an actual rocket scientist for another day.

I'm pretty sure Bob is a clinical biostatistician from one of the OGR videos which featured his amazing layout Lad is a professor of electrical and computer engineering from his profile.  They've undoubtedly forgotten more math than I've ever learned. 


Last edited by Greg Houser

WOW,  I'm  sure glad I ask,  I was afraid I would run out of combinations in the next 100 years. lol

Thank you all who presented those great formulas , they're as clear as Chocolate cake batter. 

I was thinking it would be simple like: ( 3 to the third) X( 5 to the 5 fifth) X ( 7 to the seventh) 

Or;  X  ( 35 to the 35th )


Greg Houser posted:

I don't know about that, but I do have a funny story about meeting an actual rocket scientist for another day.


I've got a couple of those, myself...  ;-) 


I should not take much credit, since reading Bob's post, I realized I under-counted by quite a bit.

There are approximately 10^21 (ie 1 with 21 zeros afterwards) of possible train combinations..

To comment that big numbers like this are real, that number is similar to the number of electrons that flow through a wire carrying 10 Amps in a minute.

Now that I am remote teaching, I have a loop of track on a bookshelf in my home office which is in the background. Several students have commented on it, including one who suggested I change the trains each day and give extra credit to those students who can identify what train is on the loop!

For a course I teach on sensors, transducers, and data acquisition, we have some HO trains in the lab to use for class automation projects.


Using the Permutation formula with 7, 5 and 3.

1,949,482,876,800.  If you change one item every fifteen minutes, you will come to a repeat after 37 million years. Significantly  more if you do not restrict the engine to the front of the train. John in Lansing, ILL

Last edited by rattler21

Add Reply

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653

Link copied to your clipboard.