Exercise: Rock, paper, scissors
Let \(A = \{R,P,S\}\), representing rock, paper, stone, respectively. Juxtaposition of two elements of \(A\) is the function \(f\) for “fight” with type \(A\times A\mapsto A\) working according to the universal rules of the game, with one exception: when there is a tie the fight is not repeated, but one of the elements wins, e.g. \(xx\) is evaluated to \(x\). Given that fights associate to left, state the winner of the following:
- \( RR(RP)R \)
- \( RSPPSR \)
- \( PS(PSR)(P(SR)) \)