# Combinatorics for a 3-d rotating automaton

• Let's suppose that we have some kind of special 3-dimensional rotating automaton.

The automaton is capable to generate rotation about selected $X$ or $Y$ or $Z$ axis (in a current frame) in steps by only constant +$\dfrac{\pi}{6}$ angle (i.e. rotation can be generated only in one direction - reverse rotation is prohibited) so transition from matrix $R_{i-1}$ to $R_{i}$ (right-lower indices denote here states before and after a single step) is achieved with the use of formula:

$R_{i}=Rot_{x,y,z}( \dfrac{\pi}{6})R_{i-1}$

Initial state is coded as the identity matrix $R_0=I$, all other states are described as rotation matrices in reference to the frame representing by this $I$ matrix.

Questions:

• how many $n$ distinct states (coded in generated matrices) can be achieved for not limited number of steps. This full set of achievable states coded $\{^{1}R ,^{2}R ...{^{n}R} \}$ might be named to be a full space of rotating automaton (here left-upper indices should be somehow reasonably organized, but hard to say how - it's open issue) - all states and transitions between states can be, perhaps, visualized with the use of a graph
• how many distinct states can be generated by exactly $6$ steps in the automaton (...maybe there is a general formula for $n$ steps ?)

• by how many ways can be achieved multi-step rotation from $I$ to $I$ with the condition that on this trajectory of states the same one step transition ${^{j}R}{\rightarrow}{^{k}R}$ (if possible) is allowed only one time.
(for example if it were only rotation about a single axis allowed - the number would be obviously $3$ i.e. three 12-step transitions, but in general case rotations about different axes can be mixed)

• The bounty expires in 5 hours. So far there is no answer so I suppose the problem is more difficult than I was thinking. If the answer is impossible with these conditions I will ask a new question with maybe less demanding conditions in the nearest future.. – Widawensen Jan 23 '17 at 11:18
• However it is the most important for me to know a methodology for these class of problems i.e. how to use geometrical constraints in the analysis of the space of states and transitions between these states for similar devices like described in the question. The automaton can be based on some robotic mechanism - maybe someone knows at least papers which tackle this problem. – Widawensen Jan 23 '17 at 11:25

Note: this is a barely-better-than-nothing answer!

1. How many different positions can be generated given an unlimited number of steps? The answer is: an infinite number of positions. I believe I have a proof, but it appears long and involved and full of potential pitfalls. But the essence lies in the impossibility of having a closed curve on the sphere if you alternate between a $\pi/6$ rotation along one axis, a rotation along a second axis, the "reverse" of the first (which you obtain with $11$ steps in the other direction) and the "reverse" of the second: think "up", "left", "down", "right". I believe anyone reasonably well-versed in spherical trigonometry should be able to show this. In fact, I believe one can prove that, even if one can use only $2$ of the admissible rotations, and actually for any "step" that is an angle other than an integer multiple of $\pi/2$, for any final $R$ and any arbitrarily small $\epsilon$ there is a sequence of rotations that brings the robot to some $R'$ such that the maximum difference between any element of $R$ and $R'$ is less than $\epsilon$.

2. How many distinct positions can you generate with $6$ steps? Clearly no more than $3^6$. I believe that it's actually $3^6-3$, since based on the same arguments of point $1$ above the only possibility of ending up in the same position with a sequence of $6$ steps is to take two different sequences each resulting in a $\pi/2$ rotation (so, $3$ identical steps, followed by $3$ identical steps). Out of the $9$ possible cases, $3$ (with "identical" subsequences) lead to distinct positions, the remaining $6$ lead form $3$ pairs that lead to $3$ distinct positions.

3. "By how many ways can be achieved multi-step rotation...?" I am not sure I understand the question correctly, but I believe that the answer is infinite, based on $1$. The idea is this: assume a "generalized move" $R$ is a sequence of $s$ identical rotation steps around the same axis, with $1\leq s \leq 11$. Denote by $-R$ the "reverse" of $R$, a sequence of $12-s$ identical steps around the same axis: obviously applying first $R$ and then $-R$ brings you back to the starting position without ever being in the same state twice in-between. Now assume you can reach from I a position R, and consider a sequence of generalized moves $R_1,...,R_n$ that is "minimal", i.e. there is no shorter sequence of generalized moves from I to R. Then the sequence $R_1,...,R_n,-R_n,...,-R_1$, brings you back to $I$, and never performs the same sequence of rotations between two identical positions twice.

Note: I've abstracted and generalized questions 1 and 3 in the related set of questions that you can find here!

• Thank you for tackling the problem but for 1. I have a different intuition - I suppose it is a finite number of states, although I think so supported only by the case of rotations by $\pi/2$ where it is exactly 24 states. However I don't exclude that for $\pi/6$ is a different story.. – Widawensen Jan 23 '17 at 14:59
• I'm actually fairly sure that you can't achieve a finite number states, unless you limit yourself to what is effectively "$\pi/2$ moves". The idea is that if you try to move forward by $x$, turn 90 degrees to the right, move forward by $x$, turn again ... etc. something which on the plane would form a square and bring you back to the starting point, here does not work and brings you back to a point that has a very "irrational" set of coordinates compared to the first. – Anonymous Jan 23 '17 at 15:09
• for 3. if you are right for 1. it is possible that this generates also infinite number of transitions but remember that in described kind of automaton a reverse rotation is prohibited ( it was in conditions of the task), reversing the movement can be made but somehow differently. – Widawensen Jan 23 '17 at 15:10
• Note that I described that a "reverse" is really a "go forward until you are back to the same point", which seemed allowed! – Anonymous Jan 23 '17 at 15:13
• Now I'm voting for the infinite number of states too :) This is the result of my simulation: cloud.sagemath.com/projects/… . Instead of matrices I've considered respective quaternions and did random walk using them. The first component of unit quaternion corresponds to rotation angle and other three define the rotation axis. I wanted to check what is the distribution of rotation angles along this random walk. Well, if in case of $\theta = \frac{\pi}{2}$ we see discrete set of values, other cases certainly not like this one. – Evgeny Jan 24 '17 at 20:14