A Mathematical Approach to the Theory of Context-Free Languages
2025
https://doi.org/10.6084/M9.FIGSHARE.28440848…
81 pages
1 file
Sign up for access to the world's latest research
Abstract
Students are getting confused and losing interest in theoretical computer science because most instructors are doing a poor job in teaching the subject matter. Instructors are doing a poor job in teaching because they do not have a well-organized theory to explain the concepts and they are unwilling to spend the time to write up better lecture notes for the class. This paper presents a rigorous mathematical approach to the theory of context-free languages which doesn't currently exist in the literature of theoretical computer science. Basic definitions are developed in mathematical terms and used as the foundation for constructing mathematical proofs for theorems. It provides a model for instructors to write better lecture notes and authors to write better textbooks for educational purpose. It also corrects some critical errors and erroneous arguments that can be found in many textbooks which are widely used for the education of theoretical computer science. Students can use this paper for supplemental reading.
Related papers
2016
Context-free languages are highly important in computer language processing technology as well as in formal language theory. The Pumping Lemma is a property that is valid for all context-free languages, and is used to show the existence of non context-free languages. This paper presents a formalization, using the Coq proof assistant, of the Pumping Lemma for context-free languages.
Computational Linguistics, 1984
Let L range over all natural languages (NLs). For any L, one can consider two collections of strings of symbols, one consisting of all strings over the terminal vocabulary of L, call it W*(L), the other consisting of that always very proper subcollection of W*(L) consisting of all and only those members of W*(L) that are well-formed, that is, that
Kybernetika (Praha), 1967
The set E of strings is said to be definable (strongly definable) if there is a context-free grammar G such that E is the set of all terminal strings generated from the initial symbol (from all non terminal symbols) of G. The classification of definable and strongly definable sets in dependence on minimal number of nonterminal symbols needed for their generation is given.
The objective of the third edition of Languages and Machines: An Introduction to the Theory of Computer Science remains the same as that of the first two editions, to provide a mathematically sound presentation of the theory of computer science at a level suitable for junior-and senior-level computer science majors. The impetus for the third edition was threefold: to enhance the presentation by providing additional motivation and examples; to expand the selection of topics, particularly in the area of computational complexity; and to provide additional flexibility to the instructor in the design of an introductory course in the theory of computer science. While many applications-oriented students question the importance o f studying the oretical foundations, it is this subject that addresses the "big picture" issues of computer science. When today's programming languages and computer architectures are obsolete and solutions have been found for problems currently of interest, the questions considered in this book will still be relevant. What types of patterns can be algorithmically detected? How can languages be formally defined and analyzed? What are the inherent capabilities and limitations of algorithmic computation? What problems have solutions that require so much time or memory that they are realistically intractable? How do we compare the relative difficulty of two problems? Each of these questions will be addressed in this text. Organization Since most computer science students at the undergraduate level have little or no background in abstract mathematics, the presentation is intended not only to introduce the foundations of computer science but also to increase the student's mathematical sophistication. This is accomplished by a rigorous presentation of the concepts and theorems of the subject accompanied by a generous supply of examples. Each chapter ends with a set of exercises that reinforces and augments the material covered in the chapter. To make the topics accessible, no special mathematical prerequisites are assumed. Instead, Chapter 1 introduces the mathematical tools of the theory of computing; naive set x iv Preface theory, recursive definitions, and proof by mathematical induction. With the exception of the specialized topics in Sections 1.3 and 1.4, Chapters 1 and 2 provide background material that will be used throughout the text. Section 1.3 introduces cardinality and diagonalization, which are used in the counting arguments that establish the existence of undecidable languages and uncomputable functions. Section 1.4 examines the use of self-reference in proofs by contradiction. This technique is used in undecidability proofs, including the proof that there is no solution to the Halting Problem. For students who have completed a course in discrete mathematics, most of the material in Chapter 1 can be treated as review. Recognizing that courses in the foundations of computing may emphasize different topics, the presentation and prerequisite structure of this book have been designed to permit a course to investigate particular topics in depth while providing the ability to augment the primary topics with material that introduces and explores the breadth of computer science theory. The core material for courses that focus on a classical presentation of formal and automata language theory, on computability and undecidability, on computational complexity, and on formal languages as the foundation for programming language definition and compiler design are given in the following table. A star next to a section indicates that the section may be omitted without affecting the continuity of the presentation. A starred section usually contains the presentation of an application, the introduction of a related topic, or a detailed proof of an advanced result in the subject.
ACM SIGSOFT Software Engineering Notes, 2000
2017
We phrase parsing with context-free expressions as a type inhabitation problem where values are parse trees and types are context-free expressions. We first show how containment among context-free and regular expressions can be reduced to a reachability problem by using a canonical representation of states. The proofs-as-programs principle yields a computational interpretation of the reachability problem in terms of a coercion that transforms the parse tree for a context-free expression into a parse tree for a regular expression. It also yields a partial coercion from regular parse trees to context-free ones. The partial coercion from the trivial language of all words to a context-free expression corresponds to a predictive parser for the expression.
Context-Free Languages 130 4.1 Using Grammar Rules to Define a Language 130 4.2 Context-Free Grammars: Definitions and More Examples 134 4.3 Regular Languages and Regular Grammars 138 4.4 Derivation Trees and Ambiguity 141 4.5 Simplified Forms and Normal Forms 149 Exercises 154
2020
Context-free languages are widely used to describe the syntax of programming languages and natural languages. Usually, we describe a context-free language mathematically with the help of context-free grammar (for generation) or pushdown automata (for recognition). The purpose of this study is to describe some unconventional methods of description of context-free languages, namely a representation with the help of finite digraphs and with automata - generators of context-free languages. We will mainly focus on the mathematical models of these representations.
Computers & Mathematics with Applications, 1982
Theory of Computation is a valuable textbook, which has been much needed in most computer science curricula. Despite the existence of good advanced texts on computability, logic, analysis of algorithms, and formal languages and the recent advent of introductory discrete mathematics texts for computer science students, there has not been a comprehensive intermediate text in theoretical computer science. Lewis and Papadimitriou have provided such a text. The background required is a semester of discrete mathematics, and some mathematical maturity; thus the material would be suitable for a two semester course for thud year computer science or mathematics students. Judicious selection of topics would enable the presentation of a one semester course using this text, with the emphasis reflecting the preferences of the instructor. Chapter 1, "Sets, Relations, and Languages", provides a brief but remarkably thorough overview of the basic required concepts of discrete mathematics: an introduction to logic and set theory, relations and functions, and formal languages. Chapter 2 introduces finite automata as abstractions of real computing devices. Deterministic and nondeterministic finite automata are described: it is shown that they accept the same set of languages, the "regular" languages. The chapter concludes by showing that non-regular languages exist. Chapter 3 starts with the notion of a grammar and develops the natural correspondence between context-free languages, context-free grammars, and pushdown automata. Important properties of the context-free languages are derived; this leads into an excellent discussion of parsing techniques. Moving down the Chomsky hierarchy, Chapter 4 concerns Turing machines. The correspondence between accepting languages and computing functions is developed; then, from modest initial Turing machine computations, progressively more sophisticated ones are built. This culminates in the statement that all computable functions are computable by a Turing machine. Nondeterminism in Turing machines is introduced, and shown to leave unchanged the set of functions computed. Starting with Church's thesis, Chapter 5 discusses the equivalence of Turing machines, unrestricted grammars, and partial recursive functions. In the process, the primitive recursive functions are defined, and shown not to include all computable functions. The chapter concludes with universal Turing machines. Chapter 6 shows that some propositions are undecidable and some functions are uncomputable. The halting problem and Post's correspondence problem, among others, are considered. The chapter does not attempt detailed coverage of this area, but rather is an intelligent selection of topics. Chapter 7 proceeds to computational complexity, by introducing resource bounds on Turing machine computations. The complexity classes P and NP are defined, and their importance to everyday computation is emphasized. The NP-completeness of various combinatorial problems is proved. Chapters 8 and 9 change focus somewhat, to logicspecifically, the propositional calculus and the predicate calculus. Presentation of this material is fairly consistent from one text to another; notable in this presentation are the discussions of compactness and resolution theorem proving. In addition, parallels between unsolvability and NP-completeness are drawn. The choice of topics appears well considered, and the logical progression from topic to topic is very good. One topic which is omitted is the design and analysis of algorithms; however, the existence of good introductory and advanced texts in this area compensates for this. The book is well written and precise. Numerous exercises serve to illustrate and expand on the material covered in the body of the text. Worked examples are not provided, however, and would have to be provided in accompanying lectures. I see no serious drawbacks in this text, and as outlined here I see many strong points. In conclusion, I feel that the book is a valuable contribution to any computer science education.

Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.
References (4)
- Sipser, Michael. Introduction to the Theory of Computation, Third Edition. Dexter C. Kozen. Automata & Computability.
- John E. Hopcroft, Rajeev Motwani, Jeffrey D Ullman. Introduction to Automata Theory, Languages, & Computation, Third Edition.
- Seymour Lipschutz, Marc Lars Lipson. Discrete Mathematics, Second Edition.
- Kwan, Chac. A Mathematical Approach to the Theory of Finite Automata, 10.6084/m9.figshare.26232644, https://figshare.com/articles/journal_contribution/A_Mathematical_Approach_to_the_Theory_of_Finite _Automata_pdf/26232644?file=47541602