I's 43,252,003,274,489,856,000 diffrent scrambles, right? We use a scramble genarator to randomly select one of them. But will we get any of them? I'm not so sure.
Edit: After replying to bundat below, I realized that I didn't properly read the original posting. The OP was talking about the limited number of seeds available, but seeding before every random sequence generated would be silly. Anyway, I'll leave the rest of my post here, but predicate that now it's just a discussion of a point that isn't actually on topic.
If we were had every possible position of the cube precalculated and numbered 1 through 43,252,003,274,489,856,000 and then used a random number generator to pick one of them, then, no you wouldn't get all of them, because it only selects from the first 2^32 scrambles, because your proposed PRNG only generates numbers from 0 to 2^32 - 1.
However, that's not how it works. We're generating moves that result in a scramble, not picking from a list of scrambles. If I have a random number generator that generates integers from 0 to 9, I can still generate random numbers larger than 9 simply by concatenating a sequence of random digits together. i.e. if I want a number between 1 and a billion, then I just generate 6 random digits and stick them together so it forms a 6 digit number and that number will be from 0 to 999,999. In fact I can generate an arbitrarily large number using random 1's and 0's by interpreting that string of digits as a binary number.
In the case of the cube we're generating 25 random face turns. We don't even need a random number from zero to a billion, we just need a random number from 1 to 6 to pick a face, then another number from 1 to 3 to pick a +1 +2 or +3 rotation. Add some logic to prevent picking the same face twice and some more to avoid simple sets of moves than cancel each other out and you have a scramble generator.
Here's one I wrote in python:
Code:
def randomtwist():
from random import choice, random
axes = 'xyz'
faces = { 'x': ( 'L', 'R' ),
'y': ( 'U', 'D' ),
'z': ( 'F', 'B' ) }
directions = ( "", "'", "2" )
axis = ""
last = ""
while True:
while axis == last:
axis, direction = choice( axes ), choice( directions )
face = choice( faces[axis] )
last = axis
yield face + direction
def scramble( count=25 ):
from random import randint
for twist in randomtwist():
seq.append( twist )
if len( seq ) > count: break
return " ".join( seq )
I'm not using anywhere near the full range of the random number generator, I'm selecting from a list of 3, then a list of 2, then a list of 3, so essentially I'm generating a random number from 1 to 18. But I certainly generate more than 18 different cube positions.
Does that make sense?
Now, given that it has been proven that any scramble can be solved in 24 moves (and I think that has been reduced to 23), will a random selection of 25 face turns result in covering the entire set of 43 quadrillion possible states? That is debatable. Given a set of face turns, the first will take you away from the solved state, and any of the 15 possible next face turns (excluding turns of the same face) will take you further away from the solved state, and that continues for some number of turns. However, you can quickly reach a state where another turn will actually bring you closer to a solved state than you were at or keep you the same distance from solved.
In fact, if we say for the sake of argument that the maximum length of "God's algorithm" is N, then if your cube is in a state where N is the minimum number of turns that is required to solve it, then
any face turn you make is more likely to bring you closer to solved than leave you N turns from solved. In any sufficiently scrambled state (i.e. min number of face turns to solve is n) there will exist a partitioning of the set of face turns such that one subset will make the cube more scrambled (min face turns to solve = n+1), one subset will leave the cube in the same "scrambledness" (min face turns to solve remains n) or will actually bring the cube closer to being solved (turns to solve = n-1). And it easy easy to see that in any state other than solved, the number of face turns that brings the cube closer to being solved is at least 1.
So, lets say we generate a random scramble of M face turns and define N to be the maximum length of an optimal solution to any given cube state. If M < N, then we *definitely* cannot generate every possible cube state. If M = N, then it would be possible to reach every possible state, but only if you never generated a face turn that either brought you closer to solved or kept you the same distance from solved. For M > N we have to revert to statistics and probability.
Imagine all 43 quadrillion states of the cube laid out as nodes on a connected graph with solved in the center, and the nodes of the graph are organized into concentric circles numbered outward from the center from 1 to N such that all if a cube's state node lies on a circle O (for "Order of the scramble), then O is the length of the optimal solution to that state. Finally, each state node on the graph is connected to 18 other nodes with each of the 18 connections corresponding to each of the 18 possible face turns of the cube.
Starting at the center and choosing a random face turn and following the corresponding connection will take you to a different node on the graph. Repeating that operation at the new node will take you to another node, with a 1 in 18 chance of taking you back to solved. If you imagine generating a list of random moves and following that list of moves through the graph, then it become very analogous to a problem statisticians call a "random walk" with restricted states and a maximum distance from the starting point. I can't imagine I'm the first one to imagine this, I bet it's called a "constrained random walk", maybe I'll google it.
A good statistician may be able to tell you the optimal M > N so that you are reasonably sure to get near maximal scrambledness, but I am not that statistician. I imagine the interconnectedness of the graph is such that for some values of O you are more likely to move towards solved than away (O = N being the obvious example) and, for some values of O you are more likely to move away from solved (at 0 = 1 only 1 in 18 face turns brings you back to solved). I envision there is a band of circles that have a certain stability in that their interconnectedness such that, once you get within that band, you are most likely to remain there, no matter how many moves you make. If you get too close to solved the connections between nodes are more likely to move you toward scrambled and as you move too far away from solved, you're more likely to move randomly back closer to it.
But, none of you were arguing that, you seemed stuck on the whole "we're only generating 8 billion possible positions because that's the range of our PRNG", which is a patently invalid argument.