
- Automata Theory - Applications
- Automata Terminology
- Basics of String in Automata
- Set Theory for Automata
- Finite Sets and Infinite Sets
- Algebraic Operations on Sets
- Relations Sets in Automata Theory
- Graph and Tree in Automata Theory
- Transition Table in Automata
- What is Queue Automata?
- Compound Finite Automata
- Complementation Process in DFA
- Closure Properties in Automata
- Concatenation Process in DFA
- Language and Grammars
- Language and Grammar
- Grammars in Theory of Computation
- Language Generated by a Grammar
- Chomsky Classification of Grammars
- Context-Sensitive Languages
- Finite Automata
- What is Finite Automata?
- Finite Automata Types
- Applications of Finite Automata
- Limitations of Finite Automata
- Two-way Deterministic Finite Automata
- Deterministic Finite Automaton (DFA)
- Non-deterministic Finite Automaton (NFA)
- NDFA to DFA Conversion
- Equivalence of NFA and DFA
- Dead State in Finite Automata
- Minimization of DFA
- Automata Moore Machine
- Automata Mealy Machine
- Moore vs Mealy Machines
- Moore to Mealy Machine
- Mealy to Moore Machine
- Myhill–Nerode Theorem
- Mealy Machine for 1’s Complement
- Finite Automata Exercises
- Complement of DFA
- Regular Expressions
- Regular Expression in Automata
- Regular Expression Identities
- Applications of Regular Expression
- Regular Expressions vs Regular Grammar
- Kleene Closure in Automata
- Arden’s Theorem in Automata
- Convert Regular Expression to Finite Automata
- Conversion of Regular Expression to DFA
- Equivalence of Two Finite Automata
- Equivalence of Two Regular Expressions
- Convert Regular Expression to Regular Grammar
- Convert Regular Grammar to Finite Automata
- Pumping Lemma in Theory of Computation
- Pumping Lemma for Regular Grammar
- Pumping Lemma for Regular Expression
- Pumping Lemma for Regular Languages
- Applications of Pumping Lemma
- Closure Properties of Regular Set
- Closure Properties of Regular Language
- Decision Problems for Regular Languages
- Decision Problems for Automata and Grammars
- Conversion of Epsilon-NFA to DFA
- Regular Sets in Theory of Computation
- Context-Free Grammars
- Context-Free Grammars (CFG)
- Derivation Tree
- Parse Tree
- Ambiguity in Context-Free Grammar
- CFG vs Regular Grammar
- Applications of Context-Free Grammar
- Left Recursion and Left Factoring
- Closure Properties of Context Free Languages
- Simplifying Context Free Grammars
- Removal of Useless Symbols in CFG
- Removal Unit Production in CFG
- Removal of Null Productions in CFG
- Linear Grammar
- Chomsky Normal Form (CNF)
- Greibach Normal Form (GNF)
- Pumping Lemma for Context-Free Grammars
- Decision Problems of CFG
- Pushdown Automata
- Pushdown Automata (PDA)
- Pushdown Automata Acceptance
- Deterministic Pushdown Automata
- Non-deterministic Pushdown Automata
- Construction of PDA from CFG
- CFG Equivalent to PDA Conversion
- Pushdown Automata Graphical Notation
- Pushdown Automata and Parsing
- Two-stack Pushdown Automata
- Turing Machines
- Basics of Turing Machine (TM)
- Representation of Turing Machine
- Examples of Turing Machine
- Turing Machine Accepted Languages
- Variations of Turing Machine
- Multi-tape Turing Machine
- Multi-head Turing Machine
- Multitrack Turing Machine
- Non-Deterministic Turing Machine
- Semi-Infinite Tape Turing Machine
- K-dimensional Turing Machine
- Enumerator Turing Machine
- Universal Turing Machine
- Restricted Turing Machine
- Convert Regular Expression to Turing Machine
- Two-stack PDA and Turing Machine
- Turing Machine as Integer Function
- Post–Turing Machine
- Turing Machine for Addition
- Turing Machine for Copying Data
- Turing Machine as Comparator
- Turing Machine for Multiplication
- Turing Machine for Subtraction
- Modifications to Standard Turing Machine
- Linear-Bounded Automata (LBA)
- Church's Thesis for Turing Machine
- Recursively Enumerable Language
- Computability & Undecidability
- Turing Language Decidability
- Undecidable Languages
- Turing Machine and Grammar
- Kuroda Normal Form
- Converting Grammar to Kuroda Normal Form
- Decidability
- Undecidability
- Reducibility
- Halting Problem
- Turing Machine Halting Problem
- Rice's Theorem in Theory of Computation
- Post’s Correspondence Problem (PCP)
- Types of Functions
- Recursive Functions
- Injective Functions
- Surjective Function
- Bijective Function
- Partial Recursive Function
- Total Recursive Function
- Primitive Recursive Function
- μ Recursive Function
- Ackermann’s Function
- Russell’s Paradox
- Gödel Numbering
- Recursive Enumerations
- Kleene's Theorem
- Kleene's Recursion Theorem
- Advanced Concepts
- Matrix Grammars
- Probabilistic Finite Automata
- Cellular Automata
- Reduction of CFG
- Reduction Theorem
- Regular expression to ∈-NFA
- Quotient Operation
- Parikh’s Theorem
- Ladner’s Theorem
Converting Grammar to Kuroda Normal Form
In the previous chapter, we presented a basic overview of the Kuroda Normal Form. Now we will see the steps for converting a Type-0 grammar into Kuroda Normal Form (KNF). This process is a systematic process where we modify the production rules of the grammar to fit one of the four specific forms allowed by KNF. As we know these forms are designed to simplify the grammar while retaining its ability to generate the same language.
In this chapter, we will see the steps to converting any Type-0 grammar into Kuroda Normal Form, and see examples for a better understanding.
Understanding the Target Forms
Before getting the steps involved in the conversion let us see the normal form for a little recap.
- AB → CD − A pair of non-terminals is replaced by another pair of non-terminals.
- A → BC − A single non-terminal is replaced by two non-terminals.
- A → a − A non-terminal is replaced by a terminal symbol, generating an actual character in the language.
- A → ε − A non-terminal is replaced by an empty string, effectively removing it from the generated string.
These forms provide the structure that every production rule in a Type-0 grammar must address to when converting to Kuroda Normal Form.
Transforming a Grammar to Kuroda Normal Form
Transforming a Type-0 grammar to Kuroda Normal Form has a series of steps to make all production rules are in the followed forms. The general approach to this transformation is as follows −
Initial Setup
Begin with a given Type-0 grammar G = (N, T, P, S), where N is the set of non-terminal symbols, T is the set of terminal symbols, P is the set of production rules, and S is the start symbol.
Replacing Terminal Symbols
For every production rule that involves a terminal symbol, replace the terminal with a corresponding non-terminal. This step says that the grammar can move closer to one of the allowed Kuroda forms.
For instance, if a production rule is,
A → a, introduce a new non-terminal a' such that A → a' and a' → a
Handling Productions with More or Fewer Symbols
If a production rule has more symbols on the left side than on the right, it needs to be adjusted to fit the Kuroda format.
For example, a rule like A1 ... Am → B1 ... Bn where m > n can be transformed by adding new non-terminals C to balance the equation. If m < n, the rule can be broken down into smaller steps to fit the form A → BC.
Simplifying the Complex Productions
Any production that does not directly fit the forms AB → CD, A → BC, A → a, or A → ε must be broken down.
For example, a production like A → B1 B2 ... Bn where n ≥ 3 can be split into a series of productions that conform to the Kuroda Normal Form.
Final Adjustments
The final step involves moving all the adjusted and newly formed production rules into the final grammar set H = (M, T, R, S) where R is the set of rules now in Kuroda Normal Form.
Example of Kuroda Normal Form
After getting the steps, consider a simple example of a Type-0 grammar and transform it into Kuroda Normal Form.
Original Grammar G −
- Non-terminals − N = {S, A, B}
- Terminals − T = {a, b}
Productions −
- S → aAB
- A → a
- AB → BA
- B → b
Transforming to Kuroda Normal Form
Let's replace the Terminal Symbols −
- For the production A → a, introduce a new non-terminal a' such that A → a' and a' → a.
- For the production B → b, introduce b' such that B → b' and b' → b.
Adjusting the Productions − The production S → aAB is not in Kuroda form. Introduce a new non-terminal C and split the production as −
- S → a'C
- C → AB
The production AB → BA fits the AB → CD form, so it remains unchanged.
The Final Productions in Kuroda Normal Form will be like this −
- S → a'C
- C → AB
- A → a'
- B → b'
- a' → a
- b' → b
- AB → BA
Conclusion
In this chapter, we highlighted the steps for converting a Type-0 grammar to Kuroda Normal Form. In these steps, there are a set of structured series of transformations for each production rule to make it in the four specified formats. Here we explained the steps along with examples for a clear understanding.