Archived

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

4x4x4 cube solution?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites