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.

Advertisements