See here for basic rules on problem.

Input/Output Problem #1

Problem #3

Make a machine that accepts sequences of digits from 1-4 that have a product that is a square number.

  • $\begingroup$ can we declare variables? $\endgroup$ – Omega Krypton Nov 14 '18 at 12:00
  • $\begingroup$ What sort of variables are you after? $\endgroup$ – Ben Franks Nov 14 '18 at 12:08
  • $\begingroup$ boolean, integer $\endgroup$ – Omega Krypton Nov 14 '18 at 12:09
  • $\begingroup$ @OmegaKrypton Yes they are integers. $\endgroup$ – Ben Franks Nov 14 '18 at 12:21
  • $\begingroup$ I mean declare a variable to check the occurrences of 1, 2, 3, and 4, to see if it should be accepted. Functions like increase a variable by 1 will be in each of the nodes. can we do so? $\endgroup$ – Omega Krypton Nov 14 '18 at 12:22

I think this works...

Just keep track that we have an even number of both prime divisors (2 and 3).

enter image description here

  • 2
    $\begingroup$ damn you were faster than me, I was making a nice graphic ... $\endgroup$ – Nicolai Nov 14 '18 at 12:24

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.