Skip to main content

discrete mathematics graph theory


The previous part brought forth the different tools for reasoning, proofing and problem solving. In this part, we will study the discrete structures that form the basis of formulating many a real-life problem.
The two discrete structures that we will cover are graphs and trees. A graph is a set of points, called nodes or vertices, which are interconnected by a set of lines called edges. The study of graphs, or graph theory is an important part of a number of disciplines in the fields of mathematics, engineering and computer science.

What is a Graph?

Definition − A graph (denoted as G=(V,E)) consists of a non-empty set of vertices or nodes V and a set of edges E.
Example − Let us consider, a Graph is G=(V,E) where V={a,b,c,d} and E={{a,b},{a,c},{b,c},{c,d}}
Graph
Degree of a Vertex − The degree of a vertex V of a graph G (denoted by deg (V)) is the number of edges incident with the vertex V.
VertexDegreeEven / Odd
a2even
b2even
c3odd
d1odd
Even and Odd Vertex − If the degree of a vertex is even, the vertex is called an even vertex and if the degree of a vertex is odd, the vertex is called an odd vertex.
Degree of a Graph − The degree of a graph is the largest vertex degree of that graph. For the above graph the degree of the graph is 3.
The Handshaking Lemma − In a graph, the sum of all the degrees of all the vertices is equal to twice the number of edges.

Types of Graphs

There are different types of graphs, which we will learn in the following section.

Null Graph

A null graph has no edges. The null graph of n vertices is denoted by Nn
Null Graph

Simple Graph

A graph is called simple graph/strict graph if the graph is undirected and does not contain any loops or multiple edges.
Simple Graph

Multi-Graph

If in a graph multiple edges between the same set of vertices are allowed, it is called Multigraph. In other words, it is a graph having at least one loop or multiple edges.
Multi-Graph

Directed and Undirected Graph

A graph G=(V,E) is called a directed graph if the edge set is made of ordered vertex pair and a graph is called undirected if the edge set is made of unordered vertex pair.
Undirected GraphDirected Graph

Connected and Disconnected Graph

A graph is connected if any two vertices of the graph are connected by a path; while a graph is disconnected if at least two vertices of the graph are not connected by a path. If a graph G is disconnected, then every maximal connected subgraph of G is called a connected component of the graph G.
Connected graph Unconnected graph

Regular Graph

A graph is regular if all the vertices of the graph have the same degree. In a regular graph G of degree r, the degree of each vertex of G is r.
regular_graph

Complete Graph

A graph is called complete graph if every two vertices pair are joined by exactly one edge. The complete graph with n vertices is denoted by Kn
Complete Graph

Cycle Graph

If a graph consists of a single cycle, it is called cycle graph. The cycle graph with n vertices is denoted by Cn
Cycle Graph

Bipartite Graph

If the vertex-set of a graph G can be split into two disjoint sets, V1 and V2, in such a way that each edge in the graph joins a vertex in V1 to a vertex in V2, and there are no edges in G that connect two vertices in V1 or two vertices in V2, then the graph G is called a bipartite graph.
Bipartite graph

Complete Bipartite Graph

A complete bipartite graph is a bipartite graph in which each vertex in the first set is joined to every single vertex in the second set. The complete bipartite graph is denoted by Kx,y where the graph G contains x vertices in the first set and y vertices in the second set.
Complete Bipartite Graph

Representation of Graphs

There are mainly two ways to represent a graph −
  • Adjacency Matrix
  • Adjacency List

Adjacency Matrix

An Adjacency Matrix A[V][V] is a 2D array of size V×V where V is the number of vertices in a undirected graph. If there is an edge between Vx to Vythen the value of A[Vx][Vy]=1 and A[Vy][Vx]=1, otherwise the value will be zero. And for a directed graph, if there is an edge between Vx to Vy, then the value of A[Vx][Vy]=1, otherwise the value will be zero.
Adjacency Matrix of an Undirected Graph
Let us consider the following undirected graph and construct the adjacency matrix −
Adjacency undirected
Adjacency matrix of the above undirected graph will be −
a
b
c
d
a
0
1
1
0
b
1
0
1
0
c
1
1
0
1
d
0
0
1
0
Adjacency Matrix of a Directed Graph
Let us consider the following directed graph and construct its adjacency matrix −
Adjacency directed
Adjacency matrix of the above directed graph will be −
a
b
c
d
a
0
1
1
0
b
0
0
1
0
c
0
0
0
1
d
0
0
0
0

Adjacency List

In adjacency list, an array (A[V]) of linked lists is used to represent the graph G with V number of vertices. An entry A[Vx] represents the linked list of vertices adjacent to the Vxth vertex. The adjacency list of the undirected graph is as shown in the figure below −
Adjacency List

Planar vs. Non-planar graph

Planar graph − A graph G is called a planar graph if it can be drawn in a plane without any edges crossed. If we draw graph in the plane without edge crossing, it is called embedding the graph in the plane.
Planar graph
Non-planar graph − A graph is non-planar if it cannot be drawn in a plane without graph edges crossing.
Non-planar graph

Isomorphism

If two graphs G and H contain the same number of vertices connected in the same way, they are called isomorphic graphs (denoted by GH).
It is easier to check non-isomorphism than isomorphism. If any of these following conditions occurs, then two graphs are non-isomorphic −
  • The number of connected components are different
  • Vertex-set cardinalities are different
  • Edge-set cardinalities are different
  • Degree sequences are different

Example

The following graphs are isomorphic −
Isomorphism

Homomorphism

A homomorphism from a graph G to a graph H is a mapping (May not be a bijective mapping)h:GH such that − (x,y)E(G)(h(x),h(y))E(H). It maps adjacent vertices of graph Gto the adjacent vertices of the graph H.

Properties of Homomorphisms

  • A homomorphism is an isomorphism if it is a bijective mapping.
  • Homomorphism always preserves edges and connectedness of a graph.
  • The compositions of homomorphisms are also homomorphisms.
  • To find out if there exists any homomorphic graph of another graph is a NPcomplete problem.

Euler Graphs

A connected graph G is called an Euler graph, if there is a closed trail which includes every edge of the graph G. An Euler path is a path that uses every edge of a graph exactly once. An Euler path starts and ends at different vertices.
An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler circuit always starts and ends at the same vertex. A connected graph G is an Euler graph if and only if all vertices of G are of even degree, and a connected graph G is Eulerian if and only if its edge set can be decomposed into cycles.
Euler graph
The above graph is an Euler graph as a1b2c3d4e5c6f7g covers all the edges of the graph.
Non-Euler graph

Hamiltonian Graphs

A connected graph G is called Hamiltonian graph if there is a cycle which includes every vertex of G and the cycle is called Hamiltonian cycle. Hamiltonian walk in graph G is a walk that passes through each vertex exactly once.
If G is a simple graph with n vertices, where n3 If deg(v)n2 for each vertex v, then the graph G is Hamiltonian graph. This is called Dirac's Theorem.
If G is a simple graph with n vertices, where n2 if deg(x)+deg(y)n for each pair of non-adjacent vertices x and y, then the graph G is Hamiltonian graph. This is called Ore's theorem.
Hamiltonian graphNon-Hamiltonian graph


reference:internet,wikipida

Comments

Popular posts from this blog

Discrete Mathematics - Rules of Inference

To deduce new statements from the statements whose truth that we already know,  Rules of Inference  are used. What are Rules of Inference for? Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine the truth values of mathematical statements. An argument is a sequence of statements. The last statement is the conclusion and all its preceding statements are called premises (or hypothesis). The symbol “ ∴ ∴ ”, (read therefore) is placed before the conclusion. A valid argument is one where the conclusion follows from the truth values of the premises. Rules of Inference provide the templates or guidelines for constructing valid arguments from the statements that we already have. Table of Rules of Inference Rule of Inference Name Rule of Inference Name P ∴ P ∨ Q P ∴ P ∨ Q Addition P ∨ Q ¬ P ∴ Q P ∨ Q ¬ P ∴ Q Disjunctive Syllogism P Q ∴ P ∧ Q P Q ∴ P ∧ Q Conjunction P → Q Q → R ∴ P → R P → Q Q → R ∴ P → R Hypothet

5 best private search engines and why you need to use them.

5 best private search engines and why you need to use them  By:  Boniyeamin laju   ▪   May 31, 2019   ▪ 3 minute read 5 best private search engines and why you need to use  Normal browsers like Google and Bing are designed to track users’ activities and profile their online behavior. The primary reason for this is to create advertisements that will be attractive to the user. However, there-there is always the concern of  personal information being compromised  due to security breaches, state surveillance, and unauthorized data sharing. Fortunately,  private search engines  can help keep your private information safe. Simply put, Private Search Engines, also known as PSE, uses proxy and encrypted search request to  hide your personal information  from anyone looking to misuse your information. Below you will find more information about what a PSE is, how it works, and where to find the best private search engines on the internet

Discrete Mathematics - Propositional Logic

The rules of mathematical logic specify methods of reasoning mathematical statements. Greek philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the theoretical base for many areas of mathematics and consequently computer science. It has many practical applications in computer science like design of computing machines, artificial intelligence, definition of data structures for programming languages etc. Propositional Logic  is concerned with statements to which the truth values, “true” and “false”, can be assigned. The purpose is to analyze these statements either individually or in a composite manner. Prepositional Logic – Definition A proposition is a collection of declarative statements that has either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. We denote the propositional variables by capital letters (A, B, etc). The connectives connect the propositi