Input/Output Problem #5

See here for basic rules on problem.

Input/Output Problem #1

Problem #5

Make an optimal machine that accepts sequences of Rock Paper Scissors games where first input is Player 1 and second input is Player 2 etc and all the outcomes of the games are the same. E.g. The following are acceptable sequences; RPPSSR, RRPP.

You do not need a route for failed sequences.

• What? ... we shall just make a machine which accepts RPPSSR and RRPP and nothing else? – user52327 Nov 14 '18 at 12:18
• @Jannis No sorry not sure why I had that typed in, just confusing. They are purely 2 examples of acceptable sequences. – Ben Franks Nov 14 '18 at 12:22
• so we should make a line of rings to check the input if it's either RPPSSR or RRPP and thats it? – user52327 Nov 14 '18 at 12:24
• What about the empty sequence? – deep thought Nov 14 '18 at 21:44

13 states. This one accepts an empty sequence... Not sure if that was allowed or not?

Using initial transitions with no input.

• If you want to disallow the empty sequence, I think you can still do it with the same number of nodes, but with more arrows. Just replace the three arrows from the starting node you have now with nine arrows going to all the non-ending nodes, and label the arrows with the appropriate first move. – Jaap Scherphuis Nov 16 '18 at 14:46
• @JaapScherphuis Nice! Hadn't thought of that. – jafe Nov 16 '18 at 14:54
• What Jaap said was the intended answer. Well done you guys. – Ben Franks Nov 19 '18 at 8:15

I added some colored boxed to guide the eye. They are not part of the machine. I think this one should do it

• Can you find a way to optimise this further. – Ben Franks Nov 15 '18 at 0:17
• Possibly relevant: (1) you are allowed "branching paths", see example C in the Input/Output #1 post. (2) I'm not sure if the empty sequence was supposed to be included. – deep thought Nov 15 '18 at 20:26

Is this allowed? (The commas are shorthand for parallel arrows, or a logical OR, if you please.)

• You have combined two elements into one. Each Player action needs to go to a point. – Ben Franks Nov 14 '18 at 12:55