4
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Why is 121323 rejected? $\endgroup$ – Greg Nov 14 '18 at 11:57
  • $\begingroup$ Because the first triple "121" does not contain all 3 digits. $\endgroup$ – Ben Franks Nov 14 '18 at 11:58
  • $\begingroup$ Should 132321 be rejected as 323 does not contain 1? $\endgroup$ – Omega Krypton Nov 14 '18 at 12:01
  • $\begingroup$ 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" $\endgroup$ – Ben Franks Nov 14 '18 at 12:03
  • $\begingroup$ Then why is 123321 rejected? thanks! $\endgroup$ – Omega Krypton Nov 14 '18 at 12:06
2
$\begingroup$

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):

8 Node Solution

$\endgroup$
  • $\begingroup$ This machine allows for 123321 which is rejected by definition of the puzzle. $\endgroup$ – beemaad Nov 15 '18 at 9:47
  • $\begingroup$ 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. $\endgroup$ – Evan Capstick Nov 15 '18 at 12:09
  • $\begingroup$ It says it should have "no repeating number". It looks to me like OP is not in the possession of the right solution. :) $\endgroup$ – beemaad Nov 15 '18 at 12:12
  • $\begingroup$ Yeah, I assumed it just meant no number repeats within a triple, with no absolutely no regard from one triple to another $\endgroup$ – Evan Capstick Nov 15 '18 at 12:48
5
$\begingroup$

Answer

Optimized I/O machine

I/O machine

Non-optimized version

I think this should work for the I/O machine

Input/Output

$\endgroup$
  • $\begingroup$ I think this needs an additional arrow with 2 from the middle red dot straight left. $\endgroup$ – Paul Palmpje Nov 14 '18 at 16:03
  • $\begingroup$ @PaulPalmpje Then you would have a repeating set of 2s, for example 1322..., which is rejected by definition of the puzzle. $\endgroup$ – beemaad Nov 14 '18 at 16:06
  • $\begingroup$ Don't think so. What happens if you're in the middle red dot state and a 2 appears? That is not valid anymore? You're at the end of a triplet so any new valid triplet should lead you to a new end state. What happens if the first new value is a 2? It should go to the same location as a startin ginput of 2. Wait sorry, I overlooked the repeating digit constraint. $\endgroup$ – Paul Palmpje Nov 14 '18 at 16:10
  • $\begingroup$ Can you see a way to optimise this more. $\endgroup$ – Ben Franks Nov 15 '18 at 0:17
  • $\begingroup$ Wouldn't an empty input be valid too? In that case the start node should also be red. $\endgroup$ – Kruga Nov 16 '18 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.