Dm2 ch3 automata handout

33 1 0
Dm2 ch3 automata handout

Đ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 TVHoai, HTNguyen, NAKhuong, LHTrang Contents Motivation Alphabets, words and languages Regular expression or rationnal expression Non deterministic finite automata Deterministic finite automa[.]

Automata TVHoai, HTNguyen, NAKhuong, LHTrang Chapter Automata Mathematical Modeling Contents Motivation Alphabets, words and languages Regular expression or rationnal expression (Materials drawn from this chapter in: - Peter Linz An Introduction to Formal Languages and Automata, (5th Ed.), Jones & Bartlett Learning, 2011 - John E Hopcroft, Rajeev Motwani and Jeffrey D Ullamn Introduction to Automata Theory, Languages, and Computation (3rd Ed.), Prentice Hall, 2006 - Antal Iványi Algorithms of Informatics, Kempelen Farkas Hallgatúi ozpont, 2011 ) Informỏciús Kă Non-deterministic finite automata Deterministic finite automata Recognized languages Determinisation Minimization TVHoai, HTNguyen, NAKhuong, LHTrang Faculty of Computer Science and Engineering University of Technology, VNU-HCM 3.1 Contents Automata TVHoai, HTNguyen, NAKhuong, LHTrang Motivation Alphabets, words and languages Contents Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Recognized languages Recognized languages Determinisation Determinisation Minimization Minimization 3.2 Course outcomes Automata TVHoai, HTNguyen, NAKhuong, LHTrang Course learning outcomes L.O.1 L.O.2 L.O.3 Understanding of predicate logic L.O.1.1 – Give an example of predicate logic L.O.1.2 – Explain logic expression for some real problems L.O.1.3 – Describe logic expression for some real problems Contents Motivation Understanding of deterministic modeling using some discrete structures L.O.2.1 – Explain a linear programming (mathematical statement) L.O.2.2 – State some well-known discrete structures L.O.2.3 – Give a counter-example for a given model L.O.2.4 – Construct discrete model for a simple problem Alphabets, words and languages Be able to compute solutions, parameters of models based on data L.O.3.1 – Compute/Determine optimal/feasible solutions of integer linear programming models, possibly utilizing adequate libraries L.O.3.2 – Compute/ optimize solution models based on automata, , possibly utilizing adequate libraries Recognized languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Determinisation Minimization 3.3 Automata Introduction TVHoai, HTNguyen, NAKhuong, LHTrang Standard states of a process in operating system • O with label: states • →: transitions Contents Resource Motivation Alphabets, words and languages Waiting Blocked Regular expression or rationnal expression Non-deterministic finite automata Resource Deterministic finite automata CPU Recognized languages CPU Resource Determinisation Minimization Running 3.4 Why study automata theory? Automata TVHoai, HTNguyen, NAKhuong, LHTrang A useful model for many important kinds of software and hardware Contents designing and checking the behaviour of digital circuits lexical analyser of a typical compiler: a compiler component that breaks the input text into logical units scanning large bodies of text, such as collections of Web pages, to find occurrences of words, phrases or other patterns verifying pratical systems of all types that have a finite number of distinct states, such as communications protocols and other protocols for securely information exchange, etc Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Recognized languages Determinisation Minimization 3.5 Alphabets, symbols Automata TVHoai, HTNguyen, NAKhuong, LHTrang Definition Alphabet Σ (bảng chữ cái) is a finite and non-empty set of symbols (or characters) For example: Contents • Σ = {a, b} • The binary alphabet: Σ = {0, 1} • The set of all lower-case letters: Σ = {a, b, , z} Motivation • The set of all ASCII characters Non-deterministic finite automata Alphabets, words and languages Regular expression or rationnal expression Deterministic finite automata Remark Σ is almost always all available characters (lowercase letters, capital letters, numbers, symbols and special characters such as space or newline) But nothing prevents to imagine other sets Recognized languages Determinisation Minimization 3.6 Strings (words) Automata TVHoai, HTNguyen, NAKhuong, LHTrang Definition • A string/word u (chuỗi/từ) over Σ is a finite sequence (possibly empty) of symbols (or characters) in Σ • A empty string is denoted by ε • The length of the string u, denoted by |u|, is the number of characters • All the strings over Σ is denoted by Σ∗ • A language L over Σ is a sub-set of Σ∗ Contents Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Remark The purpose aims to analyze a string of Σ∗ in order to know whether it belongs or not to L Recognized languages Determinisation Minimization 3.7 Example Automata TVHoai, HTNguyen, NAKhuong, LHTrang Let Σ = {0, 1} • ε is a string with length of • and are the strings with length of • 00, 01, 10 and 11 are the strings with length of • ∅ is a language over Σ It’s called the empty language • Σ∗ is a language over Σ It’s called the universal language • {ε} is a language over Σ • {0, 00, 001} is also a language over Σ • The set of strings which contain an odd number of is a language over Σ • The set of strings that contain as many of as is a language over Σ Contents Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Recognized languages Determinisation Minimization 3.8 Automata String concatenation TVHoai, HTNguyen, NAKhuong, LHTrang Contents Intuitively, the concatenation of two strings 01 and 10 is 0110 Concatenating the empty string ε and the string 110 is the string 110 Motivation Alphabets, words and languages Regular expression or rationnal expression Definition ∗ ∗ ∗ String concatenation is an application of Σ × Σ to Σ Concatenation of two strings u and v in Σ is the string u.v Non-deterministic finite automata Deterministic finite automata Recognized languages Determinisation Minimization 3.9 Languages Automata TVHoai, HTNguyen, NAKhuong, LHTrang Specifying languages A language can be specified in several ways: a b c enumeration of its words, for example: • L1 = {ε, 0, 1}, • L2 = {a, aa, aaa, ab, ba}, • L3 = {ε, ab, aabb, aaabbb, aaaabbbb, }, a property, such that all words of the language have this property but other words have not, for example: • L4 = {an bn |n = 0, 1, 2, }, • L5 = {uu−1 |u ∈ Σ∗ } with Σ = {a, b}, • L6 = {u ∈ {a, b}∗ |na (u) = nb (u)} where na (u) denotes the number of letter ’a’ in word u its grammar, for example: • Let G = (N, T, P, S) where N = {S}, T = {a, b}, P = {S → aSb, S → ab} i.e L(G) = {an bn |n ≥ 1} since S ⇒ aSb ⇒ a2 Sb2 ⇒ ⇒ an Sbn Contents Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Recognized languages Determinisation Minimization 3.10 Automata NFA with empty symbol ε TVHoai, HTNguyen, NAKhuong, LHTrang Other definition of NFA Finite automaton with transitions defined by character x (in Σ) or empty character ε Contents Motivation Alphabets, words and languages b q1 Regular expression or rationnal expression Non-deterministic finite automata b ε q0 a, b a q2 Deterministic finite automata Recognized languages Determinisation Minimization 3.28 Deterministic finite automata Automata TVHoai, HTNguyen, NAKhuong, LHTrang Definition A deterministic finite automata (DFA, Automat hữu hạn đơn định) is given by a 5-tuplet (Q, Σ, q0 , δ, F ) with • Q a finite set of states • Σ is the input alphabet of the automata • q0 ∈ Q is the initial state • δ : Q × Σ → Q is a transition function • F ⊆ Q is the set of final/accepting states Contents Motivation Alphabets, words and languages Regular expression or rationnal expression Non-deterministic finite automata Deterministic finite automata Recognized languages Condition Determinisation Transition function δ is an application Minimization 3.34

Ngày đăng: 11/04/2023, 12:50

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

  • Đang cập nhật ...

Tài liệu liên quan