Tutorial 11 CSC3130 : Formal Languages and Automata Theory - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Tutorial 11 CSC3130 : Formal Languages and Automata Theory

Description:

Construct. Mw. Proof: (reduce it to Halting problem. ... How to construct Mw ? halts on. Contains two equal length strings. if and only if. Our Target ... – PowerPoint PPT presentation

Number of Views:892
Avg rating:3.0/5.0
Slides: 13
Provided by: cseCu
Category:

less

Transcript and Presenter's Notes

Title: Tutorial 11 CSC3130 : Formal Languages and Automata Theory


1
Tutorial 11-- CSC3130 Formal Languages and
Automata Theory
  • Tu Shikui (sktu_at_cse.cuhk.edu.hk)
  • SHB 905, Office hour Thursday 230pm-330pm
  • 2008-11-16

2
Outline
  • Examples for
  • Decidable
  • Undecidable but Recognizable
  • Unrecognizable

3
The difference -- between Recognizable and
decidable
  • If L is decidable, then L is recognized by a TM M
    that halts on all inputs. Note that, L might be
    recognized by other TM M that does not always
    halt.
  • If L is recognizable, then there might be such TM
    M that recognizes L but run forever, rather than
    rejecting, some inputs not in L.
  • Simply, Decidable ---- always halt
  • Recognizable ---- halt or loop

4
Example 1 -- Is it decidable?
L(A)
L(B)
The shaded area
Proof Decidable.
Construct a TM M as follows
5
Example 2 -- Is it decidable?
The answer NOT decidable. The difficulty How
to prove a language to be not decidable?
The target problem is embedded.

A decider of target problem
Construct Mw
accept
reject
w
6
Example 2 -- Is it decidable? ? NO.
Proof (reduce it to Halting problem.)

Accept, if L(M) finite
D
Suppose we have a TM D such that
Reject, if L(M) NOT finite
Then, we should consider
HALTTM (, w) M is a TM that halts on input
w

D
Construct Mw

Accept, if M halts
Reject, if M does not halt
w
7
How to construct Mw ?
Our Target
Construction
On any input string s
Simulate M on w
If M halts,
accept s,
else
reject s,
end
8
Example 2 -- Is it decidable? ? NO.
halts on
if and only if
HALTTM (, w) M is a TM that halts on input
w
is infinite

D
Construct Mw
reject

Accept, if M halts
accept
Reject, if M does not halt
w
9
Example 3 -- Is it decidable?
Proof (reduce it to Halting problem.)

Accept, if
D
Suppose we have a TM D such that
Reject, if NOT
Then, we should consider
HALTTM (, w) M is a TM that halts on input
w

D
Construct Mw

Accept, if M halts
Reject, if M does not halt
w
10
How to construct Mw ?
Our Target
Construction
halts on
On any input string s
Simulate M on w
if and only if
If M halts,
accept if sa or sb
else
reject s,
end
Contains two equal length strings
11
Example 4 -- Is it decidable?
Proof
Suppose we have a TM D such that

Accept, if
D
Reject, if NOT
ATM (, w) M is a TM that accepts w

D
Construct Mw

Accept, if M accept w
Reject, if not
w
12
End of this tutorial!Thanks for coming!
Write a Comment
User Comments (0)
About PowerShow.com