22.04.2014 Views

Lecture 3

Lecture 3

Lecture 3

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Proving a Language is Regular<br />

Method 2<br />

Describe a FA for it<br />

Example L = {w | w∊(0..F)*, hex number w is<br />

divisible by 479}<br />

M has 480 states q1..q480<br />

qn corresponds to “The string so far is a binary number congruent to n mod 479”<br />

Except q480 corresponds to congruence to 0<br />

δ(qi,0) = qj iff j ≡ 16i mod 479<br />

Now convince<br />

δ(qi,1) = qj iff j ≡ 16i+1 mod 479...<br />

δ(qi,F) = me L = L(M)<br />

qj iff j ≡ 16i+15 mod 479<br />

Start state q0 has δ(q0,0) = q481, δ(q0,i) = qi<br />

Accept states q481 and q480<br />

Friday, February 8, 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!