• Welcome to SpeedSolving.com — the world’s largest puzzle community!

    You’re currently browsing as a guest, which means you have limited access to discussions, resources, member profiles, and community features.

    Join 50,000+ cubers and puzzle enthusiasts from around the world to ask questions, share solves, improve faster, and be part of the community.

    Registration is free, fast, and easy — create your account today.

    Already a member? Log in here to hide this message and start participating.

Challenge: What does this algorithm mean?

Status
Not open for further replies.
Clarification:
n= pieces per row
What does t equal?
This algorithm can be used to find _________ of any cube with equal dimensions (2x2x2, 3x3x3, etc.).

Sorry, should have been t=(n2*2)+(((n*2)+((n-2)*2)))*(n-2))
I will edit the main post.
 
Last edited by a moderator:
Thank you for simplifying it, good job finding the answer.
Also thank you for pointing out that it is a formula.

Got it right! A simpler one is:
t = n*3-((n-2)*3)
So, for a 5x5 cube:
t = 5*3-(3*3) = 125-27 = 98
How does the simplified version work?
 
Last edited by a moderator:
...A simpler one is:
t = n*3-((n-2)*3)
So, for a 5x5 cube:
t = 5*3-(3*3) = 125-27 = 98

How does the simplified version work?

n x n x n finds out the volume of the whole cube. But, the volume where the core is wouldn't count. So, you do (n-2) x (n-2) x (n-2) to find the volume that wouldn't count. The -2 is because of the top and bottom layers that you want to keep. Then, you take that from the complete volume to get the amount of cubies.
 
n x n x n finds out the volume of the whole cube. But, the volume where the core is wouldn't count. So, you do (n-2) x (n-2) x (n-2) to find the volume that wouldn't count. The -2 is because of the top and bottom layers that you want to keep. Then, you take that from the complete volume to get the amount of cubies.

Wouldn't that be t=n^3-((n-2)^3)
 
I put =(n^3)-((n-2)^3) into Excel, and put n=1, and got that it has 2 cubelets! I put 1-17 in and here's the amount of cubies for each n x n x n cube:
n (Layers) - Cubelets
1 - 2
2 - 8
3 - 26
4 - 56
5 - 98
6 - 152
7 - 218
8 - 296
9 - 386
10 - 488
11 - 602
12 - 728
13 - 866
14 - 1016
15 - 1178
16 - 1352
17 - 1538
 
Last edited:
I put =(n^3)-((n-2)*3) into Excel, and put n=1, and got that it has 2 cubelets! I put 1-17 in and here's the amount of cubies for each n x n x n cube:
n (Layers) - Cubelets
1 - 2
2 - 8
3 - 26
4 - 56
5 - 98
6 - 152
7 - 218
8 - 296
9 - 386
10 - 488
11 - 602
12 - 728
13 - 866
14 - 1016
15 - 1178
16 - 1352
17 - 1538

It came out as 2 because it determines how many units are in a cube. There is only 1 cubie, so it is not a cube. Also there is no empty space which is accounted for in the formula.
 
It came out as 2 because it determines how many units are in a cube. There is only 1 cubie, so it is not a cube. Also there is no empty space which is accounted for in the formula.

But it's a cube, isn't it? It just isn't a twisty puzzle. Anyone interested in checking the 17x17x17 number with an actual 17x17x17 cube?
 
Yes but there is no internal void, and like I said, the formula compensates for an internal void.

Let's break the formula up.
t = (n^3)-((n-2)^3)
n = 1

1^3=1

1-2=-1
-1^3=-1

1- -1 = 1+1 = 2

The 2 is because of the n-2 bit; you get a negative number. A negative number to the power of an odd number gives another negative number. Subtracting a negative number is the equivalent of adding a positive number.
 
Am I missing something? Why multiplication?

((N^3)-((N-2)^3) Should be fine.
 
Status
Not open for further replies.
Back
Top