EECS343, HW 4
1) (page 125, problem 12, 2pts ) Let M be the following DFSM. Use minDFSM or the table filling
algorithm discussed in class to minimize M. Remove states that are not reachable if necessa
Surname 1
Name
Professor
Course
Date
Coin tossing simulation
#include < stdio.h>
int flip (
);
int main ( void)
coi eads_eads, coi _tails
times_flipped = 0, 0, 0
while times flipped <100
coin_flipps =
NP-Completeness
Sect o s 8 5, 8 6
Sections 28.5, 28.6
NP-Completeness
A language L might have these properties:
1.
1 L is in NP
NP.
2. Every language in NP is deterministic,
polynomial-time reducible
Introduction to the Analysis
of Complexity
Chapter 27
Are All Decidable Languages Equal?
(ab)*
WWR
= cfw_wwR : w cfw_a, b*
WW
= cfw_ww : w cfw_a, b*
b
SAT
= cfw_w : w is a wff in Boolean logic an
1/12/2015
Outline
Introduction
EECS/MATH 343
Jing Li, Ph.D.
Case Western Reserve University
The Challenge problem
Any CS-related things that is new for you, and you
think that would be fun. But must
Time Complexity Classes
Chapter 28
The Language Class P
L P iff
there
exists some deterministic Turing machine M
that decides L and
L,
timereq(M)
O(nk) for some k.
Well say that L is tractable iff
More on Time Complexity
Sections 28.7 28.10
The Gap Between P and NP
Let NPL = NP (P NPC) Is NPL = ?
NPC).
Ladners Theorem
Theorem: If P NP, then NPL .
Lemma: Let B be any decidable language that is n
Decidability and
Undecidability Proofs
Sections 21.1 21.3
Undecidable Problems
(Languages That Arent In D)
Aren t
The Problem View
The Language View
Does TM M h lt on w?
D
halt
?
H = cfw_<M w> :
cfw_<
Decidability and
Undecidability Proofs
Sections 21 4 - 21 7
S ti
21.4 21.7
Is There a Pattern?
Does L contain some particular string w?
Does L contain ?
Does L contain any strings at all?
Does L c
EECS343, HW 6
4) (page 196, problem 1, (d, ) , 3pts ) Define a decision procedure for each of the following questions. Argue
that each of your decision procedures gives the correct answer and terminat
EECS343 Entry quiz
Name:
Case netID
1. List the elements of each of the following sets:
a. (2pts) P(cfw_a, b) - P(cfw_a, c):
a. cfw_b, cfw_a, b
b. (2pts) cfw_x : y (z (x = y + z) (y < 5) (z < 4)
a. 0,
EECS343, HW 2
1) For each of the following languages L, give a simple English description. Show two strings that are in
L and two that are not (unless there are fewer than two strings in L or two not
EECS343, HW 7
1)
(modified from page 247, problem 13.b , 3pts )For each of the following grammars G, show that G is
ambiguous. Then find an equivalent grammar by 1) eliminating -rules and 2) by elimin
EECS343, HW 10
1) (page 322, 1.a and 1.d, 4pts) Give a decision procedure to answer each of the following questions:
a) Given a regular expression and a PDA M, is the language accepted by M a subset o
EECS343, HW 9
1) (page 310, 1. a-c, e-g, 3pts) For each of the following languages L, state whether L is regular, contextfree but not regular, or not context-free and you DONOT need to show the proof.
EECS343, HW 8
1) (page 278, problem 4, modified, 6pts )Consider the language L = L1 L2, where L1 = cfw_wwR : w cfw_a, b*
and L2 = cfw_anb*an: n 0.
a) List the first four strings in the lexicographic e
EECS343, HW 3
1) (page 122, problem 5, 3pts ) Consider the following NDFSM M:
For each of the following strings w, determine whether w L(M):
a) aabbba.
Yes
b) bab.
No
c) baba.
Yes
2) (page 123, proble
EECS 343
HW 1 Solutions
1) (page 804, problem 3)
Prove each of the following:
a) A (B C D) = (A B) (A D) (A C).
Distributivity
A (B C D) = (A B) (A D) (A C).
Set union distributes over set intersectio
EECS 343 EXAM 2. Please write clearly.
Name:
Case ID:
1. (25pts) Construct a regular expression from this FSM step by step.
See textbook page 137 Example 6.7.
2. (25pts) State whether L=cfw_anbm | n,
EECS343, HW 5
1) (page 182, problem 1, (c,f,h,j,k,n) , 3pts ) For each of the following languages L, state whether or not
L is regular. You DONOT need to show the proof.
c) cfw_aibj : i, j 0 and |i j|
Decidable and Semidecidable
Languages
Chapter 20
D and SD Languages
SD
D
Context-Free
Languages
Regular
Languages
Every CF Language is in D
Theorem: The set of context-free languages is a proper
subse
The Unsolvability of the
Halting Problem
Chapter 19
Languages and Machines
SD
D
Context-Free
Languages
Regular
Languages
reg exps
FSMs
cfgs
PDAs
unrestricted grammars
Turing Machines
D and SD
M with i
Pushdown Automata
Chapter 12
Recognizing Context-Free Languages
Two notions of recognition:
(1) Say yes or no, just like with FSMs
(2) Say yes or no, AND
if yes, describe the structure
a
+
b
*
c
Just
Finite State Machines
State Minimization
Chapter 5
State Minimization
Consider:
Is this a minimal machine?
State Minimization
Step (1): Get rid of unreachable states.
State 3 is unreachable.
Step (2):
Finite State Machines
Markov Models
Hidden Markov Models
Chapter 5
Alternative definitions are available
Deterministic Finite State Transducers
Bchi Automata
Stochastic
FSMs
Markov Models
A Markov mod
Algorithms and Decision
Procedures for Regular
Languages
Chapter 9
Decision Procedures
A decision procedure is an algorithm whose result is a
Boolean value. It must:
Halt
Be
correct
Important decisi
Languages and Strings
Chapter 2
Outline
What is a language?
Why we study languages?
Strings and functions on strings
Languages and functions on languages
What is a language?
Natural languages: En
Finite State Machines
Chapter 5
Outline
Deterministic Finite State Machines/
Automata (FSM/DFSM/DFA)
First model of computation
Definition and design of FSM
Nondeterministic Finite State Machines