Научная статья на тему 'AN ANALYSIS OF DIFFERENT COMPUTER SCIENCE ALGORITHMS WITH THE GRAPH THEORY OF MATHEMATICS'

AN ANALYSIS OF DIFFERENT COMPUTER SCIENCE ALGORITHMS WITH THE GRAPH THEORY OF MATHEMATICS Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
246
87
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
Graph / Computer Science / Algorithm / Graph Theory / Shortest Path / Minimum spanning Tree

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Jayna Donga, Priyank Bhojak, Kanu Patel, Vatsal Shah

The field of mathematics plays an important role in different domains.one of the important concept of mathematics is the Graph theory which is most commonly used in area of computer science to design computer algorithms. The well-known problem in mathematics which represents graph theory is the Travelling salesman problem. The travelling sales man problem is the problem in graph theory needs to find optimal path (i.e. minimum total distance) to traverse all the cities with the constraint to returning back to the initial state (city). There is no general solutions available to solve this problem but there is similarity between the travelling sales man problem and minimum spanning tree.so, this problem can be implemented with the help of minimum spanning tree which also focus on finding minimum distance for each nodes with the constraint of not to form any cycle. In this paper we have presented few computer science algorithms which are implemented using graph theory of mathematics and also tried to analyze their differences and applications.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «AN ANALYSIS OF DIFFERENT COMPUTER SCIENCE ALGORITHMS WITH THE GRAPH THEORY OF MATHEMATICS»

Jayna Donga, Priyank Bhojak, Kanu Patel, Vatsal Shah RT&A, Special Issue № 1 (60) CS ALGO. WITH THE GRAPH THEORY OF MATHS_Volume 16, Janyary 2021

AN ANALYSIS OF DIFFERENT COMPUTER SCIENCE ALGORITHMS WITH THE GRAPH THEORY OF

MATHEMATICS

Prof. Jayna Donga1, Prof. Priyank Bhojak2, Prof. Kanu Patel3, Dr.Vatsal Shah4

1 MBIT, 234 BVM Engineering college, Gujarat. jdonga@mbict.ac.in

Abstract

The field of mathematics plays an important role in different domains.one of the important concept of mathematics is the Graph theory which is most commonly used in area of computer science to design computer algorithms. The well-known problem in mathematics which represents graph theory is the Travelling salesman problem. The travelling sales man problem is the problem in graph theory needs to find optimal path (i.e. minimum total distance) to traverse all the cities with the constraint to returning back to the initial state (city). There is no general solutions available to solve this problem but there is similarity between the travelling sales man problem and minimum spanning tree.so, this problem can be implemented with the help of minimum spanning tree which also focus on finding minimum distance for each nodes with the constraint of not to form any cycle. In this paper we have presented few computer science algorithms which are implemented using graph theory of mathematics and also tried to analyze their differences and applications.

Keywords: Graph, Computer Science, Algorithm, Graph Theory, Shortest Path, Minimum spanning Tree

I. Introduction

The Theory of graphs is a sub branch of discrete mathematics. Graph Theory analyzes are named graph theories and are mathematical structures used to describe the pairly relationship between various artifacts. The graph theory is used in several applications of research and technology. To model the relationship of various classes between any physical scenarios, the Graph is an essential tool. The graph is used to represent several real world issues.in short, the vast utilization of graphs in computer science algorithms to provide the problem solutions because it provides an effective idea prior to implementing it on real platform. [2][3].

The problems can be divided into two categories: 1) Classical Problems 2) Application Problems.

Using graph theory, the traditional problems are described as connectivity, routes, streams, color and empirical studies of graph drawing [3].the application problems mainly focuses on experimental research and to implement technical algorithms with the help of graph theory.

Graph theory history:[1]

In 1735, the Graph theory is formed by the Swiss mathematician L. Euler which is based on the issue of Konigsberg. In the European continent, a small town located is Konigsberg.in the Konigsberg, there were a big river and there were two deltas. Euler had studied the issue of Konigsberg Bridge and constructed a graph structure to solve the problem which is known as the Eulerian graph as shown in figure-1(b).

Figure-1: a) Konigsberg Bridge b) Konigsberg Bridge representation in graph [1]

Evolution of Graph Theory

Throughout the year 1840 A.F. Mobius introduced the Compete Graph concept and the Bipartite Graph concept. Kuratowski has shown complete graph and bipartite graphic recreational problems. In 1845, Gutsav Kirchhoff embraced the idea of a tree, a connected graph without cycles and also introduced the theoretical graphic ideas such as how to calculate current in electrical networks or circuits. Thomas Guthrie had presented the well-known four-color problem in 1852, while after a century Kenneth Appel and Wolfgang Haken had proved this. Thomas, In 1856. P. Kirkman and William R. Hamilton introduced polyhedral analysis of the intervals.In 1913, a puzzling problem was presented by H. Dudeney.

Basic Terminology [4]

Before going to analyse applications of graph theory in computer algorithms let us understand the basic terms related to graph theory.

Graph: A Graph G can be represented as an ordered sequence of (V, E), where V(G) signifies the set of vertices and E(G) signifies the edges connecting a pair of vertices.

Undirected Graph: In an undirected graph, the edges have no directions attached to them.it means that if an edge between vertices A and B can be crossed from both sides, such as A to B or B to A. Refer undirected graph in figure-2 (b).

Directed Graph: In a Directed graph G as per Figure-2 (a), The edges create a pair of ordered vertices. If node 1 to node 2 is an edge, then there is a direction from 1 to 2 but not from 2 to 1.

Chromatic number: The chromatic number of a graph G is the minimum number of colors needed to color all the vertices of a graph G.

Adjacency matrix: An adjacency matrix is used to represent graphs in sequential form into computer memory.an adjacency matrix indicates weather two nodes are adjacent or not that is they are called adjacent if there is an edge connecting them. As an example of adjacency matrix refer Figure-2.

The Degree of a vertex: in undirected graph, the degree of a vertex A, deg(A) indicates the total number of edges connected with that node A. If deg(A) =0 that means A does not belongs to any edge and such node is called isolated node. In directed graph the node is having In-degree and Out-degree. The In-degree of a vertex A, represented indeg(A) which is the number of edges that entering to A. The Out-degree of a vertex A, represented outdeg(A) which is the number of edges that originate at A. The degree of a vertex is shown in figure-2.

Sub Graph: The subsection of graph G (V, E) Which is represented by G' (V', E') is called the Sub graph of Figure-3(c) shows the example of Sub graph.

Vertex coloring: The nodes of graph G are colored in such a way so that no two adjacent nodes of G having the same color is called the vertex coloring of graph G.

Figure-2: a) Directed graph with a number of vertices and edges, the degree of vertex and

adjacency matrix.

b) Undirected graph with of vertices and edges, degree of vertex and adjacency matrix [1]

Isomorphic graph: There are two graph G and H are called isomorphic graph if they construct different forms with the same number of vertices and edges.

Tree: The connected graph G without any cycle is known as Tree T.

Bipartite/Bigraph graph: as shown in figure-3(a), In the Bipartite graph the set of vertices divided into two disjoint sets in such a way so that no two nodes within the same set are adjacent.

Figure3. a) Bipartite graph b) graph c) subgraph [1]

Spanning Tree: A Spanning tree of a connected, undirected graph G is the subset of G (V, E) which is a tree that connects all the vertices together without forming any cycle.

Applications of Graph Theory in Various Domains

In general, the overwhelming usage of Graph Theory can be used for simulation applications in different fields of information and technology. This is important in chemistry for the study of compounds, bond formation, and atom review. For Biology and activities safeguarding, the principle of graphs is used if a node refers to areas where other forms occur and the edges equate with the way of action. The numbers taken are very significant to the impact of action that impacts various animals by having a gander to foster instances or delegate the propagation of illness, pests and may consider. The graph theory is often commonly used in activity science, examples of which are like the problem of traveling salesman, the shortest spanning tree in a weighted matrix, obtaining an ideal job and people match and discovering the briefest path between two vertices in a circle. This is also helpful to explain communication networks, operation networks and game theory in the same way. The preparation and coordination of large complex tasks is a very well established and productive use of the networks in organizational analysis [4]. Likewise we have shown various applications of graph theory in various fields in figure-4.

E ata Structures Database design Operating System Computer Hardware E ata Mining Web Designing Network System Information Retrieval Artificial Intelligence SoftwaeEugmsamg ImaseProcessmg

Figure- 4. Graph theory applications in various fields [1]

Applications of Graph Theory in Computer Science

DataStructure: Data structure are nothing but logical organization of real-world data into particular structure.it may be either linear data structure or non-linear data structure. There are some important algorithms to arrange data in non-linear structures are represented by graph. The examples of this is the algorithms like Breadth-first-search, Depth-first-search, shortest path algorithms and minimum spanning tree algorithms which is implemented by graph theory.

Database Design:

The database designing is also done by graphs. [6].Graph database represented using vertices, edges and attributes to represent and store the data. The Graph construct pays vary crucial role in the database designing as gives fast process implementation using different functions and properties.

Image processing:

The information extraction from an image is done by various image analysis approaches and it is done by digital image processing methods. We can use graph theory approaches to enhance these image processing techniques. The segmentation, filtering, Classification and clustering are the graph-based approaches in image processing [10].

Computer Hardware:

The limits of the physical layer can be represented using graph theory concepts [6].a) Register distribution is done by graph colouring technique b) The sequence of instructions can be represented by Adjacency matrix. c) To process instructions simultaneously d) Allocation of process scheduling.

Artificial Intelligence:

In artificial intelligence, the graph theory can be used to solve all kind of problems which are using backward and forward chaining techniques of artificial intelligence. Using the graph theory, one may solve almost all the motion problems in artificial intelligence [11].

Data Mining:

In datamining, the graph theory is used in graph mining which presents relational parts of data. The graph based data mining includes subgraphs, subgraph isomorphism, graph variants, mining measures and solution methods. The datamining models that is represented using graph theory having the capability to catch auxiliary data in writing though they will not consider the semantic relations amongst the words [8].

Software Engineering:

The graph theory is also useful in software engineering as an example of it is during software requirements specification (SRS) the data flow diagrams are used where vertices are transformations and edges represent the data flow.

The graph generation is possible which is based on Abstract syntax tree in class-oriented model [9]. Operating System:

The graph theory can be used in field of operating system for process scheduling, resource allocation applications and deadlock handling. The example of graph application is like graph coloring technique can be used in job scheduling where the processes are assumed as the vertices and the edge between those jobs represents that they cannot be executed parallel.

Web Designing:

Web designing can be modelled through the graph theory where the web pages will be denoted by nodes and the edges amongst them will be the hyperlinks. This model is called a web graph. The important information will be retrieved from the web graph.

Information retrieval system:

The Computer networks can be described as the environment of components that connected with each other through any wired or wireless medium and they can communicate with each other. The network is technically called as graph where the components are nodes and the wired or wireless medium between them are called edges. Now a days the invariants in graph constructs had been used as a part of bridging ways to deal with information retrieval systems. The graph theory

applications are used for various applications inside IP for objects, IR assessment estimations, and re -ranking [10].

Computer Science Algorithms using Graph Theory

The graph theory is very useful in various fields, as we have discussed in earlier sections. In this section we will discuss few computer science algorithms which are using graph theory. For example very well-known mathematics problem is travelling salesman problem which can be implemented using minimum spanning tree. There are two popular algorithms for finding minimum spanning tree from the given graph are Prim's minimum spanning tree algorithm and Kruskal's minimum spanning tree algorithm.

Minimum Spanning Tree: A spanning tree of a linked and undirected graph G is a branch-like subgraph of G that links all the vertices together without having the loop. A graph G can have several potential spanning trees but the minimal spanning tree (MST) is a tree weighing less than or equal to the weight of every other spanning tree [15].

Prim's Algorithm Example [12]:

In this example we have calculated minimum weight for minimum spanning tree using Prim's algorithm is 99 so that the minimum distance path is {(1, 6), (6, 5), (5, 4), (4, 3), (3, 2), (2, 7)}.

Kruskal's Algorithm Example [13]:

In kruskal's algorithm, we are finding all the edges with minimum weight in ascending order in such a way so it covers all the vertices and don't contain any cycle. The weights of edges will be placed into priority queue and then the edge with minimum weight will be selected and put into the previous sub tree.

Step: 0

Step:1

T={1,2}

R={2,4}

Edge with minimum weight

= (1, 3)

Step:2

T={1,2,3}

R={4}

Edge with minimum weight = (1, 2)

Step:3

T={1,2,3,4} R={}

Edge with minimum weight = (2,4)

Total Cost of the MST: 1+2+3 = 6

In this example we have calculated minimum weight for minimum spanning tree using Kruskal's algorithm. The minimum distance path is {(1, 3), (1,2), (2, 4)}.

CONCLUSIONS

This paper presents various concepts related to graph theory and its applications.it contains basic terminologies about graphs, history of graph theory and applications in various fields like physics, chemistry, biology, computer science and engineering, electronics, operation research and other

fields. It focuses mainly on various domains of computer science which does vast use of graph theory to design their algorithm to solve problems.it also represents some computer science algorithms as an example which shows that how graph theory is useful in computer science domain. We conclude that the graph theory of maths is very important and effective concept which is almost used in all the domains.

References

[1] D. DurgaPrasad, A. Srinivasan Muttipati, Mesdisetti Snehadivya and Sanaka Kavitha "Applications of Computer Science Based on Graph theory" International Journal of Engineering, Science and Mathematics,Vol. 6 Issue 8, December 2017.

[2] B.Tosuni, "Graph Theory in Computer Science - An Overview", International Journal of Academic Research and Reflection, Vol. 3, No. 4, 2015.

[3] R.P.Singh and Vandana. "Application of Graph Theory in Computer Science and Engineering", International Journal of Computer Applications, Vol 104, No.1, October 2014.

[4] P. Pranav and P. Chirag, "Various Graphs and Their Applications in Real World", International journal of Engineering Research and Technology, Vol. 2, Issue 12, December 2013.

[5] S.Bordoloi, B. Kalita, "Designing Graph Database Models from Existing Relational Databases", International Journal of Computer Applications, Vol 74, No.1 July 2013.

[6] R. Duran and R. Rico, "On Applying Graph Theory to ILP Analysis", IEEE Latin American Transaction, Vol. 4, No. 4, pp. 291-298, 2016.

[7] S. S. Sonawane and Dr. P. A. Kulkarni, "Graph based Representation and Analysis of Text Document: A Survey of Techniques", International Journal of Computer Applications (IJCA) Volume 96 - No. 19, June 2014.

[8] Do, Thi Ngoc Quynh, and Amedeo Napoli, A graph 9odel for text analysis and text mining. Diss.Master Thesis, University de Lorraine, 2012.

[9] M. A. Rajan, M. Girish Chandra and Lokanatha C. Reddy, "Concepts of Graph Theory Relevant to Adhoc Networks", Int.Journal of Computers, Communications& Control, Vol.3, pp.465469, 2008.

[10] N. Bhandari and A. Sharma, "Graph Theory and its Applications in Diverse Domain: A Survey Paper", International Journal of Contemporary Technology and Management, Vol.6, issue 7, pp.1-6, August 2017.

[11] V. V. Nabiyev and Unal ^akiroglu, "Application of Graph Theory in an Intelligent Tutoring System for Solving Mathematical Word Problems", Eurasia Journal of Mathematics, Science & Technology, Education, Vol.12, issue 4, pp. 687-701, 2016.

[12] Abhilasha R., "Minimum Cost Spanning Tree Using Prim's Algorithm", International Journal of Advance Research in Computer Science and Management Studies, Volume 1, Issue 1, June 2013.

[13] Nirav J. Patel, Shweta Agrawat, "Survey paper on Different techniques for Minimum Spanning tree", International Journal of Engineering Development and Research, ISSN: 2321-9939.

[14] Jean-Paul Tremblay & Paul G .An Introduction to Data Structures with Applications. Sorenson Publisher -Tata McGraw Hill.

[15] Expert in Data Structure with C: R. B. Patel (3 Edition). New Delhi: Khanna Book Publishing.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

[16] Ellis Horowitz & Sartaj Sahni: Fundamentals of Computer Algorithms (1993), Galgotia Publications.

i Надоели баннеры? Вы всегда можете отключить рекламу.