Theory of Computation 1 4 Regular Languages II Nov Free Languages 15 Nov Context Decidability 22 Nov 1 MY Nov Undecidability 29 unsolvable problems There are uncountable may countably many possible problems possible algos what is a computer T'tp tcompu L O outputs inputs I Restrict input I 0110100 multiplexing IO 0 II input 2 Io input Jt 44 Can assume I single input one bit of output 2 of state charges instruction Cpu system possibly Assumptions a fixed internal memory machine stops done reading input bi once in some state C Machine starts State names Example fy wide circle I 1 is a t state start stoles stole a Example transitions O only input 00 tension Example o Every state E na est Iff't fo accept ufI www.oiIS has I accept lion empty string possible tryinputs C A Deterministic Finite Automaton DFA following attributes has the I Q finite set of States input alphabet 2 Ei finite the stat state 3 Co E Q states set of final 4 F E Q transition function 5 S is a total 8 Q X E Q function f every possible to statelinput pair state we what are in read is defined Define formally co_ Q 90,91 92,933 8 20,13 Iff't Iff't go F Eo 9 92 0 Transition Table 91 90 gIµ 97 90 92 93 93 I 92 I 91 Defs DFA M on input w computation of of slates visited sequence repeat states can if a computation is accepting is in F last state a language is a set of strings can be infinite finite or language if it is the a language is regular of Sony DFA I that computation set of strings have on accepting over I all strings L E soit's length I havingodd Lis regular Ex over 83 E all strings regular 29197 hors empty set rain g chars Ei't Ee in a nonempty all strings Set Operations languages reg on of languages be a set Let under operation C is closed in C Say to languages is in C that if applying in a language results Operations Li Lz be langs Regular X EL or X EL L U Lz X union L L Lz Concatenation xz XE Li z E Lz e star Ll L o Io U Lik I 1013 KIO K OI 010 L 40 43 Iot 101013 K I Lik L l I L be a language Complement t E L I in not string every in L under complement Regular tongs closed Then I O Union O II it 9091919 4 ro ro ri ro Lz I under union closed Thor Rhs are machines at the both Idea simulate same time A no sets of state product Earles intersection what about L n LE I ULT laws I De Morgan's construction 2 Do the product states and change final Concatenation Lz X E 4 X E X Z L Lz where is He split f Wn W Wz we Wi Witi E Lz C 4 Automaton NFA Nondeterministic Finite transitions from any state of any no character if taker E transition Is Edina iii it it so we will accept a final state can be anything of comps REo nea E Concatenation Str Ezo relationship between Understand NFAs t D FA s Fvery DFA is an NFA NFA a is a non re 9g9z equivalent to DFA s Thai NFAs are language DFAs NFAs accept a a string it computes provide not says accept or number of 0 Is in w WE o 13 of IO s in w number Ftjescribe a language precisely Regular Expression alphabet be an Let one Ri Reggae R is expression A regular of the following y y R V R2 4 R I R 0 Re R R2 Z R E 5 t R Ri Rea a c Ei 6 3 all strings Et OUI IOI ending in IO't form all strings of OI I F 010101 20 times t regexes are equivalent Then NFAs can be converted Lemma Every regex NFA into an R Regex 4 R R O R2 f 0 O I 2 F E 5 R R R2 F a R Ri t 3 6 0500 toooo F Eu Iz t 0 00 E O 2,00 a 070 o reef Every NFA can be converted lemma into an equivalent regex R regex 0 00 have exactly 1 final state Every NFA wlog have can a start state with no Wlog inYminssia.ns oefoNFafo8E Je R BO R t I R2 Generalized Ri A Rz NFA every is a transition and regex 4 into nothing going start state nothing leaving 4 final state 4 state i.e delete a rip as necessary Repeatedly transitions and add any be of the form the 6 NFA will At end Koo equivalent regex is R Rip Ez b ESO f RipX9o s a.fi aUab Rip Rip GYU 92 6 ab sod Tryout 90 92 f I regex q µ q µ final aUdb Cab't w is accepted by DFA M suppose are also accepted what other strings soo or side we flooperists left when can guarantee infinitely other strings a loop many such accepted we of States For any W E L with w z in DFA this behavior get to Note XyiZ EL fo all iz o I y f e Z ly l z't E of slates in DFA 3 Xy languages Pumping Lemma for Regular of state in DFA Let L be a reg long constant for L exists pumping Ther Hee a Z P there exists L with w For all WE so that s t W Xyz X y Z all iz o I Xy t E L for 2 ly Iz't 3 1 Xy Ep f on in n 203 X Oa y Ob 6 I is not regular 2 rest Suppose L is regular constant p for L pick i 2 b Exists the OP IP yyz Opt II choose w Look at all possible breakups d w into Xyz this is in Only way t b p the language is it p 6 0 Perf S Ori n o is not regular Suppose Perfs is regular Perfs for constant p exists a w p Choose w OR Look at all decompositions 6 lxt a.ly Pump up to E Z Xyyz p't f this is in Perf 5 is it Only way perfect square p't 6 is a Know b I I p's p't 6 72 p t Ip Next pet square pti 76 E ft p s p2t2ptI r aep EEE ia length of string xyyz Max possible length of X y y z
Enter the password to open this PDF file:
-
-
-
-
-
-
-
-
-
-
-
-