Saturday, April 22, 2017

mathematics - Input/Output Problem #1


The basis for this problem is that you did to make an optimal pattern so that all inputted sequences will be "accepted" if they fit the rules of the problem and "rejected" if they break any of them.



.


Above are some examples of functions that can be performed. (A) shows a machine that will only accept the sequences that repeat 12 as you must begin at start and end on a red dot.


In (B) the "*" means you can pass along that route without an input there. So (B) accepts 1111122222, 22222, 1122 etc but doesn't accept any sequence in which there is a 1 after the 2.


In (C) you can move along either route to reach an end. So 12222 and 1333 are both accepted sequences.


All routes have to be either single digit or single letter. Obviously shorthand like "odd", "even" can be used in answers rather than drawing loads of arrows.




Problem #1


Make an optimal machine using digits 0-9 that only accepts sequences where the digits sum are even and rejects if they are odd.



Answer



Would this work?




Left part is "odd", right part is "even".

enter image description here



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...