Preview

Graphs: Graph Theory and Vertex

Good Essays
Open Document
Open Document
6746 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Graphs: Graph Theory and Vertex
Graphs
1 Introduction
We have studied one non-linear data structure so far i.e Trees. A graph is another non-linear data structure that is widely used to solve many real-life computing problems. For example, we need to use a graph to find out whether two places on a road-map are connected and what is the shortest distance between them. Graphs are used in simulating electrical circuits to find out current flows and voltage drops at various points in the circuit. Graphs are widely used in telephone and computer networks.
Graphs have great historical significance too. In 1736, the famous mathematician Euler used the concept of a graph to solve the “Koenigsberg problem”. In the small town of Koenisberg in Prussia, the river Pregal flows around the island of Kneiphof and then divides into two. The four land areas ( A, B, C, D) bordering the river are connected by seven bridges ( a,b,c,d,e,f,g). The problem is to find out whether it is possible to start walking from some area, cross each bridge exactly once and return to the starting land area. Euler used graphs to prove that this would not be possible. A walk which achieves this is called an “Eulerian Walk”.
{{{ Diagram }}}

In this chapter, we will study this data structure, its implementation and its applications. Before that, we will study some definitions and terminology.

Definitions and Terminology
Graph
A graph G is a collection of two sets V and E. V is a finite non empty set of vertices
(or nodes) and E is a finite non empty set of edges (or arcs) connecting a pair of vertices.
An edge is represented by two adjacent vertices G is represented as G = (V,E)
Example

Some examples of graphs

Undirected Graph A graph is an undirected graph if the pairs of vertices that make up the edges are unordered pairs. i.e. an edge(Vi, Vj ) is the same as (Vj, Vi). The graph G1 shown above is an undirected graph.

Directed Graph In a directed graph, each edge is represented by a pair of ordered vertices i.e.

You May Also Find These Documents Helpful

Related Topics