The Wayback Machine - https://web.archive.org/web/20241126203144/https://www.geeksforgeeks.org/kleenes-theorem-in-toc-part-1/
Open In App

Kleene’s Theorem in TOC | Part-1

Last Updated : 04 Sep, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

A language is said to be regular if it can be represented by using Finite Automata or if a Regular Expression can be generated for it. This definition leads us to the general definition that; For every Regular Expression corresponding to the language, a Finite Automata can be generated.

For certain expressions like:- (a+b), ab, (a+b)*; It’s fairly easier to make the Finite Automata by just intuition as shown below. The problem arises when we are provided with a longer Regular Expression. This brings about the need for a systematic approach towards Finite Automata generation, which Kleene has put forward in Kleene’s Theorem.

For any Regular Expression r that represents Language L(r), there is a Finite Automata that accepts same language.

Regular Expression

Regular Expression

To understand Kleene’s Theorem-I, Let’s take into account the basic definition of Regular Expression where we observe that $\phi$       , $\epsilon$       and a single input symbol “a” can be included in a Regular Language and the corresponding operations that can be performed by the combination of these are: Say, $r_1$       and $r_2$       be two regular expressions. Then,

  1. $r_1$       +$r_2$       is a regular expression too, whose corresponding language is L($r_1$       ) U L($r_2$       )
  2. $r_1$       .$r_2$       is a regular expression too, whose corresponding language is L($r_1$       ).L($r_2$       )
  3. $r_1$       * is a regular expression too, whose corresponding language is L($r_1$       )*

Observations From Kleene Theorem

We can further use this definition in association with Null Transitions to give rise to a FA by the combination of two or smaller Finite Automata (each corresponding to a Regular Expression). Let S accept L = {a} and T accept L = {b}, then R can be represented as a combination of S and T using the provided operations:

Union Operation

R = S + T


Union Operation

Union Operation


Observations:

  • In the case of union operation, we can have a new start state, from which, the null transition proceeds to the starting state of both the Finite State Machines.
  • The final states of both the Finite Automata are converted to intermediate states. The final state is unified into one which can be traversed by null transitions.

Concatenation Operation

R = S.T 


Concatenation Operation

Concatenation Operation


Observations:

  • In the case of a concatenation operation we can have the same starting state as that of S, the only change occurs in the end state of S, which is converted to an intermediate state followed by a Null Transition.
  • The Null transition is followed by the starting state of T, and the final state of T is used as the end state of R.

Exponential Operation

 R = S*


Exponential Operation

Exponential Operation


Observations:

  • A new starting state is added, and S has been put as an intermediate state so that the self-looping condition could be incorporated.
  • Starting and Ending states have been defined separately so that the self-looping condition is not disturbed.

Now that we are aware of the general operations. Let’s see how Kleene’s Theorem-I can be used to generate a FA for the given Regular Expression.

Example: Make a Finite Automata for the expression (ab+a)* 


Kleene Algorithm

Kleene Algorithm

We see that using Kleene’s Theorem – Gives a systematic approach towards the generation of Finite Automata for the provided Regular Expression.

FAQs on Kleene’s Theorem

Q. 1: Does Kleene Theoram only restricted to Turing Machine?

Answer:

Kleene Theoram is primarily for Turing Machines only, but some similar self reference concepts can be formed in other machine models also.

Q. 2: Is it possible to implement Kleene Theoram practically?

Answer:

Kleene Theoram is basically a theoretical concept that does not have any direct practical applications. Computer Scientists understand the boundations, limitations with respect to this algorithm.

Q. 3: Is there any relation between Kleene Theoram and Halting Algorithm?

Answer:

Kleene Theoram and Halting Problem are closely related to each other as these both concepts involve self-reference and highlight the algorithmic solution limitation.




Previous Article
Next Article

Similar Reads

Basic Theorems in TOC (Myhill nerode theorem)
The Myhill Nerode theorem is a fundamental result coming down to the theory of languages. This theory was proven by John Myhill and Anil Nerode in 1958. It is used to prove whether or not a language L is regular and it is also used for minimization of states in DFA( Deterministic Finite Automata). To understand this theorem, first we need to unders
3 min read
Four Color Theorem and Kuratowski’s Theorem in Discrete Mathematics
The Four Color Theorem and Kuratowski's Theorem are two fundamental results in discrete mathematics, specifically in the field of graph theory. Both theorems address the properties of planar graphs but from different perspectives. In this article, we will understand about Four Color Theorem and Kuratowski’s Theorem in Discrete Mathematics, their de
14 min read
Computable and non-computable problems in TOC
Computable Problems - You are familiar with many problems (or functions) that are computable (or decidable), meaning there exists some algorithm that computes an answer (or output) to any instance of the problem (or for any input to the function) in a finite number of simple steps. A simple example is the integer increment operation: f(x) = x + 1 I
6 min read
Determining Countability in TOC
Countable Set is a set having cardinality same as that of some subset of N the set of natural numbers . A countable set is the one which is listable. Cardinality of a countable set can be a finite number. For example, B: {1, 5, 4}, |B| = 3, in this case its termed countably finite or the cardinality of countable set can be infinite. For example, A:
3 min read
Decidability, Semi-Decidability, and Undecidability in TOC
We know about Decidable, Semi-decidable, and Undecidable problems and in this article, we will briefly define these problems and provide the most commonly asked questions on these problems and classify them accordingly. Prerequisite - https://www.geeksforgeeks.org/decidable-and-undecidable-problems-in-theory-of-computation/ Introduction :Identifyin
3 min read
Closure properties Table in TOC
The Below Table shows the Closure Properties of Formal Languages : REG = Regular LanguageDCFL = deterministic context-free languages, CFL = context-free languages,CSL = context-sensitive languages,RC = Recursive.RE = Recursive Enumerable Consider L and M are regular languages : The Kleene star - ∑*, is a unary operator on a set of symbols or string
3 min read
Undecidability and Reducibility in TOC
Decidable Problems A problem is decidable if we can construct a Turing machine which will halt in finite amount of time for every input and give answer as ‘yes’ or ‘no’. A decidable problem has an algorithm to determine the answer for a given input. Examples Equivalence of two regular languages: Given two regular languages, there is an algorithm an
5 min read
Mealy and Moore Machines in TOC
Moore and Mealy Machines are Transducers that help in producing outputs based on the input of the current state or previous state. In this article we are going to discuss Moore Machines and Mealy Machines, the difference between these two machinesas well as Conversion from Moore to Mealy and Conversion from Mealy to Moore Machines. Moore Machines M
3 min read
Advanced master theorem for divide and conquer recurrences
The Master Theorem is a tool used to solve recurrence relations that arise in the analysis of divide-and-conquer algorithms. The Master Theorem provides a systematic way of solving recurrence relations of the form: T(n) = aT(n/b) + f(n) where a, b, and f(n) are positive functions and n is the size of the problem. The Master Theorem provides conditi
5 min read
Consensus Theorem in Digital Logic
Prerequisite - Properties of Boolean algebra, Minimization of Boolean Functions Redundancy theorem is used as a Boolean algebra trick in Digital Electronics. It is also known as Consensus Theorem: AB + A'C + BC = AB + A'C The consensus or resolvent of the terms AB and A'C is BC. It is the conjunction of all the unique literals of the terms, excludi
3 min read
Arden's Theorem in Theory of Computation
Arden's theorem state that: "If P and Q are two regular expressions over "∑", and if P does not contain "∈" , then the following equation in R given by R = Q + RP has a unique solution i.e., R = QP*." That means, whenever we get any equation in the form of R = Q + RP, then we can directly replace it with R = QP*. So, here we will first prove that R
4 min read
Parikh's Theorem
Introduction :Parikh's theorem in theoretical computer science says that if one looks only at the number of occurrences of each terminal symbol in a context-free language, without regard to their order, then the language is indistinguishable from a regular language. It is useful for deciding that strings with a given number of terminals are not acc
5 min read
Minimization of DFA using Myhill-Nerode Theorem
Minimization of DFA using Myhill-Nerode Theorem :Minimization of DFA is Required to obtain the minimal and equivalent version of any DFA which consists of minimum number of states possible. Myhill-Nerode theorem can be used to convert a DFA to its equivalent DFA with minimum no of states. This method of minimization is also called Table filling met
5 min read
5 Color Theorem in Graph Theory
The graph is a data structure that is used extensively in real-life. Planar Graph: If a graph can be drawn on the plane without crossing, it is said to be planar. Coloring of a simple graph is the assignment of color to each vertex of the graph so that no two adjacent vertices are assigned the same color. Bi-Partite Graphs: A bipartite graph, also
4 min read
Quotient Remainder Theorem
The Quotient Remainder Theorem is a fundamental result in arithmetic and algebra that describes the relationship between dividend, divisor, quotient, and remainder. This theorem is crucial in understanding division in the set of integers and has significant applications in number theory, computer science, and engineering. Table of Content What is t
8 min read
Rolle's Mean Value Theorem
Rolle's theorem one of the core theorem of calculus states that, for a differentiable function that attains equal values at two distinct points then it must have at least one fixed point somewhere between them where the first derivative of the function is zero. Rolle's Theorem and the Mean Value Theorem are fundamental results in differential calcu
8 min read
Cauchy's Mean Value Theorem
Cauchy's Mean Value theorem provides a relation between the change of two functions over a fixed interval with their derivative. Cauchy Mean Value Theorem is a special case of Lagrange Mean Value Theorem. Cauchy's Mean Value theorem is also called the Extended Mean Value Theorem or the Second Mean Value Theorem. In this article, we will learn about
8 min read
Lagrange's Mean Value Theorem
Lagrange's Mean Value Theorem (LMVT) is a fundamental result in differential calculus, providing a formalized way to understand the behavior of differentiable functions. This theorem generalizes Rolle's Theorem and has significant applications in various fields of engineering, physics, and applied mathematics. This article explores Lagrange's Mean
9 min read
Bayes's Theorem for Conditional Probability
Bayes's Theorem for Conditional Probability: Bayes's Theorem is a fundamental result in probability theory that describes how to update the probabilities of hypotheses when given evidence. Named after the Reverend Thomas Bayes, this theorem is crucial in various fields, including engineering, statistics, machine learning, and data science. This art
9 min read
DBMS Tutorial – Learn Database Management System
Database Management System is a software or technology used to manage data from a database. Some popular databases are MySQL, Oracle, MongoDB, etc. DBMS provides many operations e.g. creating a database, Storing in the database, updating an existing database, delete from the database. DBMS is a system that enables you to store, modify, and retrieve
8 min read
Difference Between IPv4 and IPv6
The address through which any computer communicates with our computer is simply called an Internet Protocol Address or IP address. For example, if we want to load a web page or download something, we require the address to deliver that particular file or webpage. That address is called an IP Address. There are two versions of IP: IPv4 and IPv6. IPv
7 min read
Differences between TCP and UDP
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) both are protocols of the Transport Layer Protocols. TCP is a connection-oriented protocol whereas UDP is a part of the Internet Protocol suite, referred to as the UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. In this article, we will discuss the diffe
9 min read
Types of Operating Systems
An Operating System performs all the basic tasks like managing files, processes, and memory. Thus, the operating system acts as the manager of all the resources, i.e. resource manager. Thus, the operating system becomes an interface between the user and the machine. It is one of the most required software that is present in the device. Operating Sy
11 min read
TCP/IP Model
The TCP/IP model is a fundamental framework for computer networking. It stands for Transmission Control Protocol/Internet Protocol, which are the core protocols of the Internet. This model defines how data is transmitted over networks, ensuring reliable communication between devices. It consists of four layers: the Link Layer, the Internet Layer, t
13 min read
What is OSI Model? - Layers of OSI Model
The OSI (Open Systems Interconnection) Model is a set of rules that explains how different computer systems communicate over a network. OSI Model was developed by the International Organization for Standardization (ISO). The OSI Model consists of 7 layers and each layer has specific functions and responsibilities. This layered approach makes it eas
14 min read
Types of Network Topology
Network topology refers to the arrangement of different elements like nodes, links, or devices in a computer network. Common types of network topology include bus, star, ring, mesh, and tree topologies, each with its advantages and disadvantages. In this article, we will discuss different types of network topology in detail. What is Network Topolog
12 min read
Domain Name System (DNS) in Application Layer
The Domain Name System (DNS) is like the internet's phone book. It helps you find websites by translating easy-to-remember names (like www.example.com) into the numerical IP addresses (like 192.0.2.1) that computers use to locate each other on the internet. Without DNS, you would have to remember long strings of numbers to visit your favorite websi
9 min read
ACID Properties in DBMS
This article is based on the concept of ACID properties in DBMS that are necessary for maintaining data consistency, integrity, and reliability while performing transactions in the database. Let's explore them. A transaction is a single logical unit of work that accesses and possibly modifies the contents of a database. Transactions access data usi
7 min read
Introduction of ER Model
Peter Chen developed the ER diagram in 1976. The ER model was created to provide a simple and understandable model for representing the structure and logic of databases. It has since evolved into variations such as the Enhanced ER Model and the Object Relationship Model The Entity Relational Model is a model for identifying entities to be represent
10 min read
Normal Forms in DBMS
Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion, and update anomalies. So, it helps to minimize the redundancy in relations. Normal forms are used to eliminate or reduce redundancy in database tables. Normalization of DBMSIn database management systems (
12 min read
Article Tags :
three90RightbarBannerImg