#### Archived

This topic is now archived and is closed to further replies.

# 4x4x4 cube solution?

This topic is 5988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

if you have a 4x4x4 cube and you start in any given corner how many differnt routes (assuming only right/left/up/down movements and that each square is onnly accessed once) can be made? are there any c++ implemetations to generate such a thing and if nto hwo should one go about coding one?

##### Share on other sites
The solution is given by the number of leaves in the decision tree that corresponds to the decisions you can make at each successive step of the path through the cube.

You should be able to code that up fairly easily.

Cheers,

Timkin

##### Share on other sites
1. either you require all squares reached
or
2. can we pick the shortest path?

1. dunno yet
2. 144. to go thru all possible _shortest_ path in 4x4 square you need 4*(4-1)=12 passes? NxN square you need N*(N-1) passes
add third dimension (the same equa) and you have 12*12 = 144
but i guest it is not what you meant

greets
pet

##### Share on other sites
the shortest path i can figure out on my own, but what i need to know is how many paths can be made if you access each room once and then how to code some function that will generate one of those possible paths based on a string parameter.

1. 1
2. 2
Rutin
19
3. 3
khawk
15
4. 4
A4L
13
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633744
• Total Posts
3013658
×