%%%%%%%%%%%%%%%%%%%%%%%%%%%% Rotations to pqr Reflections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % ROT2PQR % Usage: ROT2REF(w) % % Inputs: w - a word in a,b,c % % Output: change a word of rotations to word of reflections in pqr % according to this substitution table % a -> pq, b ->qr, c ->rp % A=a^(-1) -> qp, B=b^(-1) -> rq, C=c^(-1) -> pr function y = rot2ref(w) y = []; for x=w switch x case 'a' y =[y 'pq']; case 'b' y =[y 'qr']; case 'c' y =[y 'rp']; case 'A' y =[y 'qp']; case 'B' y =[y 'rq']; case 'C' y =[y 'pr']; end end