THE RELATIONSHIP BETWEEN THE CHOMSKY HIERARCHY AND AUTOMATA GEORGE KIM Abstract. This paper will informally detail the hierarchy of classes in au- tomata theory. The concept and model of each automaton will be introduced, including a basic diagram and mathematical representation. In order to es- tablish the hierarchy, examples and theorems will be given, showing how some problems can be solved by one automaton but not by another. Contents 1. Introduction 1 2. Finite Automaton 2 2.1. Deterministic Finite Automata 2 2.2. Non-deterministic Finite Automaton 3 2.3. Epsilon Transitions 3 3. Pushdown Automata 5 4. Grammars 6 4.1. Production Rules 6 4.2. Pumping Lemmas 7 5. Turing Machines 8 5.1. The Limits of Turing Machines 9 Appendix A. The Chomsky Hierarchy 10 Acknowledgments 10 References 10 1. Introduction The field of automata theory focuses on the study of automata and abstract machines, which are essentially models of computation such that when enacted, certain computational problems can be solved. Automata are very simple in their workings, often taking in basic inputs and moving in defined ways, almost like a chess piece on a chessboard. As automata get more advanced in their models, they obtain the ability to solve a larger set of computational problems. In essence, the classes of automata and abstract machines follow a hierarchy, where machines of higher classes can solve the problems that machines of lower classes can, and more. It will be seen that automata are closely linked to formal languages and grammars, which have an organizational structure called the Chomsky Hierarchy. The rest of this paper will go through the hierarchy of automata, their associated grammars, Date: DEADLINES: Draft AUGUST 19 and Final version AUGUST 31, 2019. 1 2 GEORGE KIM and walk through examples of of problems that these machines can and cannot solve. 2. Finite Automaton The first type of model/machine encountered in automata theory are the finite automata, or finite state machines. Finite automata are well represented by the 5-tuple (Q; Σ; δ; q0;F ). Definition 2.1. Finite automata are defined by the 5-tuple (Q; Σ; δ; q0;F ), where:. • Q is the finite set of states • Σ is the alphabet (a finite set of symbols) • δ is the transition function, which defines which state the FA moves to when given an input • q0 2 Q is the initial or start state • F ⊆ Q is the set of accepting or final states In terms of finite automata, there are two subclasses of automata, the determin- istic finite automaton (DFA) and the non-deterministic finite automaton (NFA). 2.1. Deterministic Finite Automata. The deterministic finite automaton, re- ferred to as a DFA, is the simplest version of the finite automata. The machine accepts one simple input, such as a number, at which point the transition function defines a determined (hence deterministic) shift to a certain state. The transition function can be represented in several ways, but it is formally defined as a function: Definition 2.2. For a deterministic finite automaton, the transition function δ(q; a) takes in a state q 2 Q and input a 2 Σ and returns one state q∗ 2 Q that the DFA would enter. Typically, the user will feed the machine a list of these inputs, called a string. The machine will process these inputs individually in the order given, moving from state to state until it processes all of the string's contents. At the end of a string, if the machine ends up in one of its defined accepting or end states, the string is accepted, or deemed valid by the machine. Consider the following transition diagram of a DFA, another representation to the 5-tuple: 0 q1 0 1 start q0 q3 1 0 q2 1 The 5-tuple would be defined as follows: THE RELATIONSHIP BETWEEN THE CHOMSKY HIERARCHY AND AUTOMATA 3 • Q = q0; q1; q2; q3 • Σ = 0; 1 • q0 = q0 • F = q3 • δ shown as a transition table: Present State Next State when 0 Inputted Next State when 1 Inputted q0 q1 q2 q1 q1 q3 q2 q3 q1 This particular DFA has an alphabet with two possible inputs: 0 or 1. Depending on which state (qn) the DFA is in, these inputs have a defined behavior, clearly shown by the diagram and table. In this particular DFA, q3 is the accepting state, signaling the end of the DFA's computation process. Through some simple test cases, one realizes that the DFA only reaches the end state once both the 0 and 1 inputs have been used. In essence, if the DFA receives 0 as the first input, it will not reach the accepting state until a 1 has been inputted, and vice versa. This can be signified by the notation 0n1 or 1n0. This DFA can thus detect whether a given string of inputs contains two different inputs or not. 2.2. Non-deterministic Finite Automaton. A non-deterministic finite automa- ton, shortened to NFA, is similar to the DFA, except that the transition function has a slightly altered definition: Definition 2.3. For a non-deterministic finite automaton, the transition function δ(q; a) takes in a state q 2 Q and input a 2 Σ and returns one or more states fq∗g ⊆ Q that the DFA would enter. Based on this definition, it is easy to see that all deterministic finite automata are non-deterministic finite automata, but not the other way around. In other words, the set of all DFAs is a subset of all the NFAs. To gain a greater familiarity with nondeterminism, observe the following transition diagram of an NFA: 0 0, 1 0, 1 start q0 q1 q2 1 0 At first glance, the transition diagrams of a NFA and DFA don't look glaringly different. In fact, the only difference between the two is that for a DFA, a given input can only appear on one path from a given state. The NFA can have one input appear on multiple paths from one state. For example, in the NFA above, when in the state q0, the input 0 can lead to either q0 or q1. A DFA cannot have multiple paths like these, hence why it is deterministic. Despite this difference, there is no further scope of computational power attained by the NFA over the DFA. In fact, the premise of the NFA is that it can be compiled into a DFA [1]. That is, there is an algorithm to convert a NFA to a DFA [6]. 2.3. Epsilon Transitions. There is a further abstraction of the finite automata with the introduction of -transitions. -transitions do not change the scope of 4 GEORGE KIM computational power, but provide a shorthand of sorts to draw an NFA without the potentially tenacious task of drawing every input transition possible [1]. The -transition allows the NFA to move to a state with no input, signified by , the empty string. This is certainly a peculiar idea at first. Here is an example for aid: 1 q1 0 1 1 start q0 q2 As like any NFA, when starting at q0, the start state, two inputs could occur, 0 or 1. Informally, the -transition allows the NFA to be in multiple states simulta- neously. Any state connected to the current state q via an -transition is said to be within ECLOSE(q). If 0 is the input, the NFA can stay in state q0, but it can also be in state q2 due to the -transition. If 1 is the input, the NFA can only be in state q1, since if we follow that the NFA had been in state q2 at the time as well, there is no transition defined for 1, so this path just dies. As such, a few mental test cases show that the NFA can accept zero or more 0s followed by either two or more 1s or just nothing. In other words, the NFA will accept the empty string (), 0∗, or 0∗11∗1, shortened to 0∗ + 0∗11∗1. Else, the machine runs into an undefined path, thus the string is not accepted. An -NFA certainly is more complicated than a normal NFA, but as previously mentioned, the introduction of the -transition does not actually grant further com- putational power. In essence, this means that all possible input strings accepted by an -NFA, called its language, is also accepted by some NFA, and as a result, a DFA as well [1]. The premise behind converting an -NFA to a DFA involves first removing the transitions to obtain a normal NFA, then converting that NFA to a DFA. Removing the transitions involves considering all possible inputs that lead to a certain state and then creating a new pathway with that input to all states within ECLOSE(q). A formal algorithm exists for this process [7], but for a simple example, observe the given -NFA: 1 q1 q3 1 start q0 q5 1 q2 q4 1 Since q1 and q2 are connected to q0 by an -transition, ECLOSE(q0)=fq1; q2g. Now, when starting at q0, the -transition makes us imagine that we are currently in all states of ECLOSE(q0) at the same time. Thus, when the input 1 is given, THE RELATIONSHIP BETWEEN THE CHOMSKY HIERARCHY AND AUTOMATA 5 the machine arrives in q3, q2, and q4. In fact, the machine also arrives in q5 since when arriving in q3, there is an -transition to q5, meaning we can reach that state without any input. Knowing this, the equivalent DFA is obtained: 1 start q0; q1; q2 q2; q3; q4; q5 Though a formal proof exists, intuition correctly asserts that the ability to con- vert -NFAs to DFAs means that these finite automata all accept the same languages [1].
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-