Skip to main content
CF

Automata Theory: inside a RegExp machine

1h 48m 5s
English
Paid

State machines are a fundamental concept utilized in a myriad of practical applications today, ranging from UI programming like React, automated reply systems, lexical analysis in parsers, to formal language theory — specifically, Regular Expression (RegExp) machines. Beyond the digital realm, state machines find usage in everyday devices such as traffic lights and vending machines.

The concept of state machines is deeply embedded in the broader theoretical field known as the Theory of Computation, supported directly by Automata Theory. In this course, we explore Automata Theory through the practical lens of implementing a Regular Expressions machine.

Why Take This Class?

It's a well-known fact that major technology companies like Google and Facebook focus their recruitment processes around generalist engineers who comprehend fundamental systems, data structures, and algorithms. The industry often sees a surplus of "programmers" but a shortage of capable "engineers". What distinguishes an "engineer" is their ability to solve complex problems with a deep understanding of these foundational concepts.

There is a simple strategy to acquire extensive experience with transferable knowledge to other systems. By engaging with a complex theoretical field, perhaps unrelated to your current job, and implementing it in a familiar programming language, you enrich your understanding of the various data structures and algorithms involved. By focusing on something generic like State machines, this knowledge becomes applicable to your regular work.

This course embraces this methodology. To delve into Automata “Theory”, we adopt a practical approach by focusing on its widely-used applications in lexical analysis and pattern matching to construct a RegExp machine. This way, not only do we gain an in-depth understanding of how Regular Expressions function under the hood—enhancing their professional usage—but we also prepare to apply our knowledge of formal grammars, languages, and finite automata (NFAs, DFAs, etc.) in other areas of our work.

Who Is This Class For?

Designed for any curious engineer eager to gain a foundational understanding of Finite Automata and Regular Expressions. However, this class is not focused on how to use regular expressions (a prerequisite is having a working knowledge and regular use of them) but rather on how to implement them, with an eye towards mastering complex generic systems.

Moreover, lexical analysis (specifically NFAs and DFAs) is at the heart of parser theory. If you're aiming to comprehend how parsers function, particularly the Tokenizer or "Lexer" module, this class serves as an excellent starting point. The journey to becoming a compiler engineer begins with mastering Finite Automata and lexical analysis.

Features of the Class

The key features of these lectures include:

  • Concise and Direct Content. Each lecture is self-contained and focuses on core material, steering clear of unrelated topics for maximum effectiveness.

  • Dynamic Presentation with Live-Editing Notes. This combination simplifies topic comprehension and clarifies the temporal connections between object structures. Static slides are insufficient for engaging with such complex content!

About the Author: Dmitry Soshnikov

Dmitry Soshnikov thumbnail

Dmitry Soshnikov is a Russian software engineer and educator focused on programming-language internals, compiler construction, JavaScript engine architecture, and the theoretical computer-science foundations underneath modern software development. His independent course catalog is one of the deepest sources of long-form material on language implementation available outside university CS programs.

His CourseFlix listing carries nine courses spanning parser combinators, interpreter construction, garbage-collection algorithm internals, the design of pattern-matching engines, and JavaScript object-model deep dives. Material is paid and aimed at engineers who want to understand how the languages they use every day actually work under the hood.

Watch Online 16 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 16 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: RegExp history
All Course Lessons (16)
#Lesson TitleDurationAccess
1
RegExp history Demo
05:09
2
Regular grammars
09:32
3
Finite automata
09:09
4
Character and Epsilon NFA
07:09
5
Concatenation pattern: AB
06:42
6
Union pattern: A|B
06:53
7
Kleene closure: A*
06:04
8
Complex machines
04:33
9
Syntactic sugar
03:30
10
NFA optimizations
04:48
11
NFA acceptor
05:19
12
NFA table
08:17
13
RegExp-Tree tool
04:53
14
DFA table
09:45
15
DFA minimization
10:59
16
RegExp match
05:23
Unlock unlimited learning

Get instant access to all 15 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites are needed for this course?
This course is aimed at individuals with a foundational understanding of programming and computer science concepts. Familiarity with basic data structures and algorithms is beneficial, as the course delves into finite automata and other aspects of Automata Theory. No prior knowledge of Regular Expressions is required, but an understanding of programming logic will help in grasping the course content effectively.
What projects or exercises will I work on during the course?
Throughout the course, you will engage in various exercises involving the implementation and optimization of finite automata. You will explore different patterns such as concatenation, union, and Kleene closure within regular expressions. Additionally, you'll work on building complex state machines and optimizing NFA (Non-deterministic Finite Automata) using tools like the RegExp-Tree.
Who is the target audience for this course?
The course is designed for individuals interested in deepening their understanding of computational theory, particularly those who aim to strengthen their skills in system design and algorithm development. It is ideal for software engineers, computer science students, and professionals seeking to enhance their knowledge of foundational engineering concepts used in technology companies.
How does this course compare in depth to other courses on similar topics?
This course offers a detailed exploration of Automata Theory with a focus on practical application through Regular Expression machines. Unlike introductory courses, it emphasizes the implementation and optimization of finite automata, providing insight into both theoretical concepts and practical tools like DFA and NFA tables. It goes beyond basic theory by addressing real-world applications and optimizations.
What specific tools or platforms will I learn to use?
During the course, you will learn to use the RegExp-Tree tool, which is integral for understanding and optimizing regular expressions. Additionally, you will work with tables for DFA (Deterministic Finite Automata) and NFA, gaining hands-on experience in manipulating and minimizing these structures.
What topics are not covered in this course?
The course does not cover advanced topics in the broader Theory of Computation, such as Turing machines or computational complexity theory. It focuses specifically on finite automata and Regular Expressions, without delving into advanced parsing techniques or other forms of automata used beyond the scope of regular languages.
How much time should I expect to commit to this course?
The course consists of 16 lessons, and while the exact runtime is not specified, students should anticipate dedicating time not only to the lessons themselves but also to practicing exercises and implementing projects. The time commitment will vary depending on individual learning pace and prior familiarity with the subject matter.