4
$\begingroup$

See here for basic rules on problem.

Input/Output Problem #1

Problem #7

Make an optimal machine that accepts sequences of integer digits 1-4 such that each triplet contains three different numbers. Accepted examples; 123124234, 231123. Rejected example; 122341

You do not need a route for failed sequences.

$\endgroup$
  • 1
    $\begingroup$ Welcome to Puzzling. Can you please tell the source of these 'puzzles'? Are these your homework? $\endgroup$ – ABcDexter Nov 14 '18 at 17:50
3
$\begingroup$

I think beemaad's solution is optimal if the solution has to be deterministic. However, since the rules state that we can have multiple possible transitions from a given state for the same input, we can get this one down to 9 states.

enter image description here

$\endgroup$
  • $\begingroup$ Looks reasonable to me. $\endgroup$ – beemaad Nov 15 '18 at 12:04
  • $\begingroup$ Was what I was looking for +1 $\endgroup$ – Ben Franks Nov 15 '18 at 14:55
5
$\begingroup$

Assuming, the empty sequence gets accepted, this should work:

The machine can be simplified by accumulating the sequences 12 and 21, 13 and 31, etc. Input/Output

$\endgroup$
  • $\begingroup$ Nice answer +1. $\endgroup$ – Ben Franks Nov 14 '18 at 14:19
  • 1
    $\begingroup$ You're really into this beemaad :) $\endgroup$ – user52327 Nov 14 '18 at 14:19
  • $\begingroup$ Can you optimise this further? $\endgroup$ – Ben Franks Nov 15 '18 at 0:18

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.