Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.

Slides:



Advertisements
Similar presentations
1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Advertisements

1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Erik Jonsson School of Engineering and Computer Science CS 4384 – 001
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
NFAs Sipser 1.2 (pages 47–54). CS 311 Fall Recall… Last time we showed that the class of regular languages is closed under: –Complement –Union.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
NFAs Sipser 1.2 (pages 47–54). CS 311 Mount Holyoke College 2 Recall… Last time we showed that the class of regular languages is closed under: –Complement.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Languages and Finite Automata or how to talk to machines...
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections: September 1, 2006.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
Theoretical Computer Science COMP 335 Fall 2004
Topics Automata Theory Grammars and Languages Complexities
Finite Automata Costas Busch - RPI.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
Lecture 1 String and Language. String string is a finite sequence of symbols. For example, string ( s, t, r, i, n, g) CS4384 ( C, S, 4, 3, 8) (1,
Great Theoretical Ideas in Computer Science.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Languages & Strings String Operations Language Definitions.
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Lecture # 3 Chapter #3: Lexical Analysis. Role of Lexical Analyzer It is the first phase of compiler Its main task is to read the input characters and.
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 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
CHAPTER 1 Regular Languages
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
CMSC 330: Organization of Programming Languages Theory of Regular Expressions Finite Automata.
Deterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.2)
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Finite Automata Chapter 1. Automatic Door Example Top View.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Lecture 8 NFA Subset Construction & Epsilon Transitions
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
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 Languages and Automata By: Mojtaba Khezrian.
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 Σ:
CSCE 355 Foundations of Computation
Introduction to the Theory of Computation
Languages.
Lecture2 Regular Language
Formal Language & Automata Theory
Finite Automata & Regular Languages
CSCE 355 Foundations of Computation
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
COSC 3340: Introduction to Theory of Computation
Finite Automata.
Closure Properties of Regular Languages
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
Chapter 1 Regular Language
CSCI 2670 Introduction to Theory of Computing
CSCE 355 Foundations of Computation
Presentation transcript:

Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations of Computation

– 2 – CSCE 355 Summer an/ialc/slides/slides1.pdf

– 3 – CSCE 355 Summer 2015 Recursive Def of Arithmetic Expressions  Basis: a number or a variable is an expression.  If E and F are expressions then a new expression G can be formed by applying one of the three rules 1.G = E + F 2.G = E * F 3.G = ( E )

– 4 – CSCE 355 Summer 2015 Graphs – Visual representation of relations (binary)  a R b if and only if a  b in the graph

– 5 – CSCE 355 Summer 2015 The Pigeon Hole Principle  Proof techniques Continued  If you have n boxes and more than n balls to put in the boxes then you must be two balls (at least two) in the same box.  Formally If A and B are sets with |A| > |B| then there is no 1-1 function from A to B.

– 6 – CSCE 355 Summer 2015 Mutual Inductions  Example 1.23 On-Off pushbutton automaton

– 7 – CSCE 355 Summer 2015 Languages  Alphabet – a finite set of symbols  String – finite sequence of characters from an alphabet  Empty string, length of string  Language (over an alphabet)

– 8 – CSCE 355 Summer 2015 Operations on Strings

– 9 – CSCE 355 Summer 2015 Examples of Languages

– 10 – CSCE 355 Summer 2015 Operations on Languages Suppose S and T are languages (sets of strings)  Union, intersection, complement  concatenation

– 11 – CSCE 355 Summer 2015 Powers, Kleene Closure  S 1 = S  S n = S S n-1  How would you prove S n S m = S n+m ?  What is S 0 ?  S *

– 12 – CSCE 355 Summer 2015 Some Special Languages

– 13 – CSCE 355 Summer 2015 Finite Automata - Informally

– 14 – CSCE 355 Summer 2015 Finite Automata - formally  A Deterministic Finite Automata (DFA) is a 5-tuple

– 15 – CSCE 355 Summer 2015 Transition Diagrams; Transition Tables ConventionsNotes 1.Number of out-arcs 2.Dead state

– 16 – CSCE 355 Summer 2015 Path determined by a string

– 17 – CSCE 355 Summer 2015 Language accepted by a DFA

– 18 – CSCE 355 Summer 2015 Example L(M) for DFA M

– 19 – CSCE 355 Summer 2015 Given L find DFA for it

– 20 – CSCE 355 Summer 2015 Important application of Pigeon Hole Principle to DFAs

– 21 – CSCE 355 Summer 2015 Regular Expressions

– 22 – CSCE 355 Summer 2015 Homework 1.What’s wrong with Ullman’s proof of “if a complete binary tree has n leaves then it has 2n- 1 nodes.” (extra credit) 2.Operations on Strings Given strings s = abc and t=12  What are st, s2, and s3?  Is ε (empty string) in every language? c. Is ϕ a language? It is a sublanguage of every language? 3.Operations on Languages. Given S = {a, b, ab} and T = {1, 22} a. What is ST? b. What is TS? c. What is T 2 ? T 3 ?

– 23 – CSCE 355 Summer DFA recognizing the following languages  {w in {a,b}* | each a is immediately preceded by a b}  {w in {a,b}* | neither aa nor bb is a substring of w } 5. What language does the DFA below recognize

– 24 – CSCE 355 Summer 2015 References– Mathematical Foundations  - The website for the textbook Extended “Proof” techniques  proofs.html proofs.html proofs.html Fair Use Books Online  mathematics/ mathematics/ mathematics/Books Dr. Euler's Fabulous Formula: Cures Many Mathematical Ills