40 likes | 328 Views
ASSIGNMENT QUESTIONS. Naveen Z Quazilbash. Exercise : Give a DFA accepting the following language over the alphabet {0, 1}: The set of all strings whose tenth symbol from the right is a 1. Proof . Main Idea: The states of the machine track the last 10 symbols read by the machine.
E N D
ASSIGNMENT QUESTIONS Naveen Z Quazilbash
Exercise : Give a DFA accepting the following language over the alphabet{0, 1}: The set of all strings whose tenth symbol from the right is a 1. Proof. Main Idea: The states of the machine track the last 10 symbols read by the machine. Q = {x1x2 . . . xn | 0 ≤ n ≤ 10, and xi ∈ {0, 1} for all i ∈ {1, . . .n}} q0 = ε (the empty string) Σ = {0, 1} F(the accepting states) = {1x2 . . . x10 | xi ∈ {0, 1} for all i ∈ {2, . . . 10}} δ(x1x2 . . . xn, y) = x1x2 . . . xnyif n < 10 x2 . . . xny if n = 10
Set of strings that either begin or end (or both) with 01 • A first path starting with 01 and then ending in sigma*(covers the case which both being • and end), and then the strings that do not start with 01 must end with 01.