Cs3102: Theory of Computation Class 2: Problems and Finite Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
YES-NO machines Finite State Automata as language recognizers.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
CS5371 Theory of Computation
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
1 Languages and Finite Automata or how to talk to machines...
Finite state automaton (FSA)
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
1 Finite state automaton (FSA) LING 570 Fei Xia Week 2: 10/07/09 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Topics Automata Theory Grammars and Languages Complexities
Finite Automata Costas Busch - RPI.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Rosen 5th ed., ch. 11 Ref: Wikipedia
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
CSCI 2670 Introduction to Theory of Computing August 24, 2005.
Cs3102: Theory of Computation Class 4: Nondeterminism Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
Cs3102: Theory of Computation Class 6: Pushdown Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
TRANSITION DIAGRAM BASED LEXICAL ANALYZER and FINITE AUTOMATA Class date : 12 August, 2013 Prepared by : Karimgailiu R Panmei Roll no. : 11CS10020 GROUP.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
Cs3102: Theory of Computation Class 5: Non-Regular Languages Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Theory of Computation Automata Theory Dr. Ayman Srour.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
Deterministic Finite-State Machine (or Deterministic Finite Automaton) A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of: S: a finite set of states Σ:
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
CSCI 2670 Introduction to Theory of Computing
Languages.
Lecture2 Regular Language
Non Deterministic Automata
FORMAL LANGUAGES AND AUTOMATA THEORY
COSC 3340: Introduction to Theory of Computation
CSE322 Finite Automata Lecture #2.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Pushdown automata a_introduction.htm.
Chapter 1 Regular Language
Teori Bahasa dan Automata Lecture 4: Non-deterministic Finite Automata
CSC 4170 Theory of Computation Finite Automata Section 1.1.
Chapter # 5 by Cohen (Cont…)
Formal Definitions for Turing Machines
Teori Bahasa dan Automata Lecture 6: Regular Expression
Presentation transcript:

cs3102: Theory of Computation Class 2: Problems and Finite Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A AAA A AAAAAA

Main Question What problems can a particular type of machine solve? What is a problem? What is a machine? What does it mean for a machine to solve a problem?

Problems Defining Problem A problem is defined by: – A description of a set of inputs – A description of a set of outputs and the property an output must have A machine solves a problem if for every input it eventually produces a satisfactory output.

Finite Problems Finite Problems Problems with a finite number of possible inputs Uninteresting: can be solved by a lookup machine All theoretically interesting problems have infinitely many possible inputs.

In the real world lots of interesting problems have finite number of inputs: chess (0 or 1 inputs?), Internet search with bounded-length query, human genome assembly, etc. In the real world lots of interesting problems have finite number of inputs: chess (0 or 1 inputs?), Internet search with bounded-length query, human genome assembly, etc.

Outputs How many possible outputs do you need for a problem to be interesting? 2 – “Yes” or “No” Finite search problems can be framed as a series of decision problems: What is 2+2? vs. Does 2+2=0? No Does 2+2=1?No Does 2+2=2?No Does 2+2=3?No Does 2+2=4?Yes A decision problem is a problem that has two possible outputs.

Language Recognition Is string s in language L ? A machine M recognizes language L if it can solve: for any string s, is s in L ? We can describe the power of a type of machine is by the set of languages it can recognize. A machine M recognizes language L if it can solve: for any string s, is s in L ? We can describe the power of a type of machine is by the set of languages it can recognize.

Deterministic Finite Automata Finite set of states Set of accepting states One start state Transition function a b a b b b a

DFA Example Recap: What is a language? Recap: What does it mean to recognize a language? Draw a DFA that recognizes the language of strings in [0, 1]* with an even number of 1s.

“Trick” Question What languages can be recognized by a DFA? The regular languages. This is the definition of a regular language: a language is a regular language if there is some DFA that recognizes it.

“Tricky” Questions? Can all finite languages be recognized by a DFA? Yes. Trivially: create a state-path for each string in the language. Finite language, means a finite number of states is enough. Can a DFA recognize an infinite language? Yes. We’ve seen two examples already!

Formal Definition A finite automaton is a 5-tuple: Q finite set (“states”)  finite set (“alphabet”)  : Q    Q transition function q 0  Q start state F  Q set of accepting states

Computation Model Define  * as the extended transition function: A string, w, is in the language defined by DFA A iff the result of applying the extended transition function of A to start state, q 0, and w is a final state.

String (prepending definition) Basis:  (the empty string) is a string Induction: if s is a string, and a , as is a string String (appending definition) Basis:  (the empty string) is a string Induction: if s is a string, and a , sa is a string

Computation Model Define  * as the extended transition function: Basis: Induction: Function from a state and string to a state. Defining  * for the other appending string definition is left as exercise (or exam question?).

If you prefer Java code... State nextState(State q, String w) { if (w.length() == 0) return q; else return (nextState (transition (q, w.charAt(0)), w.substring(1)); }

Complement Is the set of regular languages is closed under complement?

Charge Thursday’s Class: guest lecture by Gabe Robins office hours (Sonali) in Stacks after class PS1 Due Tuesday (problem 4 removed)