Computer Science 500 Theory of Computation Spring, 2000 January 19 - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Computer Science 500 Theory of Computation Spring, 2000 January 19

Description:

'A String over an Alphabet' A sequence of letters (with replacement) from that alphabet, e.g. ... a) L = all binary strings w such that the number of 1's in w ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 27
Provided by: petersg
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 500 Theory of Computation Spring, 2000 January 19


1
Computer Science 500Theory of ComputationSpring,
2000January 19
Class info -- email etc Finite Automata
2
Instructor Peter GemmellOffice Hours
Monday/Wednesday 3-4 in EECE 230a or by
appointmentOffice Phone 277-6509 Cellular
Phone 720-5910 gemmell_at_cs.unm.edubetween 9am
and 11pm 7 days a weekHome Phone if
importantDiscussion Section Time, location TBD
(1/4-time) TA William Neumann(grading, some
office hours by appointment)
3
Books The primary texts are--Introduction to
the Theory of Computation by
Michael Sipser --The Theory of Computation by
Bernard Moret in the UNM book store, available
on the web, e.g. at http//www.amazon.comOther
useful texts --Lewis, Papadimtriou --Aho,
Hopcroft, UllmanPrerequisites-- Ability to
recognize a proof and practice creating proofs,
some willingness and/or ability to deal with
formal logical arguments
4
Course Philosophies
  • In class, we will proceed quickly
  • Review and practice problems will be done in
    discussion sections. If you are having trouble,
    it is very important to attend at least one
    discussion section per week.
  • Tests and homework may be slightly more
    difficult than last year.
  • You should know the core material very well.
    (e.g. be able to state and prove the Pumping
    Lemma, Rices Theorem, and the Cook/Levin theorem)

5
Grading
  • 10 Weekly Homework. For this part, you are
    encouraged to work in groups.
  • 60 Three in-class individual-effort tests
  • 30 An in-class individual-effort final
  • Any late homework must be with prearranged (5
    day) approval of Pete. Otherwise, 15 off per
    day late.
  • If you will miss any test, you must let Pete know
    at least 1 week in advance to work out an
    alternative time.

6
Syllabus
  • Deterministic and Non-deterministic Finite
    Automata, Regular Languages, and the Pumping
    Lemma
  • Turing Machines, Computability, the Halting
    Problem, Kleene hierarchy, Quantifiers
  • Complexity Theory P and NP, reductions,
    Cooks Theorem, and NP-completeness
  • Other topics in Complexity Theory P-SPACE,
    Savitchs Theorem, IP, MIP, Zero-knowledge
    proofs, Log-SPACE, the polynomial-time
    hierarchy, circuit theory, and quantum machines.

7
Models of Computationan important idea
What are the essential features of the computers
which people have used for the past 50 (/-)
years? What properties do they have which
transcend the particular brand and version (and
mHz and Gigabyte values) that we see today?
8
Importance of the Turing Machine Model
  • Every computer acts as a Turing Machine
  • Distinguished only by speed, space

9
Complexity of Algorithms
If an algorithm runs in time ?(log(n)), ?(n), or
?(n4), then faster machines may make a big
difference If an algorithm runs in time ?(2n),
or ?(nlog(n)), then faster machines may not make
a big difference
10
Miscellaneous NotationYou should understand the
following words and symbols
  • ?, ? there exists for all
  • iff, if, only if,
  • contrapositive, converse, inverse
  • O,o,?,?
  • ?, ?, ?, ?, ?, ?, ?, P
  • set difference A-B
  • complement of a set
  • Z integers
  • Set A is closed under operation _at_

11
Advice -- (second) installment
  • Study in (big) Groups
  • Attend discussion sections, office hours, class
  • Do not slack on homework or studying
  • Be very careful about interpreting what a
    (homework or test) question asks, separating
    apples from oranges
  • If you have questions, ask
  • Concentrate on core material first (e.g.
    Definitions, Pumping Lemma, reductions,
    NP-completeness)

12
Finite Automata
  • One pass through the input
  • No capability to write
  • Turing Machines with constant amount of memory

13
Finite Automatamain topics for which you are
responsible(know relevant definitions and proofs)
  • 5-tuple descriptions
  • State diagrams
  • DFAs
  • NFAs
  • Regular expressions
  • Any language computed by an NFA can also be
    computed by some DFA
  • Any regular expression can be computed by some
    NFA
  • Any language computed by a DFA can be
    represented as a regular expression

14
Deterministic Finite Automata -- an example
0
0
1
Acc
1
1
0
15
Alphabets, ?
  • Any set of distinct symbols, e.g.
  • 0,1
  • a,b,c,d z
  • a,b,c,d, z, A, B, Z, 0,1,2 9
  • ASCII

16
A String over an Alphabet
  • A sequence of letters (with replacement) from
    that alphabet, e.g.
  • 000111000
  • SOS
  • (defun (foobar ()) nil)

17
Deterministic Finite AutomataDFA definition
  • A finite automaton is a 5-tuple (?, S, ?, s, A)
  • ??is an alphabet over which input strings are
    defined
  • S is a set of states
  • ?????x S S) is a transition function
    between states
  • s is the start state
  • A S is a set of accept states

18
Languages
A language L is a subset of S. A binary
language is a subset of 0,1 The language
accepted (computed) by a DFA D L(D) is the set
of all strings w such that D ends in an accept
state on input w L is a regular language if
there is a DFA that accepts it
19
Non-deterministic Finite Automata (NFAs), example
0
0
1
Acc
1
?
1
0
20
0
0,1
1
Acc
1
0
1
0
21
Non-deterministic Finite AutomataNFA definition
  • A finite automaton is a 5-tuple (?, S, ?, s, A)
  • ??is an alphabet over which input strings are
    defined
  • S is a set of states
  • ???(??? e) x S x S) is a transition relation
    between states
  • s is the start state
  • A ? S is a set of accept states

22
Languages accepted by NFAs
The language accepted by an NFA D is all strings
w such that D ends in an accept state for any
possible path taken on input w
Notion of a computation tree Notion of a witness
23
Equivalence of NFAs and DFAs
Obvious Fact If L is a language accepted by a
DFA then there is an NFA that also accepts it
Theorem If L is a language accepted by an NFA
then there is a DFA that also accepts it
24
Proof
Given L accepted by D (?, S, ?, s, A), let N
(?, S, ?, s, A) be ?????????? ????S
P(S) -- the powerset of S 3. ?(a, S1, S2)
iff exists s1 in S1, s2 in S2 such that
??a, s1, s2) 4. s s 5. A S1 ? S
exists a in S1 such that a in A
25
Homework 1 Computer Science 500 Spring, 2000
Handed out Wednesday, Jan 19 Due Wednesday, Jan
26
Reading Assignment Pages 1-85 of Sipser
1. Write (I) Regular Expressions, (II) DFA
Diagrams, and (III) Formal DFA definitions for
the following languages a) all binary strings
that have at least five 0s b) all binary strings
which sum to 2 modulo 6 c) all monotonically
non-decreasing strings from the alphabet 0,1,2,3
26
2. Draw a DFA diagram that accepts the same
language as the following NFA 3. Show
that the following languages are not regular a)
L all binary strings w such that the number of
1s in w is at least 2 times the number of 0s in
w. b) L all binary strings with Hamming weight
equal to a perfect cube
0
0
0,1
1,e
1
Acc
0,1
0
0
Write a Comment
User Comments (0)
About PowerShow.com