Identity sequences on the Rubik's Cube
Haskell, 263 261 247 243 characters

c[x]=[x]
c(x:"2")=[x,x]
c(x:_)=[x,x,x]
s!a@[x,y,z]=case s of
 'R'|x&gt;0-&gt;[x,-z,y]
 'B'|y&gt;0-&gt;[z,y,-x]
 'U'|z&gt;0-&gt;[-y,x,z]
 'L'|x&lt;0-&gt;[x,z,-y]
 'F'|y&lt;0-&gt;[-z,y,x]
 'D'|z&lt;0-&gt;[y,-x,z]
 _-&gt;a
r=[-2..2]
i=mapM id[r,r,r]
f w=i==foldr(map.(!))i(c=&lt;&lt;words w)


Rather straightworward algorithm; each cubelet is made out of 1,2,4 or 8 chunks encoding its position and orientation; 4 chunks per edge cubelet, 8 per corner cubelet, 7 cubelets are stationary.

c chomps each word of the input into a sequence of CW turns, and ! sends each chunk according to a turn. i is the identity position. f is the main function.

I'm not too happy with the chomp function, but I can't seem to find a way to shorten it either (@Nimi did, however)