Languages.

Slides:



Advertisements
Similar presentations
Finite-State Machines with No Output Ying Lu
Advertisements

1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2005.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
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.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
1 CSCI-2400 Models of Computation. 2 Computation CPU memory.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
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...
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Theoretical Computer Science COMP 335 Fall 2004
Topics Automata Theory Grammars and Languages Complexities
Fall 2006Costas Busch - RPI1 Languages. Fall 2006Costas Busch - RPI2 Language: a set of strings String: a sequence of symbols from some alphabet Example:
Finite Automata Costas Busch - RPI.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Fall 2004COMP 3351 Languages. Fall 2004COMP 3352 A language is a set of strings String: A sequence of letters/symbols Examples: “cat”, “dog”, “house”,
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Finite-State Machines with No Output Longin Jan Latecki Temple University Based on Slides by Elsa L Gunter, NJIT, and by Costas Busch Costas Busch.
Finite-State Machines with No Output
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
Costas Busch - LSU1 Languages. Costas Busch - LSU2 Language: a set of strings String: a sequence of symbols from some alphabet Example: Strings: cat,
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2006.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet:
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2010.
Natural Language Processing Lecture 4 : Regular Expressions and Automata.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 2 School of Innovation, Design and Engineering Mälardalen University 2012.
Modeling Computation: Finite State Machines without Output
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
Recap: Transformation NFA  DFA  s s1s1... snsn p1p1 p2p2... pmpm >...  p1p1  p2p2  pipi s e s1s1 e s2s2 e sisi >
Formal Languages Finite Automata Dr.Hamed Alrjoub 1FA1.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
Deterministic Finite Automata And Regular Languages.
Non Deterministic Automata
Languages Prof. Busch - LSU.
Languages Costas Busch - LSU.
Single Final State for NFA
Chapter 2 FINITE AUTOMATA.
CSE322 Finite Automata Lecture #2.
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Non Deterministic Automata
CSE322 Minimization of finite Automaton & REGULAR LANGUAGES
Introduction Reading: Sections 1.5 – 1.7.
Chapter # 5 by Cohen (Cont…)
CSC312 Automata Theory Lecture # 2 Languages.
Languages Fall 2018.
CSCE 355 Foundations of Computation
Presentation transcript:

Languages

Languages A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet:

Alphabets and Strings We will use small alphabets: Strings

String Operations Concatenation

Reverse

String Length Length: Examples:

Recursive Definition of Length For any letter: For any string : Example:

Length of Concatenation Example:

Proof of Concatenation Length Claim: Proof: By induction on the length Induction basis: From definition of length:

Inductive hypothesis: for Inductive step: we will prove

Inductive Step Write , where From definition of length: From inductive hypothesis: Thus:

Empty String A string with no letters: Observations:

Substring Substring of string: a subsequence of consecutive characters

Prefix and Suffix Prefixes Suffixes prefix suffix

Another Operation Example: Definition:

The * Operation : the set of all possible strings from alphabet

The + Operation : the set of all possible strings from alphabet except

Language A language is any subset of Example: Languages:

Another Example An infinite language

Operations on Languages The usual set operations Complement:

Reverse Definition: Examples:

Concatenation Definition: Example:

Another Operation Definition: Special case:

More Examples

Star-Closure (Kleene *) Definition: Example:

Positive Closure Definition:

Finite Automata

Finite Automaton Input String Output Finite Automaton String

Finite Accepter Input String Output “Accept” or Finite “Reject” Automaton

Transition Graph Abba -Finite Accepter initial state final state

Initial Configuration Input String

Reading the Input

Input finished Output: “accept”

Rejection

Input finished Output: “reject”

Another Example

Input finished Output: “accept”

Rejection

Input finished Output: “reject”

Formalities Deterministic Finite Accepter (DFA) : set of states : input alphabet : transition function : initial state : set of final states

Input Alphabet

Set of States

Initial State

Set of Final States

Transition Function

Transition Function

Extended Transition Function

Observation: There is a walk from to with label

Recursive Definition

Languages Accepted by DFAs Take DFA Definition: The language contains all input strings accepted by = { strings that drive to a final state}

Example accept

Another Example accept accept accept

Formally For a DFA Language accepted by : alphabet transition function initial state final states

Observation Language accepted by : Language rejected by :

More Examples trap state accept

= { all substrings with prefix } accept

= { all strings without substring }

Regular Languages A language is regular if there is a DFA such that All regular languages form a language family

Example The language is regular: