

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Class: THEORY OF COMPUTATION; Subject: Computer Science; University: University of California-Riverside; Term: Unknown 1989;
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Decidability CS215, Lecture 7 c 1999 Mitsunori Ogihara Decidable Problems About Regular Languages The Acceptance Problem for DFA Define
is a DFA that accepts input string . Here we assume a fixed encoding scheme for
and . Theorem.
is decidable. Proof A Turing machine can, given an input
, try to decode
into an NFA
and a string
. If the decoding is successful then it can test whether
accepts by simulating
on . CS215, Lecture 7 c 1999 Mitsunori Ogihara The Acceptance Problem for NFA Define
is an NFA that accepts input string . Theorem.
is decidable. Proof Given an input
, try to decode
into an NFA
and a string . If “successful” then:
to a DFA
.
on
. If the machine accepts, then accept ; otherwise reject . CS215, Lecture 7 c 1999 Mitsunori Ogihara 3 The Acceptance Problem for Regular Exp. Define
is a regular expression that produces . Theorem.
is decidable. Proof Given an input
, try to decode
into a regular expression
and a string
. If “successful” then: 1. Convert
to a DFA
.
on
. If the machine accepts, then accept ; otherwise reject . CS215, Lecture 7 c 1999 Mitsunori Ogihara 4
The Emptiness Problem for DFA Define
is a DFA that accepts no string . Theorem.
is decidable. Proof Given an input
, try to decode a DFA
out of
. If “successful” then: 1. Mark the start state of
.
Repeat until no new states are marked:
Mark any unmarked state that has a transition from a marked state
and
are DFA that accept the same language . Theorem.
is decidable. Proof Given a string
, try to decode
into a pair of DFAs
and . If “successful” then construct a DFA
that accepts the symmetric difference of
and
,
and test the emptiness of
.
CS215, Lecture 7 c 1999 Mitsunori Ogihara The Acceptance Problem for CFG Define
is a CFG that generates . Theorem.
is decidable. Proof Given an input
, try to decode
into a CFG
and a string . If “successful” then:
to an equivalent Chomsky normal form grammar
.
steps, where
.
is a CFG such that
. Theorem.
is decidable. Proof Given
, first try to decode a grammar
out of it. If “pass” then test the ability of generating terminal strings:
Mark all the terminals .
Mark any variables
with a production
such that all symbols in are marked .
Accept if the start symbol is marked; reject otherwise. CS215, Lecture 7 c 1999 Mitsunori Ogihara 8