Mathematics for linguists

Similar documents
CSE 105 THEORY OF COMPUTATION

Computer Sciences Department

Closure under the Regular Operations

CSE 105 THEORY OF COMPUTATION

Chapter 6. Properties of Regular Languages

CS 121, Section 2. Week of September 16, 2013

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

Lecture 7 Properties of regular languages

2.1 Solution. E T F a. E E + T T + T F + T a + T a + F a + a

Proving languages to be nonregular

CSE 105 THEORY OF COMPUTATION

Name: Student ID: Instructions:

Comment: The induction is always on some parameter, and the basis case is always an integer or set of integers.

Intro to Theory of Computation

Sri vidya college of engineering and technology

Equivalence of DFAs and NFAs

ACS2: Decidability Decidability

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

Unit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Turing machines and linear bounded automata

Theory of Computation (II) Yijia Chen Fudan University

Theory of Computation

CSE 105 THEORY OF COMPUTATION

10. The GNFA method is used to show that

Mathematics for linguists

Exam 1 CSU 390 Theory of Computation Fall 2007

Notes on State Minimization

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

Turing machines and linear bounded automata

CSE 105 THEORY OF COMPUTATION

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Part 3 out of 5. Automata & languages. A primer on the Theory of Computation. Last week, we learned about closure and equivalence of regular languages

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

CS 275 Automata and Formal Language Theory

Notes for Comp 497 (Comp 454) Week 5 2/22/05. Today we will look at some of the rest of the material in Part 1 of the book.

1. Induction on Strings

What we have done so far

Lecture 2: Connecting the Three Models

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Non-regular languages

MTAT Introduction to Theoretical Computer Science

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Closure Properties of Context-Free Languages. Foundations of Computer Science Theory

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

COMP4141 Theory of Computation

CS481F01 Prelim 2 Solutions

1 Alphabets and Languages

The Separating Words Problem

Concatenation. The concatenation of two languages L 1 and L 2

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

Please give details of your answer. A direct answer without explanation is not counted.

More Properties of Regular Languages

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

Computational Models: Class 3

The Separating Words Problem

Mathematics for linguists

Constructions on Finite Automata

CS500 Homework #2 Solutions

Lecture 17: Language Recognition

CSCE 551: Chin-Tser Huang. University of South Carolina

Closure under the Regular Operations

highlights CSE 311: Foundations of Computing highlights 1 in third position from end Fall 2013 Lecture 25: Non-regularity and limits of FSMs

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages

Fooling Sets and. Lecture 5

Automata: a short introduction

Chapter 3. Regular grammars

Constructions on Finite Automata

Author: Vivek Kulkarni ( )

Inf2A: Converting from NFAs to DFAs and Closure Properties

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

The Pumping Lemma: limitations of regular languages

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

Computational Models - Lecture 3 1

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Theory of Computation

CS481F01 Solutions 6 PDAS

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

CPSC 421: Tutorial #1

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

Finite Automata and Regular languages

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CS243, Logic and Computation Nondeterministic finite automata

Turing machines and linear bounded automata

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)

Classes and conversions

Parsing Regular Expressions and Regular Grammars

Finite Automata (contd)

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

False. They are the same language.

1 More finite deterministic automata

Finite Automata, Palindromes, Powers, and Patterns

The efficiency of identifying timed automata and the power of clocks

Theory of Computation Lecture 1. Dr. Nahla Belal

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

V Honors Theory of Computation

Transcription:

1/13 Mathematics for linguists Gerhard Jäger gerhard.jaeger@uni-tuebingen.de Uni Tübingen, WS 2009/2010 November 26, 2009

2/13 The pumping lemma Let L be an infinite regular language over a finite alphabete Σ. There is a NFA M that accepts L. There is a number n such that M has n states. Almost all words in L consist of more than n letters. Let x L, with l( x) > n. There is a run of M that recognizes x. Since M has n states and l( x) > n, at least one state of M is visited more than once. Let q be the state that is visited more than once. x can be represented as y z w, such that between the initial state and q the string y is accepted, between the first and the second visit of q the string z is accepted, and between the second visit of q and the final state, the string w is accepted.

3/13 The pumping lemma Therefore: the loop from q to q, during which x is accepted, can be repeated arbitrarily many times. Hence: y z i w L, for arbitrary i 0.

4/13 The pumping lemma These considerations hold for arbitrary infinite regular languages. Theorem Let L be an infinite regular language over the alphabet Σ. Then there is a number n, such that all words x L with l( x) > n can be decomposed into x = y z w, such that the following facts hold: 1 l( z) 1, 2 l( y) + l( z) n, and 3 for all i N: y z i w L.

5/13 Applications of the pumping lemma The pumping lemma is useful if one wants to prove that a given language is not regular. Example: L = {a m b m m > 0} is not regular. Proof: Suppose L is regular. Then there is an n with the properties that are mentioned in the pumping lemma (the number of of states of the automaton that accepts L). a n b n L. a n b n = x y z, with l( x y) n, l( y) 1, and x z L. y = a j, for some j 1. Hence x z = a n j b n L, which is a contradiction to the definition of L. Hence L is not regular.

6/13 Applications of the pumping lemma Example: L = {a n b m m n > 0} is not regular. Proof: Suppose L is regular. Then there is an n > 0 with the properties that are mentioned in the pumping lemma. a n b n L. a n b n = x y z, with l( x y) n, l( y) 1, and x y z L. y = a j, for some j 1. Hence x y (n+1) m z L, and this is a contradiction to the definition of L. Hence L is not regular.

7/13 Applications of the pumping lemma In a similar way it is possible to show that for a Σ with at least two elements, the following languages are not regular: { w w w Σ } (the copy language ) { w w R w Σ } (the mirror language or palindrome language ) Somewhat more complex: L = { x {a, b} number of a in x = number of b in x}

8/13 Applications of the pumping lemma To prove that L is not regular, the following insight is important: Theorem If L 1 and L 2 are regular, then L 1 L 2 is regular. First we show that the complement of a regular language is also regular. This is almost obvious: If a DFA M accepts L, then you only have to turn the non-final states into final states and vice versa to get a DFA that accepts the complement L = Σ L. During the last lecture it was shown that the union of two regular languages is also regular. Thus, if L 1 and L 2 are regular, then L 1 and L 2 are also regular, and therefore alsoe L 1 L 2, and therefore alsoe L 1 L 2. According to de Morgan s law, this equals L 1 L 2.

9/13 Applications of the pumping lemma Proof that L = { x {a, b} number of a in x = number of b in x} is not regular: a b is regular, because this language can be described by a regular expression. Suppose L is regular. Then L a b = {a n b n n 0} must also be regular. It was shown above that this language is not regular. Hence L is not regular either.

10/13 Is English regular? With the help of the pumping lemma it is possible to show that natural languages are not regular. One possible argument for English runs as follows: It is possible to construct arbitrarily long sentences in English with the expressions either... or... : Either it rains or it snows. Either John believes that either it rains or it snows, or the sun is shining. Either it seems that either John believes that either it rains or it snows, or the sun is shining, or today is Thursday....

11/13 Is English regular? For every either in an English sentence, there is a corresponding or. The number of occurrences of or is thus at least as large as the number of occurrences of either. Regular languages are closed under the deletion of single elements from Σ: If I delete all occurrences of a given symbol let s say a in all words of a regular language L, the resulting language is again regular. (Proof: In a regular expression that describes L, replace all occurrences of a by ɛ.)

12/13 Is English regular? Suppose English is regular. More specifically, this means that the set E of all grammatical sentences of English is a regular language over the alphabet Σ (= the set of all morphemes of English). Then the language E, that is the result of deleting all morphemes except either and or in all English sentences, is also regular. E = { x {either, or} number of eithers in x number of ors in x}

Is English regular? either or is a regular language. Hence either or E = {either n or m m n} is regular. Since we proved above that this language is not regular, we have derived a contradiction. So we proved that the original assumption that E is regular must be false. Recursive constructions like the English either... or... can probably be found in all natural languages. 1 Hence Type-3 grammars are insufficient to describe natural languages. 1 There are claims that the South American language Pirahã does not have such constructions, but this is heavily contested; see http://de.wikipedia.org/wiki/piraha. 13/13