Prerequisite – Finite automata introduction All programming languages can be represented as a finite automata. C, Paskal, Haskell, C++, all of them have a specific structure, grammar, that can be represented by a simple graph. Most of the graphs are NFA’s or DFA’s. But NFA’s and DFA’s determine the simplest possible language group: group of regular languages [Chomsky’s hierarchy]. This leaves us with a question: what about all other types of languages? One of the answers is Turing machine, but a Turing machine is hard to visualize. This is why in this article I will tell you about a type of finite automata called an L-graph. In order to understand how L-graphs work we need to know what type of languages L-graphs determine. To put it simply, L-graphs represent context-sensitive type of languages [and every other type that the context-sensitive group contains]. If you don’t know what “context-sensitive” means, let me show you an example of a language that can be represented by an L-graph and not by any easier type of finite automata. This language is
Example
A real-life example of using L-graphs could be in the context of a company’s organizational structure.
Imagine a company with different departments (sales, marketing, finance, HR, etc.) and each department has different sub-departments. We can represent this organizational structure as a graph where each vertex represents a department and the edges represent the relationships between them (i.e, which department is a sub-department of another).
Now, let’s say we want to represent the relationships between the managers of each department. We can create an L-graph, where each vertex represents a manager and the edges represent the relationships between them (i.e, which manager is the supervisor of another).
In this scenario, the original graph represents the overall structure of the company, while the L-graph represents the relationship between the managers. This can be useful for understanding the chain of command and decision-making processes within the company.
It’s worth to mention that this is a simple example and in real life scenarios L-graphs can be used to represent much more complex systems and relations and these graphs are used in various fields such as computer science, mathematics, physics, and engineering.