
- 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
Partial Recursive Functions in Automata Theory
Partial recursive functions offer a machine-independent way to describe the collection of computable partial functions. The idea is to characterize these functions using basic operations, such as composition, primitive recursion, and minimization, rather than relying on specific computational models like Turing machines.
In this chapter, we will see the basics of partial recursive functions, with some examples, for a better understanding on the concepts.
Basics of Partial Recursive Functions
A partial recursive function is a type of function that can be defined using three basic operations −
- Composition − This operation allows the creation of a new function by applying one function to the results of other functions.
- Primitive Recursion − This builds new functions from simpler ones by applying a process that depends on the values of previously defined functions.
- Minimization − This finds the smallest value for which a function produces a specific result, usually zero.
The idea of partial recursive was first introduced by Stephen Kleene in 1936, building on the work of Godel and Herbrand.
Machine-Independent Description
Partial recursive functions are considered machine-independent because their definition does not rely on any specific computational model. Instead, they are described in terms of operations that can be applied to basic functions to generate more complex functions.
This abstraction allows us to focus on the logical structure of computation rather than the physical implementation.
Examples of Partial Recursive Functions
Let us see some examples to better understand how partial recursive functions work.
Sum of Natural Numbers
Consider the function f1(x) that calculates the sum of the first x natural numbers −
$$\mathrm{f_{1}(0) \: \equiv \: 0}$$
$$\mathrm{f_{1}(x \:+\: 1) \:\equiv \:f_{1}(x) \:+\: (x \:+\: 1)}$$
This function is defined using primitive recursion. It starts with f1(0) = 0 and then adds the next natural number in the sequence to the sum computed so far.
Fibonacci Sequence
The Fibonacci sequence is another example of a function defined using primitive recursion −
$$\mathrm{f_{2}(0) \: \equiv \: 0}$$
$$\mathrm{f_{2}(1) \: \equiv \: 1}$$
$$\mathrm{f_{2}(x \: + \: 2) \: \equiv \: f_{2}(x) \: + \: f_{2}(x \: + \: 1)}$$
Here, the function f2(x) returns the x-th Fibonacci number. The base cases are f2(0) = 0 and f2(1) = 1. Each subsequent value is the sum of the two preceding values.
Undefined Function
We have not discussed the total function here, will discuss in the next article. But this is based on the total functions. Not all partial recursive functions are total (i.e., defined for all inputs). Consider the function f3(x) −
$$\mathrm{f_{3}(0) \: \equiv \: 0}$$
$$\mathrm{f_{3}(x + 1) \: \equiv \: f_{3}(x \:+\: 2) \:+\: 1}$$
In this case, f3(x) is undefined for any value of x other than 0. This highlights an important aspect of partial recursive functions: they can be undefined for certain inputs.
McCarthy's 91 Function
A more complex example is McCarthy's 91 function, f4(x) −
$$\mathrm{f_{4}(x) \: \equiv \: if \:\:x \: \gt \: 100\:\: then \:\:x\: - \:10\:\: else \:\:f_{4}(f_{4}(x \:+\: 11))}$$
This function returns 91 for all inputs x ≤ 100 and x - 10 for inputs greater than 100. It is a well-known example in recursion theory.
Primitive Recursion
Primitive recursion is one of the key operations used to define partial recursive functions. To understand it better, let us consider some classic examples −
Addition − The addition function add(x1, x2) can be defined using primitive recursion −
$$\mathrm{add(x_{1},\: 0) \:\equiv \: x_{1}}$$
$$\mathrm{add(x_{1},\: x_{1}\: +\: 1)\: \equiv \: add(x_{1},\: x_{1})\: +\: 1}$$
This function starts with adding zero to x1, and then successively adds 1 for each increment of x2.
Predecessor − The predecessor function pred(x), which returns the previous natural number, can also be defined via primitive recursion −
$$\mathrm{pred(0) \:\equiv \: 0}$$
$$\mathrm{pred(x \:+\: 1) \:\equiv \: x}$$
Here, the predecessor of zero is defined as zero, and for any other number, it simply subtracts 1.
Multiplication − Multiplication is another operation that can be defined through primitive recursion −
$$\mathrm{mult(x_{1},\: 0)\: \equiv \:0}$$
$$\mathrm{mult(x_{1},\: x_{2}\: + \: 1)\: \equiv \: mult(x_{1},\: x_{2}) \: + \: x_{1}}$$
Multiplication starts with multiplying x1 by zero, resulting in zero, and then repeatedly adds x1 for each increment in x2.
Minimization − The minimization operation is a bit more complex. It finds the smallest value for which a function produces a result of zero. Consider the following example −
Integer Division − The integer division function can be defined using minimization −
integer part of x1 / x2 ≡ least x3 such that x1 < x2 (x3 + 1)
This function finds the smallest x3 such that multiplying x2 by x3 + 1 is still greater than x1, effectively giving the integer part of the division.
Computability
A partial function f is defined as partial recursive if it can be built up from basic functions using the operations of composition, primitive recursion, and minimization. This set of functions, denoted as PR, includes all the functions that can be defined in this way.
One of the key properties of partial recursive functions is that they are computable. It means, there exists a mechanical procedure (such as a Turing machine) that can compute the function for all inputs where it is defined.
Conclusion
In this chapter, we explored the concept of partial recursive functions. We started with the basic operations used to define these functions: composition, primitive recursion, and minimization. We then focused on several examples, such as the sum of natural numbers, the Fibonacci sequence, and McCarthy's 91 function, to see how these functions can be constructed and used. Finally, we discussed the definition of partial recursive functions and their computability.