
- 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
Set Theory for Automata
The concept of Set Theory plays an important role in discrete mathematics and computer science. In automata theory, we consider sets as the fundamental entities that are used to define machines and languages relations.
In this chapter, we will explain the concept of Set Theory and the different terminologies and types of sets in detail.
Basics of Set Theory
A set is a nothing but a collection of objects, with elements or members being the objects used to construct it. Let's check some of its characteristic features −
- A set is a collection of objects. This collection itself can be treated as a single entity.
- A set contains distinct elements. For example, if an element, a is in set S, then it is denoted as a ∈ S.
- We can consider the set as a well-defined boundary. If S is a set and a is any element, then depending on the properties of a, it can be said whether a ∈ S or a ∉ S.
- A set can be characterized by its property. For instance, if p is the defined property for the elements of S, then S is denoted as S = {a : a has the property p}.
To get a clear understanding of sets through property, let's see some examples −
- The set of all integers is denoted as S = {a: a is an integer}. Here, 7 ∈ S but \mathrm{\frac{1}{7} \: \isin S}.
- The set of all odd numbers denoted as S = {a: a is not divisible by 2}. Here, 7 ∈ S but 8 ∉ S.
- The set of prime numbers less than 100 is denoted as S = {a: a is prime and less than 100}. Here, 23 ∈ S but 98 ∉ S and 101 ∉ S.
Now let's go through some important terms and concepts of set theory.
Cardinality of a Set
Cardinality of a set is nothing but the number of elements preset inside the set. For a set S, the cardinality is denoted as |S| or n(S).
For example, if S = {1, 2, 5, 6, 7, 9, 13} is a set, then |S| = n(S) = 7 because there are 7 elements present in set S.
Subset
In set theory, the subset of a set S is one where every element of S1 is an element of S. We can represent the subset symbolically as S1 ⊂ S. The reverse of a subset is the superset, as S is the superset of S1.
Suppose we have a set Z of all integers and another set E is of all even natural numbers, then E can be denoted as E ⊂ Z.
Let's take another instance. There is a set S of numbers divisible by 6, and T is the set of numbers divisible by 2. Then, S ⊂ T as per the property that if a number is divisible by 6, it must be divisible by 2 and 3.
Equal Set
Two sets "S" and "T" are said to be equal if they have the same number of elements and same elements. The order of how the elements are placed in sets do not affect the equality of sets.
For example, consider the following −
- S = {10, 20, 30, 40, 50}
- T = {x : all integers multiples of 10 in between 10 to 50}
Here, "S" and "T" are two equal sets.
Types of Sets
The following table highlights some more important types of sets with example −
Set Name | Description | Example |
---|---|---|
Empty Set | A set with nothing, there is no element in that set | {} |
Singleton Set | A set with only one element | {1} |
Equivalent Sets | Sets with the same number of elements and their elements can be paired one-to-one. | A = {1, 2, 3} B = {a, b, c} Here, we can assume 1 to "a", 2 to "b" and 3 to "c" |
Universal Set | A set with all the elements which are relevant to a specific discussion. | The set of all cities in a city (when discussing city population) |
Unequal Sets | Sets that do have no same elements. | Set A = {1, 2, 3} Set B = {a, b} |
Power Set | Set of all possible subsets of a given set. | Power Set of {1, 2} = { {}, {1}, {2}, {1, 2} } |
Overlapping Sets | When sets have at least one common element | Set A = {1, 2, 3} Set B = {2, 4, 5} |
Disjoint Set | Sets that have zero common elements. | Set A = {1, 2, 3} Set B = {a, b, c} |
Example 1
- The set {a, b, c} has elements a, b, and c.
- The sets {a, b, c} and {b, c, b, a, a} are the same since order does not matter in a set and since redundancy also does not count.
- The set {a} has element a. Note that {a} and a are different things; {a} is a set with one element a.
- The set {xn: n = 1, 2, 3, . . .} consists of x, xx, xxx, . . ..
- The set of even numbers {0, 2, 4, 6, 8, 10, 12, . . .} is {2n where n = 0, 1, 2, . . .}. In general, note that 0 is an even number.
- The set of positive even numbers {2, 4, 6, 8, 10, 12, . . .} is {2n where n =1, 2, 3, . . .}.
- The set of odd numbers {1, 3, 5, 7, 9, 11, 13, . . .} is {2n + 1where n =0, 1, 2, . . .}
The basic relations in the set can be characterized as −
- A set L1 is a subset of set L if and only if every element of L1 is also an element of L.
- A set L1 is a proper subset of set L if and only if every element of L1 is also elements of L, but there are few elements in L that are not elements of L1.
- The intersection of two sets L and M is the set X of all elements x such that x is in L and x is in M.
- The union of two sets L and M is the set Y of all elements y such that y is in L or y is in M, or both.
Example 2
Consider an example that how to work on regular sets by performing union operation on a set −
The given set is X. we have to prove that (X)* = (X*)*.
Let, the language accepted by (X*)* be L((X*)*) . .
L((X*)*) = L(X*)^0 U L(X*)^1 U L(X*)^2 U L(X*)^3 .......
= U L(X*) U (L(X*) U L(X*)) U ( L(X*) U L(X*) U L(X*) ) .............
= L(X*) U (L(X*) U L(X*)) U ( L(X*) U L(X*) U L(X*) ) ............. [ since U A =A ]
= L(X*)
Since both languages are same, it is proved that −
(X)* = (X*)*.
Conclusion
In this chapter, we explained the terms related to sets, the cardinality, set types, subsets, superset, powersets, etc. These are the basics of set theory which are essential in discrete mathematics and computer science.