Algebraic Characterization of Regular Languages
Total Page:16
File Type:pdf, Size:1020Kb
Algebraic Characterization of Regular Languages Chloe Sheen Advised by Professor Steven Lindell A Thesis Presented in Partial Fulfillment of Bachelor's Degree Department of Computer Science Bryn Mawr College Abstract This paper presents the proof provided by Marcel-Paul Sch¨utzenberger, which connects regular language theory and algebraic automata theory. The two fundamental areas of study in mathematics and theoretical computer sci- ence hold a notable relationship, which motivated the discussion surrounding this topic. On a high-level perspective, Sch¨utzenberger's theorem bridges the two areas of study using languages recognized by aperiodic monoids to re- late them to star-free regular expressions. By outlining the essential ideas in both automata theory and group theory, we attempt to produce a more comprehensible document for both computer scientists and mathematicians to discuss this topic. Contents 1 Introduction 2 1.1 Background . .2 1.2 Motivations and Goals . .3 2 Notations, Definitions, and Examples 5 2.1 Finite Automata and Regular Languages . .5 2.2 Detailed Examples . .8 2.3 Algebra: Group Theory . 15 3 Sch¨utzenberger's theorem 20 4 Further Readings 27 5 Conclusion 28 1 Chapter 1 Introduction 1.1 Background Mathematics is the foundation of computing, and computing is often a key component in mathematical problem-solving. For instance, linear algebra is heavily used in computer graphics, graph theory forms the basis of network analysis, and number theory is used for cryptography. Such relationship between the two disciplines has inevitably resulted in the shared interest and involvement of both mathematicians and computer scientists in the study of formal languages. Formal language is composed of strings formed by letters from an alphabet along with a specific set of properties. This concept is often introduced in undergraduate computer science courses for its more practical connections to the field. This paper will specifically focus on regular languages, which are formal languages that can be expressed using regular expressions. Regular expres- sions describe the lexical tokens in syntactic specifications of programming languages, describe the textual patterns that trigger processing actions in text manipulation systems, and serve as the basis of standard utilities in pattern matching. Regular language theory provides the theoretical basis of pattern matching utilities including text tools awk, a text-manipulation language, and grep, a Unix utility that searches for lines in files that match a pattern [2]. Beyond its wide range of applications, regular languages are an important part of theoretical computer science. In theoretical computer science, formal language theory is closely tied 2 Algebraic Characterization of Regular Languages to the study of computability theory and computational complexity. Com- putability theory studies whether problems are computationally solvable us- ing different representations of algorithms and languages, and computational complexity considers the inherent difficulty of evaluating computational prob- lems [1]. Regular language theory also has connections with areas of mathematics in various fundamental fields including algebra and logic. The two areas of study have been bridged by Marcel-Paul Sch¨utzenberger's theorem, which essentially relates languages recognized by aperiodic monoids with star-free regular languages. 1.2 Motivations and Goals Given the equivalence of regular languages and finite automata as Kleene's theorem [4] states along with the relationship of regular languages and finite algebra, we were motivated to embed regular languages into a pure math- ematical system. This paper will explore the algebraic characterization of regular languages in order to (1) provide computer scientists with a more comprehensible introduction to algebraic automata theory, and to (2) introduce mathematicians to the area of formal languages. We believe that with the provided background in automata theory and algebra in this paper, coupled with an explanation of star-free expressions, establishing Sch¨utzenberger's theorem to connect the two fields of study will come naturally. The contents of this paper will be organized into the following structure: • In Section 2, we provide the background that is required for discussing Sch¨utzenberger's theorem. { In Section 2.1, we introduce standard notations, definitions, and simple examples of finite automata and regular languages. { In Section 2.2, we give several detailed examples of regular lan- guages, their representation in finite automata, and their monoid representations. Chapter 1 3 Algebraic Characterization of Regular Languages { In Section 2.3, we introduce group theory, provide several detailed examples of mapping strings to monoids, and finally prove that monoids and finite automata are equivalent. • In Section 3, we state our definition of star-free expressions, ideals of monoids, and provide the proof of Sch¨utzenberger's theorem in a way that is more accessible to both mathematicians and computer scientists, which is our major contribution in this work. • In Section 4, we briefly discuss further readings that may inspire further work with this subject. • In Section 5, we conclude the work by restating the major points of this paper. Below is the general diagram that illustrates the sequence of the main points that we will cover in order to successfully unpack Sch¨utzenberger's theorem. The idea of aperiodic monoids and star-free expressions will be introduced in section 2.3 and section 3, respectively. Regular FSA Monoid language Star free Aperiodic Chapter 1 4 Chapter 2 Notations, Definitions, and Examples The following subsections introduce the standard notations and defini- tions this paper will follow to establish Sch¨utzenberger's theorem. Each of the definitions and concepts are accompanied by relevant examples. 2.1 Finite Automata and Regular Languages Finite automata are the simplest computational model. They are used to recognize patterns within input taken from some set of characters by accept- ing or rejecting an input. Automata bridge the theory of formal language to computation. From a mathematical perspective, we require a more precise, notation-based definition of finite automata. In essence, a finite automaton is composed of several parts: a set of states, an input alphabet, a start state, rules that connect one state to another depending on the input symbol, and accept states. We will use the standard definition of finite automata in this paper: Definition 1. [8] A finite automaton is a 5-tuple (Q, Σ, δ, q0, F), where (i) Q is a finite set called the states, (ii) Σ is a finite set called the alphabet, (iii) δ :Q × Σ ! Q is the transition function, 5 Algebraic Characterization of Regular Languages (iv) q0 2 Q is the start state, and (v)F ⊆ Q is the set of accept states. From the five parts of the formal definition, we can use the notation to describe finite automata by specifying each of the components of the 5-tuple. Example 1. Here is a finite automaton M1. a a b start q1 q2 b Figure 2.1: State diagram of the two-state finite automaton M1 In the formal definition, M1 is (fq1, q2g, fa, bg, δ, q1, fq1g). The transition function δ is a b q1 q1 q2 q2 q2 q1. To better understand this machine, we can analyze it with an example input string. Consider the word w = abab. The machine starts in the start state q1, reads the first symbol of w, which is a, and proceeds to q1. It then reads the next symbol b, proceeds to q2, reads the next symbol a, stays in q2, and reads the last symbol b, taking us back to q1. Since q1 2 F, the automaton accepts the word. We will describe the languages using words in later sections. Example 2. Figure 2.2 shows another finite automaton M2. b a a; b a b start q1 q2 q3 Figure 2.2: State diagram of the three-state finite automaton M2 Chapter 2 6 Algebraic Characterization of Regular Languages Machine M2 has three states, with a formal definition of (fq1, q2, q3g, fa, bg, δ, q1, fq3g). The transition function δ is a b q1 q2 q1 q2 q2 q3 q3 q3 q3. Take w = baa. The machine starts in the start state q1, reads the first symbol of w, which is b, and stays in q1. It then reads the next symbol a, proceeds to q2, and reads the last symbol a, leaving us in q2. Since q2 2= F, the automaton rejects the word. In both Example 1 and Example 2, we have given a formal definition of the automata. We can also give a formal definition of the automata's computation in the following way: Definition 2. [8] Let M = (Q, Σ, δ, q0,F ) be a finite automaton and let w = w1w2 ... wn be a string where each wi is a member of the alphabet Σ. Then M accepts w if a sequence of states r0; r1 ... rn in Q exists with three conditions: (i) r0 = q0 (ii) δ(ri, wi+1) = ri+1, for i = 0, ... , n − 1, and (iii) rn 2 F. M recognizes the language A if A = fw j M accepts wg. The following is the standard definition of regular language. Definition 3. Given an alphabet Σ, the collection of regular languages is defined by: • The empty set φ and the empty string are regular. • Each symbol a 2 Σ is regular. • If A and B are regular languages, then A • B (concatenation), A [ B (union), and A∗ (Kleene star) are regular languages Chapter 2 7 Algebraic Characterization of Regular Languages According to Kleene's theorem [4], a language is called a regular language if and only if there is some finite automaton that recognizes it. In other words, a FSA has the same expressive power as regular languages. We can revisit the previous examples to demonstrate this theorem. In Example 1, we can also run the machine on an input word w = aba.