# Input/Output Problem #4

See here for basic rules on problem.

Input/Output Problem #1

Problem #4

Make an optimal machine that accepts sequences of digits 1-3 that contain a 1,2,3 in each triple of numbers and has no repeating number. E.g accepts 123123, 132321 but rejects 121323, 123321.

• Why is 121323 rejected? Nov 14 '18 at 11:57
• Because the first triple "121" does not contain all 3 digits. Nov 14 '18 at 11:58
• Should 132321 be rejected as 323 does not contain 1? Nov 14 '18 at 12:01
• Hmm I think it wasn't worded well by me but by triple I mean first 3 numbers then next three numbers following that. Therefore 1st triple is "132" and 2nd triple is "321" Nov 14 '18 at 12:03
• Then why is 123321 rejected? thanks! Nov 14 '18 at 12:06

It seems that the solutions being considered optimal are the ones with the fewest numbers of nodes.

Solution using only 8 nodes below (Thrown together quickly on paint, sorry):

• This machine allows for 123321 which is rejected by definition of the puzzle. Nov 15 '18 at 9:47
• Huhn, I just realized it says it rejects 123321 in the examples, but seems to have absolutely no reason as to why it should (And I got answer checkmark), I'll ask OP. Nov 15 '18 at 12:09
• It says it should have "no repeating number". It looks to me like OP is not in the possession of the right solution. :) Nov 15 '18 at 12:12
• Yeah, I assumed it just meant no number repeats within a triple, with no absolutely no regard from one triple to another Nov 15 '18 at 12:48