# Thread: Number of possible combinations problem

1. ## Number of possible combinations problem

I have 9 humanoid robots and each one has 9 parts. The 9 parts are:

2) Body
3) Shoulders (counts as a pair)
4) Legs (counts as a pair)
5) Hand 1
6) Hand 1 duplicate (unattached)
7) Hand 2
8) Hand 2 duplicate (unattached)
9) Backpack

Conditions:

1) Each robot's parts can be interchanged.
2) All parts can only connect to their designated areas as shown in the diagram. Meaning, the HEAD can only connect to the top of the BODY, the SHOULDERS can only connect to the upper BODY, the LEGS can only connect to the lower BODY, the BACK PACK can only connect to the back of the BODY, and HAND 1 and HAND 2 can only connect to either left or right SHOULDER.
3) Aside from each robot's spare duplicate hands, no other two parts are the same.
4) The HEAD, SHOULDERS, LEGS, and BACK PACK can only connect to the BODY. They cannot connect to other parts i.e. HEAD to HEAD, SHOULDERS to LEGS, etc.
5) HAND 1 and HAND 2 can only connect to the SHOULDERS. Each hand can connect to either to left shoulder or right.
6) The robot must always have all 7 parts intact. A robot cannot be incomplete
7) The robot can have two different HAND 1's or two different HAND 2's equipped.
8) Since each robot has a duplicate HAND 1 and HAND 2, the robot can have two same HAND 1's or two same HAND 2's.

edit:
9) In case a robot has two identical HANDS equipped i.e. two green hands or two purple hands or two other identical hands from another robot, interchanging them does not count as another combination.
10) Shoulders cannot be switched to the left or right.

PROBLEM: How do I solve for all possible combinations?

2. I'll have a go.. I think i'm right but I might not be

9! ways to interchange the head,
9! ways to interchange the shoulders,
9! ways to interchange the bodies,
9! ways to interchange the backpacks,
9! ways to interchange the legs

So there are $(9!)^5$ ways to interchange all parts except the hands.

Now, for the hands,
There are 9 * 4 = 36 hands in total to distribute out.
But there are only 9 * 2 = 18 possible places for these hands.
There are 36 possible hands for the first position, 35 for the second, 34 for the third....
So the total ways to arrange the hands is
$36 \cdot 35 \cdot 34 \cdot ... \cdot 19=\frac{36!}{18!}$

So the total ways of interchanging, configuring, arranging etc. everything, is $(9!)^5 \cdot \frac{36!}{18!}$
$=3656026148687236078066940610309142548263731200000 00000$

lol

3. Qcfx2a, I have one question. Concerning the two left hands in your drawing, both are colored blue and in the description you write “Hand 1 duplicate (unattached)”.
Does the word ‘duplicate’ there mean ‘identical’? That is, using those two blue hands there is only one way to count.

Or do you intend that Hand 1 and Hand 1 duplicate (unattached) are not identical.
That is: using “Hand 1, Hand 1 duplicate (unattached)” is different from using “Hand 1 duplicate (unattached), Hand 1” in those orders.

The answer given by divideby0 assumes the second to be the correct reading and is correct.

However, if the first reading is correct the answer given is too large.

4. @Plato
If I understood your question correctly, edit: The first one is correct. But just in case, allow me to explain. Oh and sorry if my problem is confusing or lacking in details.

Imagine the robots as children's toys that come in a box. Each box contains one completely assembled robot plus two extra hands: a copy of the currently attached left hand, and a copy of the currently attached right hand. So each box contains 9 pieces. The hands are weapons by the way.

Why does each box have 2 duplicates? Because having a copy will allow children to make a certain robot with two exactly similar weapons.

EXAMPLE:

ROBOT BOX-1 has 4 hands inside. The first two are gun hands, the other two are sword hands. This way, the owner of the robot can make the robot have two guns equipped or two swords equipped.

And only ROBOT BOX-1 has gun hands and sword hands. The other 8 boxes will each have different sets of hands, like ROBOT BOX-2 has two whip hands and two knife hands, and so on.

And of course, the owner can interchange weapons from other boxes.

5. Originally Posted by qcfx2a
@Plato
Imagine the robots as children's toys that come in a box. Each box contains one completely assembled robot plus two extra hands: a copy of the currently attached left hand, and a copy of the currently attached right hand. So each box contains 9 pieces. The hands are weapons by the way.
EXAMPLE: ROBOT BOX-1 has 4 hands inside. The first two are gun hands, the other two are sword hands. This way, the owner of the robot can make the robot have two guns equipped or two swords equipped.
Let’s take the example. From that description, it seems that the ‘gun hands’ are interchangeable. The child can make only four configurations using only parts from box1:
$\begin{array}{*{20}c}
\mbox{right} &\vline & \mbox {left} \\
\hline
G &\vline & S \\ S &\vline & G \\ G &\vline & G \\ S &\vline & S \\
\end{array}$

Assuming that is a correct reading, we have eighteen different ‘weapon hands’ types.
You are going to select two different ‘hand-types’ for each different box; and each box has the capability of making four different robots.
Thus there are indeed $\left( {9!} \right)^4$ basic ‘body types’ without hands.
There are ${{18} \choose 2} = {153}$ ways to choose the ‘hand-types’ for any box.
So there are $\left( {9!} \right)^4 {{18} \choose 2} = {2653038560854230958080000}$ different possible boxes.
I suspect that is the number that you are after.

However, because each different box can produce four different robots there are 10612154243416923832320000 possible robots.

6. Wow. I wasn't expecting it to be that many. Thanks so much Plato!

Btw, the reason why I asked this is to help with the promotion of our video game. You see, I'm a video game designer from the Philippines and we just finished creating our first game called Bangu-Bang Mania!. In this game, players take control of robots and have the ability to change their parts. We were asked by a journalist one day how many possible robot combinations players can make but we didn't know the exact number. We realized then that marketing the number of possible combinations could help promote our game so I went here to ask for help.

You can see what the robots look like here btw: ViTAS Development

Oh and I have a few questions to ask Plato and I'll send them to you via PM.

7. Originally Posted by qcfx2a
the reason why I asked this is to help with the promotion of our video game. You see, I'm a video game designer from the Philippines and we just finished creating our first game called Bangu-Bang Mania!. In this game, players take control of robots and have the ability to change their parts. We were asked by a journalist one day how many possible robot combinations players can make but we didn't know the exact number. We realized then that marketing the number of possible combinations could help promote our game so I went here to ask for help.
I wish you had explained the question as you did above. Your going on about ‘boxes’ was confusing to me. Once I saw the website, I have a different take on the problem and a different answer.

As a player, I can build my own robot. There are nine different heads, nine different shoulders; nine different bodies, nine different legs, nine different backpacks from which I can choose one of each. Thus, there are $9^5 = 59049$ basic robots without hands that I can build.

Now this part is still not clear to me. Say that there are 18 different types hands from which I can select either two different ones or I can select two identical ones.
If I choose two different ones then there are $(18)(17) = 306$ additional ways that I can change up a basic robot.

Thus the maximum number of different robots that I could build is $(9^5 )(18)(17) = {\rm{18068994}}$.