3D Cube Possible Combinations

Discussion in 'Other Advanced Math' started by Davey1971, Aug 7, 2021.

  1. Davey1971

    Davey1971

    Joined:
    Aug 7, 2021
    Messages:
    2
    Likes Received:
    0
    Hello,

    Sorry I wasn't sure what type of a math question this was, so I just posted in this forum.

    Imagine I am creating a matrix of 3D cubes which has 2 rows, 2 columns and is 2 columns deep. There are 8 Possible cube positions.
    See the first screen shot, this is all 8 cubes visible.

    Each cube can either have the number 1 or the number 2

    I want to calculate how many possible combinations of the 8 cubes with each cube either have the number 1 or the number 2.

    I would like to know the equation to figure the total combinations.
    This equation would have to allow for increased rows, columns and depths.

    I might have a matrix that is 10 rows, 10 columns and 10 deep

    Examples
    for the first cube position, there are 2 possibilities
    1
    2

    if I use 2 cube positions, I would have 8 possible combinations
    1 - 0
    1 - 1
    1 - 2
    2 - 0
    2 - 1
    2 - 2
    0 - 1
    0 - 2


    All.jpg

    some.jpg


    Thank you
     
    Davey1971, Aug 7, 2021
    #1
    1. Advertisements

  2. Davey1971

    Alexander4444

    Joined:
    Oct 10, 2021
    Messages:
    2
    Likes Received:
    1
    Hi - so the category of your question would be "combinatorics" which is most related to this forum's "probability and statistics" sub-forum.

    That these 3D cubes are arranged in a cube is not necessary for finding a formula. What we need is the total number of 3D cubes, which when you take the product of the length, width, and depth of your cubes' arrangement, is the number we will be working with. For your example, you use 2*2*2 = 8 3D cubes. The formula we create will be expandable to any number of cubes.

    Now, in your examples section you do something unique that needs to be resolved - Do you OR do you not count '0' as a possible outcome of any of the 8 cubes? Let me revise your examples as if '0' is allowed as a possible outcome.

    "
    for the first cube position, there are 3 possibilities
    0
    1
    2


    if I use 2 cube positions, I would have 9 possible combinations
    1 - 0
    1 - 1
    1 - 2
    2 - 0
    2 - 1
    2 - 2
    0 - 0
    0 - 1
    0 - 2
    "

    I bring this nuance up because in your example involving 2 cube positions, you included some 0's as if that was a possible outcome on any one of the 8 cubes.

    If you do NOT allow 0's as a possible outcome, your examples would be written as


    "
    for the first cube position, there are 2 possibilities
    1
    2


    if I use 2 cube positions, I would have 4 possible combinations
    1 - 1
    1 - 2
    2 - 1
    2 - 2
    "

    In summary, if you allow '0s' to be counted, you have 3 possibilities for each cube.
    If you don't allow '0s' to be counted, you have just 2 possibilities for each cube.

    Let's assume you are allowing '0' as a possible outcome for any given cube position and go from there.

    =====================================
    Counting the Possibilities:

    For the 1st cube in the set of 8, you have (0,1,2) -> 3 possibilities
    For the 2nd cube in the set of 8, you have (0,1,2) -> 3 possibilities
    For the 3rd cube in the set of 8, you have (0,1,2) -> 3 possibilities
    ...
    For the 8th cube in the set of 8, you have (0,1,2) -> 3 possibilities

    Ah ha! So by simply observing that each cube in the set of 8 can produce 1 of 3 different outcomes, namely '0' '1' or '2' we know that there are 3*3*3*3*3*3*3*3 = 3^8 = 6,561 possibles outcomes or 'states' when considering those 8 cubes. 3^8 is read as "3 to the power of 8" and just means to multiply 3 by itself 8 times.

    6,561 is a lot of possibilities!

    But what if you change the number of cubes?

    Instead of 8, maybe 27.


    What if you change the size of the set of things that could appear on any of those cubes?

    In other words, maybe you want more than just '0' '1' or '2' to be a possible outcome on any given cube. Maybe you want '4' '9' 'yes' 'no' or 'maybe'. In this made up set of possible outcomes, you would be dealing with 5 possible outcomes instead of your original 3.

    =====================================
    We are going to find a general formula now.

    First, find the total number of 3D cubes you will be using by using the product of length*width*height.
    Let's call this number C (for cubes)

    C = length* width* height

    Now, ask how many outcomes each cube can have. '0' '1' or '2' equates to 3 possible outcomes but for whatever you choose, you need to count those possible outcomes. Let's call this number of possible outcomes P (for possibilities)

    And here is the general formula:

    P^C = total number of combinations

    "P to the power of C is the total number of combinations."

    =====================================
    An example using the general formula;

    If your matrix of cubes 3D cubes has 4 rows, 4 columns, and 6 columns deep, we then know C is

    C = 4*4*6 = 84

    If each cube can have a '1' or a '2' as a possible outcome (no '0' this time), then we know P = 2 because there are 2 possibilities for each cube.

    Therefore, the total number of combinations is simply,

    P^C = 2^84 = about 19,000,000,000,000,000,000,000,000

    That's a ridiculous number of combinations!
     
    Alexander4444, Oct 10, 2021
    #2
    1. Advertisements

  3. Davey1971

    Davey1971

    Joined:
    Aug 7, 2021
    Messages:
    2
    Likes Received:
    0
    Hello,

    I use "0" as a possible outcome because the cube may appear or may not appear. If the cube is visible, then it would have a number of "1" or "2", but if it is not visible I would consider that a "0". so in my example of 2*2*2, any one of those cubes may or may not be visible. There has to be at least 1 cube visible though.

    Your calculation "P^C = total number of combinations" is perfect.
    the only thing I need to do is add "-1", as there always needs to be at least 1 cube visible

    I tested this calculation in excel using a small set
    C = 2*2*1
    C = 4

    P=3 // (0, 1, 2)

    (3^4) - 1 = 80

    I then created a sheet with all the possible combinations, and it was 80.

    I can see now that using more cubes or higher possibilities becomes a ridiculously large.

    Thank you very much for your help.
     
    Davey1971, Oct 14, 2021
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.