Automata and Formal Language

31 824 0
Automata and Formal Language

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Automata and Formal Language Quan Thanh Tho qttho@dit.hcmut.edu.vn Course Overview  An introduction to the fundamental theories and algorithms for computing on digital computer. – Automation: A model producing input from acceptable output based on self-made decision – Formal Language: An abstraction of programming language syntax. Course Outline  Chapter 1: Introduction  Chapter 2: Finite Automata  Chapter 3: Regular Language and Regular Grammar  Chapter 4: Properties of Regular Language  Chapter 5: Context-Free Grammar  Chapter 6: Simplification of Context-Free Grammar  Chapter 7: Pushdown Automata Reading Materials • Giáo trình lý thuyết automat và ngôn ngữ hình thức. Hồ Văn Quân • An introduction to formal languages and automata. Peter Linz • Introduction to automata theory, languages, and computation. John Hopcroft & Jeffrey Ullman Assessment  Assignment: 30%  Final Exam: 70% Related Issues  Digital Circuit Design  Compiler  Programming Languages Required Background  Set and Graph Theory  Induction and Contradiction-based Methods Three Basic Concepts  Languages  Grammars  Automata Languages • Alphabet: a finite and nonempty set of symbols Σ = {a, b} • Example 1.1 • Roman Alphabet: A,B,C, ,Z. • Greek Alphabet: α,β,… Language (cont’d) • String: finite sequence of symbols from Σ λ: empty string Σ*: the set of all strings on Σ (Σ+ = Σ* − {λ})  Example 1.2: Given Σ = {a,b} => Σ* = {λ, a, b, aa, ab, ba, aaa, } w = abaaa is a string of Σ L = {anbn | n ≥ 0} = {λ, ab, aabb, } is a set of strings of Σ [...].. .Language (cont’d) • Language: a subset L of Σ* • Sentence: a string in L • Example 1.3: In Example 1.2, L is a language on Σ, w is a string of Σ but not a sentence in L Language Concatenation L L = {xy | x∈L , y∈L } 1 2 1 2 Ln = L L L L0 = {λ} (n times) Language Concatenation (cont’d) • Example 1.4: L = {anbn | n ≥ 0} L2 = {anbnambm... Grammar for a natural language: a set of rules to construct vocabulary and sentences  Example 1.5: A simple English grammar → → → → a | the → boy | dog → runs | walks Hands-on Exercise 1.1:  Find all of possible sentences of the grammar given in Example 1.5 Formal Grammar • Formal grammar: G =... productions Formal Grammar (cont’d) • Productions: x → y, x∈(V ∪T )+, y∈(V ∪T )* • Example 1.6: G = ({S}, {a, b}, S, P) P: S → aSb S→λ Directly Derive • w = uxv derives z = uyv if xy is a production w⇒z w ⇒* w (w ⇒ w ⇒ ⇒ w | w = w ) 1 n 1 2 n 1 n w ⇒+ w 1 n Directly Derive (cont’d) • Example 1.7: Take into consideration the grammar given in Example 1.6: S ⇒ aSb ⇒ aaSbb ⇒ aabb S ⇒* aabb Generated Language. .. aabb Sequential Forms • S, w1, w2, , wn (containing variables) with S ⇒ w1 ⇒ w2 ⇒ ⇒ wn ⇒ w is a derivation • Example 1.10: S ⇒ aSb ⇒ aaSbb ⇒ aabb aabb: sentence aaSbb: sentential form Automata  “An automaton (plural: automata) is a self-operating machine The word is sometimes used to describe a robot, more specifically an autonomous robot Used colloquially, it refers to a mindless follower.” (Wiki)... contents of the input file Storage  A device consisting of unlimited cells  Each cell hold a symbol from an alphabet (it is not necessary to be the same alphabet as the input one)  The automaton can read and change the storage cells Control Unit  Having a finite set of infernal states  Can be any one of its infernal states  Can change from one infernal state to other Automation Operations • Transition . Pushdown Automata Reading Materials • Giáo trình lý thuyết automat và ngôn ngữ hình thức. Hồ Văn Quân • An introduction to formal languages and automata. Peter Linz • Introduction to automata. abstraction of programming language syntax. Course Outline  Chapter 1: Introduction  Chapter 2: Finite Automata  Chapter 3: Regular Language and Regular Grammar  Chapter 4: Properties of Regular Language  Chapter. Automata and Formal Language Quan Thanh Tho qttho@dit.hcmut.edu.vn Course Overview  An introduction

Ngày đăng: 13/05/2014, 10:21

Từ khóa liên quan

Mục lục

  • Automata and Formal Language

  • Course Overview

  • Course Outline

  • Reading Materials

  • Assessment

  • Related Issues

  • Required Background

  • Three Basic Concepts

  • Languages

  • Language (cont’d)

  • Slide 11

  • Language Concatenation

  • Language Concatenation (cont’d)

  • Closure Operators

  • Grammar

  • Hands-on Exercise 1.1:

  • Formal Grammar

  • Formal Grammar (cont’d)

  • Directly Derive

  • Directly Derive (cont’d)

Tài liệu cùng người dùng

Tài liệu liên quan