0% found this document useful (0 votes)
42 views

Theory of Automata Mathematical Preliminaries: DR Aftab A Maroof Nasreen Akhtar Faryal Saud

This document provides an overview of mathematical concepts relevant to the theory of automata. It discusses sets, functions, relations, graphs, trees, and proof techniques including proof by induction, contradiction, and construction. The document is presented as lecture slides covering topics like sets and their operations, functions and relation types, graph and tree terminology, and methods for mathematical proofs.

Uploaded by

Hassan Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Theory of Automata Mathematical Preliminaries: DR Aftab A Maroof Nasreen Akhtar Faryal Saud

This document provides an overview of mathematical concepts relevant to the theory of automata. It discusses sets, functions, relations, graphs, trees, and proof techniques including proof by induction, contradiction, and construction. The document is presented as lecture slides covering topics like sets and their operations, functions and relation types, graph and tree terminology, and methods for mathematical proofs.

Uploaded by

Hassan Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 27

Theory of Automata

Mathematical Preliminaries

Dr Aftab A Maroof
Nasreen Akhtar
Faryal Saud
Mathematical reviews

 Sets
 Functions and Relations
 Graphs and Trees
 Proof Techniques

10/6/2019 Theory of Automata 2


Sets (1)
 A set is a collection of elements without any
structure other than membership!
 Usually with some common properties
 Neither order nor repetition does matter
 E.g. S1 = {a, b, c}, S2 = {i | i is an integer ≥ 0}
 A set can be finite or infinite
 The number of elements of a finite set is its size
or cardinality, e.g. |S1| = 3
 Two special sets
 U – Universal set or Universe of discourse
  – Empty set, a set with no members

10/6/2019 Theory of Automata 3


Sets (2)

 is-a-member-of
 An element x is a member of a set S is written as
xS
 An element Y is not a member of a set S is written
as y  S
 Subset
 A is a subset of B, A  B, iff every member of A is
also a member of B.
 A is a proper subset of B, A  B, iff A is a subset
of B and not equal to B.

10/6/2019 Theory of Automata 4


Sets (3)
 Set operations
 Union: S1  S2 = {x | x  S1 or x  S2}
 Intersection: S1  S2 = {x | x  S1 and x 
S2}
 If S1  S2 = , they are said to be disjoint
 Difference: S1  S2 = {x | x  S1 and x  S2}
 Complement (with respect to a universal
set):S1 = {x | x  U but x  S1}
  = U
 U = 

10/6/2019 Theory of Automata 5


Sets (4)
 De Morgan’s laws

S1  S 2  S1  S 2
S1  S 2  S1  S 2

 A power set of S denoted 2S is a set of all


subsets of S
 |2S| = 2|s|

10/6/2019 Theory of Automata 6


Sets (5)
 A Cartesian product of two sets produce
a set of ordered pairs
 S = S1  S2 = {(x, y) | x  S1 and y  S2}
 |S1  S2| = |S1|  |S2|
 The subsets of S, S1, S2, …, Sn
together, is called a partition of S if
 S1, S2, …, Sn are mutually disjoint
 S1  S2  …  Sn = S
 None of Si is 

10/6/2019 Theory of Automata 7


Functions and Relations (1)
 A function is a rule that assigns to
elements of one set a unique element of
another set
 f: S1  S2
 The domain of f is a subset of S1
 The range of f is a subset of S2
 If the domain of f is actually S1, f is called a
total function; otherwise it is called a partial
function
 E.g. f(n) = n3 + 4n2 + 2n + 1

10/6/2019 Theory of Automata 8


Functions and Relations (2)
 For f(n) and g(n) whose domain is a
subset of positive integers, if there
exists a positive constant c for all
sufficiently large n, we have
 If f(n) ≤ cg(n), then f has order at most g;
f(n) = O(g(n))
 If |f(n)| ≥ c|g(n)|, then f has order at least g;
f(n) = (g(n))
 If there exist constants c1 and c2 such that
c1|g(n)| ≤ |f(n)| ≤ c2|g(n)|, then f and g have
the same order of magnitude; f(n) = (g(n))

10/6/2019 Theory of Automata 9


Functions and Relations (3)

 In a simple form, a relation can be represented as


a set of ordered pairs!
 Relations are more general than functions; each
element in the domain may have several
elements in the range associated with it
 E.g. older than, sibling
 Again, a simple form of relation can be (and
usually) defined based on the Cartesian product
of a single set, i.e. a set with itself, e.g. a set of
positive integers, a set of students in this class

10/6/2019 Theory of Automata 10


Functions and Relations (4)
 One special kind of relations is equivalence relation
 When a pair (x, y) is in an equivalence relation, we write
xy
 A relation is an equivalence relations denoted by , if it
satisfies three conditions
 Reflexivity: x  x for all x

 Symmetry: if x  y, then y  x

 Transitivity: if x  y and y  z, then x  z

 Is “older than” an equivalence relation?


 Is “sibling” an equivalence relation?
 For a given set S with an equivalence relation, the
equivalence relation can be used to partition the set into
equivalence classes

10/6/2019 Theory of Automata 11


Functions and Relations (4)
 Test
 If x  y
And x mod 3=y mod 3
Then test whether the following are equivalent or
not
1. 2  5
2. 12  0
3. 11  1
4. 0=36

10/6/2019 Theory of Automata 12


Graphs and Trees (1)
 An undirected graph or simply a graph is a set of
points with lines connecting some of them
 The points are called nodes or vertices, V = {v1, v2, …,
vn}
 The lines are called edges, E = {e1, e2, …, em};
 G = (V, E)
 A directed graph or digraph is a graph with
directional arrowed edges
 each edge connects a pair of vertices from V, ei = (vj,
vk) is an edge from vj to vk

10/6/2019 Theory of Automata 13


Graphs and Trees (2)

 An example of a directed graph

10/6/2019 Theory of Automata 14


Graphs and Trees (3)
 A walk is a sequence of edges from one vertex
to another
 The length of a walk is the total number of edges
traversed
 A path is a walk in which no edge is repeated
 A path is simple if no vertex is repeated
 A walk with no repeated edges (a path) from vi
to itself is called a cycle with base vi
 A simple cycle is a cycle with no vertex
repeated
 An edge from a vertex to itself is called a loop

10/6/2019 Theory of Automata 15


Graphs and Trees (3)
 A tree is a digraph that has no cycles
 There is one distinct vertex called root
 There is exactly one path from the root to every other vertex
 Root has no incoming edges
 Vertices that have no outgoing edges are called leaves
 When there is an edge from vi to vj; vi is a parent of vj and vj
is a child of vi
 The level of each vertex is the number of edges in the path
from the root to itself
 The height of a tree is the largest level number of any vertex
it has
 When an ordering is associated with nodes at each level, we
have an ordered tree

10/6/2019 Theory of Automata 16


Graphs and Trees (4)

 An example of a tree

10/6/2019 Theory of Automata 17


Illustration of tree terminology

 Leaves L

 Parent P
 Child C

 Level 21
0

10/6/2019 Theory of Automata 18


Proof
 A proof is a convincing logical argument that a
statement is true!
 Evidence plays no roles in a mathematical proof!
 We need to provide a proof beyond any doubts!
 A well-written proof is a sequence of statements
where each is derived by simple reasoning from
previous ones in the sequence

10/6/2019 Theory of Automata 19


Proof techniques

 Proof by induction
 Proof by contradiction
 Proof by construction

10/6/2019 Theory of Automata 20


Proof by induction
 It is an advance method used to show that all elements
of an infinite set have a specified property
 Each proof by induction consists of
 Basis: proves that P(1) [or P(b)] is true
 Inductive step: proves that for each i ≥ 1 [or i ≥ b], if P(i) is
true, then so is P(i+1)
 Once each part has been proven, it can be concluded
that P(i) is true for each i
 The assumption that P(i) is true in the inductive step is
called induction hypothesis or inductive assumption
 A stronger version of the hypothesis, i.e. P(j) is true for
every j ≤ i, may sometimes be useful

10/6/2019 Theory of Automata 21


Proof by induction

10/6/2019 Theory of Automata 22


Proof by induction

10/6/2019 Theory of Automata 23


Proof by contradiction
 Assume that the statement/theorem (that we want
to prove) P is false, then show that the assumption
leads to an obviously false consequence called a
contradiction!
 Then, we have proven that our assumption is no
good; hence the statement P is true!
 E.g. If A is a subset of B and B is a subset of A
then sets A and B are equal

10/6/2019 Theory of Automata 24


Proof by construction

 For those theorems/statements that state that a


particular type of object exists, we may provide a
proof by showing how to construct the said object!
 E.g. De Morgan’s laws on sets A and B

10/6/2019 Theory of Automata 25


Theorem
 A theorem is a mathematical statement that
has been proven true! – normally, a theorem
is a statement of special interest
 Statements that have been proven just for
assisting in proving another statement are
called “lemmas”
 Statements that can be concluded easily from
some theorem and its associated proof are
called “corollaries”

10/6/2019 Theory of Automata 26


Assignment 1
 Solved Exercise from ( Q 20 to Q 46) formal
languages and automata by jones & Bartlett
 Deadline: Monday 26 August 2019

10/6/2019 Theory of Automata 27

You might also like