Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
When I implemented this for a code golf challenge, the state had to encode not only the vertex you were at but the edge by which you had entered (or, equivalently, the direction in which you were f...
Answer
#1: Initial revision
When I implemented this for a code golf challenge, the state had to encode not only the vertex you were at but the edge by which you had entered (or, equivalently, the direction in which you were facing) so that you could choose "left", "right", or "back" as the exit to use. Thus the state is effectively an element of the [symmetry group of the icosahedron](http://en.wikipedia.org/wiki/Icosahedral_symmetry), which is isomorphic to the [alternating group on 5 letters, $A_5$](https://groupprops.subwiki.org/wiki/Alternating_group:A5). I used elements of $A_5$ directly, but you could use the standard presentation <a, b | a^2 = b^3 = (ab)^5 = 1>