Library

DFA · Regular

A gene, start codon to stop codon

Is this read one open reading frame? It must begin with ATG, continue in whole codons none of which is a stop, and end on TAA, TAG or TGA. Inside the frame the machine counts bases mod 3, and only watches for T, TA and TG — the beginnings of a stop codon.

startAATframeTxTATGxxstopATGTA, C, GAGC, TA, C, G, TA, C, G, TA, GC, TAC, G, T
The machine as drawn — 10 states, 27 transitions.

The author’s examples, run

ATGTAA → acceptATGGCATTCTGA → acceptATGTCATAG → acceptATGTAAGCATAA → rejectATGGCTAA → rejectATCTAA → rejectATGGCA → reject