chapter 4 decidability i
play

Chapter 4: Decidability I Now we have algorithms We want to check - PowerPoint PPT Presentation

Chapter 4: Decidability I Now we have algorithms We want to check problems solvable or not by computers Need a TM to decide it i.e., accept/reject in a finite number of steps We will show some examples October 27, 2020 1 / 11 Acceptance


  1. Chapter 4: Decidability I Now we have algorithms We want to check problems solvable or not by computers Need a TM to decide it i.e., accept/reject in a finite number of steps We will show some examples October 27, 2020 1 / 11

  2. Acceptance Problems for DFA I A DFA = {� B , w � | B is a DFA that accepts w } � B , w � is the input Note that a DFA can be represented as a string ( Q , Σ , . . . ) Is A DFA decidable? Idea: input � B , w � simulate B on w 1 ends in an accept state ⇒ accept 2 otherwise ⇒ reject October 27, 2020 2 / 11

  3. Proof of A DFA I Put B = � Q , Σ , δ, q 0 , F � into a tape Check if w ∈ Σ ∗ and B a valid DFA Simulate w according to δ After processing the last element of w , check if in a final state October 27, 2020 3 / 11

  4. A NFA I A NFA = {� B , w � | B is an NFA that accepts w } We can convert B to a DFA and use the procedure for A DFA It’s like to use the procedure for A DFA as a subroutine October 27, 2020 4 / 11

  5. A REX I A REX = {� R , w � | R : regular expression generates w } It’s similar We convert R to a DFA first Recall that we had a procedure to convert R to an NFA. Then we can convert the NFA to a DFA The key is that the conversion is a finite procedure October 27, 2020 5 / 11

  6. E DFA I E DFA = {� A � | A : DFA , L ( A ) = ∅} i.e. A accepts nothing Idea: DFA accepts something ⇔ reaching a final state from q 0 after several links procedure mark q 0 1 October 27, 2020 6 / 11

  7. E DFA II repeat until no new state marked 2 mark all a → b , where a has been marked if no q ∈ F marked, accept. otherwise, reject 3 Example: a state diagram with 3 nodes and the following connections 1 → 2 , 3 October 27, 2020 7 / 11

  8. E DFA III Marked states in running the procedure 1 12 12 Each iteration: at least one new state marked At most n iterations: n : # states October 27, 2020 8 / 11

  9. EQ DFA I EQ DFA = {� A , B � | A , B : DFAs , L ( A ) = L ( B ) } EQ DFA is decidable Idea for the proof: Let a DFA C be the exclusive or of A and B If L ( A ) = L ( B ) then L ( C ) = ∅ October 27, 2020 9 / 11

  10. EQ DFA II Exclusive or of A and B A B (latex source from https://texample.net/tikz/examples/ set-operations-illustrated-with-venn-diagrams/ ) October 27, 2020 10 / 11

  11. EQ DFA III Formally L ( C ) = ( L ( A ) ∩ L ( B )) ∪ ( L ( A ) ∩ L ( B )) B DFA ⇒ so is B A , B DFA ⇒ so is A ∪ B , A ∩ B We then use E DFA to check if L ( C ) = ∅ or not October 27, 2020 11 / 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend