# A Review And Evaluations Of Shortest Path Algorithms

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 A Review And Evaluations Of Shortest Path Algorithms Kairanbay Magzhan, Hajar Mat Jani Abstract: Nowadays, in computer networks, the routing is based on the shortest path problem. This will help in minimizing the overall costs of setting up computer networks. New technologies such as map-related systems are also applying the shortest path problem. This paper s main objective is to evaluate the Dijkstra s Algorithm, Floyd-Warshall Algorithm, Bellman-Ford Algorithm, and Genetic Algorithm (GA) in solving the shortest path problem. A short review is performed on the various types of shortest path algorithms. Further explanations and implementations of the algorithms are illustrated in graphical forms to show how each of the algorithms works. A framework of the GA for finding optimal solutions to the shortest path problem is presented. The results of evaluating the Dijkstra s, Floyd-Warshall and Bellman-Ford algorithms along with their time complexity conclude the paper. Index Terms: Bellman-Ford Algorithm, Computer Networks, Dijkstra s Algorithm, Floyd-Warshall Algorithm, Genetic Algorithm (GA), Shortest Path Problem. 1 INTRODUCTION THE shortest path problem is a problem of finding the shortest path or route from a starting point to a final destination. Generally, in order to represent the shortest path problem we use graphs. A graph is a mathematical abstract object, which contains sets of vertices and edges. Edges connect pairs of vertices. Along the edges of a graph it is possible to walk by moving from one vertex to other vertices. Depending on whether or not one can walk along the edges by both sides or by only one side determines if the graph is a directed graph or an undirected graph. In addition, lengths of edges are often called weights, and the weights are normally used for calculating the shortest path from one point to another point. In the real world it is possible to apply the graph theory to different types of scenarios. For example, in order to represent a map we can use a graph, where vertices represent cities and edges represent routes that connect the cities. If routes are one-way then the graph will be directed; otherwise, it will be undirected. There exist different types of algorithms that solve the shortest path problem. However, only several of the most popular conventional shortest path algorithms along with one that uses genetic algorithm are going to be discussed in this paper, and they are as follows: 1. Dijkstra s Algorithm 2. Floyd-Warshall Algorithm 3. Bellman-Ford Algorithm 4. Genetic Algorithm (GA) Other than GA, nowadays, there are also many intelligent shortest path algorithms that have been introduced in several past research papers. For example, the authors in [1] used a heuristic method for computing the shortest path from one point to another point within traffic networks. Kairanbay Magzhan is currently pursuing bachelor s degree program in Computer Science and Software Engineering at International IT University, Kazakhstan. Dr. Hajar Mat Jani is currently a Senior Lecturer at Universiti Tenaga Nasional, Malaysia. s: They proposed a new dynamic direction restricted algorithm obtained by extending the Dijkstra s algorithm [1]. In another paper [2], a heuristic GA was used for solving the single source shortest path (SSSP) problem. Its main goal was to investigate the SSSP problem within the Internet routing setting, particularly when considering the cost of transmitting messages/packets is significantly high, and the search space is normally very large. In a paper by Li, Qi, and Ruan [3], an efficient algorithm named Li-Qi (LQ) was proposed for the SSSP problem with the objective of finding a simple path of the smallest total weights from a specific initial or source vertex to every other vertex within the graph. The ideas of the queue and the relaxation form the basis of this newly introduced algorithm; the vertices may be queued several times, and furthermore, only the source vertex and relaxed vertices are being queued [3]. 2 RESEARCH OBJECTIVES The following list gives the objectives of this research paper: To determine and identify the concepts of the shortest path problem. To determine the representation of graphs in computer in order to solve the shortest path problem, as well as to understand the different basic terms of a graph. To explain the general concepts and the implementations of Dijkstra s Algorithm, Floyd-Warshall Algorithm, Bellman-Ford Algorithm, and Genetic Algorithm. To evaluate each algorithm, and presents the evaluations results. 3 LITERATURE REVIEW As mentioned earlier, a graph can be used to represent a map where the cities are represented by vertices and the routes or roads are represented by edges within the graph. In this section, a graph representation of a map is explained further, and brief descriptions and implementations of the four shortest path algorithms being studied are presented. 3.1 Representation of the Graph In order to represent a graph in a computer we will use adjacency matrix a. The dimension of the matrix will be equal to (n x n), where n is number of vertices in graph. The element of matrix a[i][j] is identified by an edge that connects the i-th and j-th vertices; the value here represents the weight of the corresponding edge. However, if there is no edge 99

2 between vertices i and j, the value in (a[i][j]) will be equal to infinity. An array of edges is another common representation of the graph. If m is the number of edges in a graph, then in order to represent the graph we have to use m x 3 twodimensional arrays; in each row, the first vertex, the second vertex, and the edge that connects them are also stored. The benefit of using an array of edges in comparison to adjacency matrix is when there is more than one edge that connects two vertices we cannot use adjacency matrix in order to represent graph. 3.2 Dijkstra s Algorithm: Explanation and Implementation For each vertex within a graph we assign a label that determines the minimal length from the starting point s to other vertices v of the graph. In a computer we can do it by declaring an array d[]. The algorithm works sequentially, and in each step it tries to decrease the value of the label of the vertices. The algorithm stops when all vertices have been visited. The label at the starting point s is equal to zero (d[s]=0); however, labels in other vertices v are equal to infinity (d[v]= ), which means that the length from the starting point s to other vertices is unknown. In a computer we can just use a very big number in order to represent infinity. In addition, for each vertex v we have to identify whether it has been visited or not. In order to do that, we declare an array of Boolean type called u[v], where initially, all vertices are assigned as unvisited (u[v] = false). The Dijkstra s algorithm consists of n iterations. If all vertices have been visited, then the algorithm finishes; otherwise, from the list of unvisited vertices we have to choose the vertex which has the minimum (smallest) value at its label (At the beginning, we will choose a starting point s). After that, we will consider all neighbors of this vertex (Neighbors of a vertex are those vertices that have common edges with the initial vertex). For each unvisited neighbor we will consider a new length, which is equal to the sum of the label s value at the initial vertex v (d[v]) and the length of edge l that connects them. If the resulting value is less than the value at the label, then we have to change the value in that label with the newly obtained value [4]. d [ neighbors ] = min ( d [ neighbors ], d[ v ] + l ) (1) After considering all of the neighbors, we will assign the initial vertex as visited (u[v] = true). After repeating this step n times, all vertices of the graph will be visited and the algorithm finishes or terminates. The vertices that are not connected with the starting point will remain by being assigned to infinity. In order to restore the shortest path from the starting point to other vertices, we need to identify array p [], where for each vertex, where v s, we will store the number of vertex p[v], which penultimate vertices in the shortest path. In other words, a complete path from s to v is equal to the following statement [5] Fig. 1 shows an excerpt of the Dijkstra s algorithm, which is written in Java. Fig. 1. Implementation in Java: An Excerpt 3.3 Floyd-Warshall Algorithm: Explanation and Implementation Consider the graph G, where vertices were numbered from 1 to n. The notation d ijk means the shortest path from i to j, which also passes through vertex k. Obviously if there is exists edge between vertices i and j it will be equal to d ij0, otherwise it can assigned as infinity. However, for other values of d ijk there can be two choices: (1) If the shortest path from i to j does not pass through the vertex k then value of d ijk will be equal to d ijk- 1. (2) If the shortest path from i to j passes through the vertex k then first it goes from i to k, after that goes from k to j. In this case the value of d ijk will be equal to d ikk-1 + d kjk-1. And in order to determine the shortest path we just need to find the minimum of these two statements [6]: d ij0 = the length of edge between vertices i and j (3) d ijk = min (d ijk-1, d ikk-1 + d kjk-1 ) (4) Fig. 2 shows an excerpt of the Floyd-Warshall algorithm, which is written in Java. P = ( s,, p [ p [ p [ v ] ] ], p [ p [ v ] ], p [ v ], v ) (2) Fig. 2. Implementation in Java: An Excerpt 3.4 Bellman-Ford Algorithm: Explanation and Implementation In comparison to Dijkstra s algorithm, the Bellman-Ford algorithm admits or acknowledges the edges with negative weights. That is why, a graph can contain cycles of negative weights, which will generate numerous number of paths from 100

3 the starting point to the final destination, where each cycle will minimize the length of the shortest path. Taking into consideration this fact let s assume that our graph does not contain cycles with negative weights. The array d[] will store the minimal length from the starting point s to other vertices. The algorithm consists of several phases, where in each phase it needs to minimize the value of all edges by replacing d[b] to following statement d[a] + c; a and b are vertices of the graph, and c is the corresponding edge that connects them. And in order to calculate the length of all shortest paths in a graph it requires n 1 phases, but for those vertices of a graph that are unreachable, the value of elements of the array will remain by being assigned to infinity [7]. Fig. 3 shows an excerpt of the Bellman-Ford algorithm, which is written in Java. Fig. 3. Implementation in Java: An Excerpt 3.5 Genetic Algorithm (GA) Intelligent algorithms have been introduced in finding optimal shortest paths in many situations that require the systems to search through a very large search space within limited time frame and also in accommodating an ever-changing environment. One of these algorithms is GA. By definition, genetic algorithms are a class or group of stochastic search algorithms that are based on biological evolution [8]. GA is mostly used for optimization problems. It uses several genetic operations such as selection, crossover, and mutation in order to generate a new generation of population, which represents a set of solutions (chromosomes) to the current problem. In addition, on average, this new generation is supposed to be better in terms of their overall fitness value as compared to the previous population. Each individual or chromosome within the population will be assigned a fitness value, which is calculated based on a pre-determined fitness function that measures how optimal its solution is in solving the current problem. In order to solve the shortest path problem using the GA [9], we need to generate a number of solutions, and then choose the most optimal one among the provided set of possible solutions. In order to solve the problem, an initial population that forms the first set of chromosomes to be used in the GA is randomly created. Each chromosome represents one possible solution to the current problem at hand. After that, they (chromosomes) are estimated using certain fitness function, which determines how well the solutions are. Taking into account the fitness value of each solution or chromosome, some chromosomes or individuals will be selected (selection operation), and the basic genetic operations such as crossover and mutation are applied on these chromosomes. Then, the fitness value of each chromosome is re-calculated, and the best solutions are selected to be considered for the next generation. This process continues until the criteria of the given problem will not be achieved. Thus we can identify the following stages of a GA: Step 1: Determine the fitness function; in our case we need to maximize the following function f(ch k ) = ( edge)- 1, where Ch k is k-th chromosome and edge is the sum of edges from starting point to final destination. Step 2: Create initial population a population that contains n individuals. At this stage we do not need to create fittest individuals, because it is probable that GA will transfer them into viable population. In order to create chromosomes for initial population, we will produce random paths from the starting point to final destination. Step 3: Selection the stage of GA that is used to select two chromosomes for genetic operations such as crossover and mutation. There are different types of selection methods; however, the Roulette Wheel selection method is chosen in order to solve the shortest path problem. Step 4: Crossover the process of reproduction where descendants are inherit traits of both parents mixing them in some way. Individuals for reproduction will be chosen from whole population (not from the survivors in the first iteration), because we need to keep diversity of individuals, otherwise entire population will be hammered with single copies of one individual. There exist different types of crossover methods; however, for our problem we will use the simplest method, which is called single point crossover. Step 5: Mutation the act of changing the value of some gene. Mutation keeps the genetic diversity of the population by changing genes of selected chromosome. If the fittest chromosome does not change after a specific number of iterations, which was described above, then the algorithm will terminate; the most optimal solution is automatically the fittest chromosome among the whole population. Fig. 4 illustrates the flowchart of the shortest path problem s solution using GA. This diagram is a framework that will be used for the implementation of GA in finding the shortest path or route in a given map of a city named Almaty in Kazakhstan, which is part of our current and future works. The GA used here is quite general in nature except for the part where loops might be introduced while executing GA in finding the most optimal solution; all loops must be removed because loops must not exist in a path. 101

4 Fig. 4. A Framework: Genetic Algorithm for the Shortest Path Problem 4 RESULTS 4.1 Test Results Dijkstra s, Floyd-Warshall and Bellman-Ford algorithms were tested using pre-defined test cases and automated checking system available in the websites [10][11][12]. In the following figures (Fig. 5, Fig. 6, Fig. 7) some information such as the number of test cases, results, author, date of submission, and programming language used for each algorithm are provided. 102

5 Fig. 5. Results of Testing for Dijkstra s Algorithm Fig. 6. Results of Testing for Floyd-Warshall Algorithm Fig. 7. Results of Testing for Bellman-Ford Algorithm 4.2 The Time Complexity The time complexity for each algorithm is illustrated in Table I; n represents the total number of vertices, and m is the total number of edges. TABLE 1 TIME COMPLEXITY distance between two places in a map that represents any types of networks. In addition, other artificial intelligence techniques such as fuzzy logic and neural networks can also be implemented in improving existing shortest path algorithms in order to make them more intelligent and more efficient. ACKNOWLEDGMENTS This research study was partially funded by the Fundamental Research Grant Scheme (FRGS), Ministry of Higher Education (MOHE), Malaysia. This paper would not have been possible without the assistance, support and patience of my supervisor, Dr. Hajar Mat Jani. I would like to thank Dr. Hajar for her invaluable advice and unsurpassed knowledge. Finally, I would like to thank my parents for giving birth to me and supporting me throughout my life. 5 CONCLUSION AND FUTURE WORK The computed time complexity for each of the Dijkstra s, Floyd-Warshall and Bellman-Ford algorithms show that these algorithms are acceptable in terms of their overall performance in solving the shortest path problem. All of these algorithms produce only one solution. However, the main advantage of GA over these algorithms is that it may produce a number of different optimal solutions since the result can differ every time the GA is executed. In the future, the proposed GA framework will be extended and improved in finding the shortest path or REFERENCES [1] C. Xi, F. Qi, and L. Wei, A New Shortest Path Algorithm based on Heuristic Strategy, Proc. of the 6th World Congress on Intelligent Control and Automation, Vol. 1, pp , [2] B.S. Hasan, M.A. Khamees, and A.S.H. Mahmoud, A Heuristic Genetic Algorithm for the Single Source Shortest Path Problem, Proc. of International Conference on Computer Systems and Applications, 103

6 pp , [3] T. Li, L. Qi, and D. Ruan, An Efficient Algorithm for the Single-Source Shortest Path Problem in Graph Theory, Proc. of 3rd International Conference on Intelligent System and Knowledge Engineering, Vol. 1, pp , [4] M. Jordan, Notes 7 for CS170, UC Berkeley, [5] J. Chamero, Dijkstra s Algorithm Discrete Structures & Algorithms, [6] S. Skiena, A. Revilla, Programming Challenges, The Programming Contest Training Manual pp [7] S. Hougardy, The Floyd-Warshall, Algorithm on Graphs with Negative Cycles, University of Bonn, [8] M. Negnevitsky, Artificial Intelligence: A Guide to Intelligent Systems, Third Edition, Addison-Wesley, [9] I. Rakip, U. Atila, A Genetic Algorithm Approach for Finding the Shortest Driving Time on Mobile Devices, Scientific Research and Essays, Dept. of Computer Engineering, [10] Dijkstra s Algorithm, Available at view.php?id=193# [11] Floyd-Warshall Algorithm, Available at view.php?id=218# [12] Bellman-Ford Algorithm, Available at view.php?id=260#

### Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

### Social Media Mining. Graph Essentials

Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

### Cpt S 223. School of EECS, WSU

The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring

### CS2 Algorithms and Data Structures Note 11. Breadth-First Search and Shortest Paths

CS2 Algorithms and Data Structures Note 11 Breadth-First Search and Shortest Paths In this last lecture of the CS2 Algorithms and Data Structures thread we will consider the problem of computing distances

### Weight Value and Map Complexity in Theta*

MATEC Web of Conferences, () DOI:./ matecconf/ MIMT Weight Value and Map Complexity in Theta* Phuc T.H. Le and Ki-dong Lee Robot lab, Department of Computer Engineering, Yeungnam University, Gyeongsan-si,

### Notes on Matrix Multiplication and the Transitive Closure

ICS 6D Due: Wednesday, February 25, 2015 Instructor: Sandy Irani Notes on Matrix Multiplication and the Transitive Closure An n m matrix over a set S is an array of elements from S with n rows and m columns.

### Web based Calculator of Genetic Algorithms and Modeling of Packets Forwarding Mechanism

Int. J. Open Problems Compt. Math., Vol. 6, No. 4, December, 2013 ISSN 1998-6262; Copyright ICSRS Publication, 2013 www.i-csrs.org Web based Calculator of Genetic Algorithms and Modeling of Packets Forwarding

Chapter 7 Load Balancing and Termination Detection Load balancing used to distribute computations fairly across processors in order to obtain the highest possible execution speed. Termination detection

### Load Balancing and Termination Detection

Chapter 7 Load Balancing and Termination Detection 1 Load balancing used to distribute computations fairly across processors in order to obtain the highest possible execution speed. Termination detection

### Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm

Journal of Al-Nahrain University Vol.15 (2), June, 2012, pp.161-168 Science Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm Manal F. Younis Computer Department, College

### Self-Learning Genetic Algorithm for a Timetabling Problem with Fuzzy Constraints

Self-Learning Genetic Algorithm for a Timetabling Problem with Fuzzy Constraints Radomír Perzina, Jaroslav Ramík perzina(ramik)@opf.slu.cz Centre of excellence IT4Innovations Division of the University

### Load Balancing and Termination Detection

Chapter 7 slides7-1 Load Balancing and Termination Detection slides7-2 Load balancing used to distribute computations fairly across processors in order to obtain the highest possible execution speed. Termination

### Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

### International Journal of Software and Web Sciences (IJSWS) www.iasir.net

International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International

### Comparison of Optimization Techniques in Large Scale Transportation Problems

Journal of Undergraduate Research at Minnesota State University, Mankato Volume 4 Article 10 2004 Comparison of Optimization Techniques in Large Scale Transportation Problems Tapojit Kumar Minnesota State

### Solutions to Exercises 8

Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

### Asynchronous Computations

Asynchronous Computations Asynchronous Computations Computations in which individual processes operate without needing to synchronize with other processes. Synchronizing processes is an expensive operation

### Load balancing in a heterogeneous computer system by self-organizing Kohonen network

Bull. Nov. Comp. Center, Comp. Science, 25 (2006), 69 74 c 2006 NCC Publisher Load balancing in a heterogeneous computer system by self-organizing Kohonen network Mikhail S. Tarkov, Yakov S. Bezrukov Abstract.

### Artificial Intelligence Methods (G52AIM)

Artificial Intelligence Methods (G52AIM) Dr Rong Qu rxq@cs.nott.ac.uk Constructive Heuristic Methods Constructive Heuristics method Start from an empty solution Repeatedly, extend the current solution

### Routing in Switched Networks

Routing in Switched Networks Chapter 12 CS420/520 Axel Krings Page 1 Routing in Circuit Switched Network Many connections will need paths through more than one switch Need to find a route Efficiency Resilience

### Indexing Multiple- Inheritance Hierarchies

Indexing Multiple- Inheritance Hierarchies Faculty of Electronics and Information Technology Warsaw University of Technology Jacek Lewandowski prof. Henryk Rybiński Layout The context of research Introduction

### Genetic Algorithm based Approach to Solve Non Fractional (0/1) Knapsack Optimization Problem

Genetic Algorithm based Approach to Solve Non Fractional (0/1) Knapsack Optimization Problem Vikas Thada Asst. Prof (CSE), ASET, Amity University, Gurgaon, India Shivali Dhaka Asst. Prof (CSE), ASET, Amity

Load Balancing Load Balancing Load balancing: distributing data and/or computations across multiple processes to maximize efficiency for a parallel program. Static load-balancing: the algorithm decides

### Load Balancing and Termination Detection

Chapter 7 Slide 1 Slide 2 Load Balancing and Termination Detection Load balancing used to distribute computations fairly across processors in order to obtain the highest possible execution speed. Termination

### Genetic Algorithm for Solving Simple Mathematical Equality Problem

Genetic Algorithm for Solving Simple Mathematical Equality Problem Denny Hermawanto Indonesian Institute of Sciences (LIPI), INDONESIA Mail: denny.hermawanto@gmail.com Abstract This paper explains genetic

### Keywords: Travelling Salesman Problem, Map Reduce, Genetic Algorithm. I. INTRODUCTION

ISSN: 2321-7782 (Online) Impact Factor: 6.047 Volume 4, Issue 6, June 2016 International Journal of Advance Research in Computer Science and Management Studies Research Article / Survey Paper / Case Study

### Lecture 2.1 : The Distributed Bellman-Ford Algorithm. Lecture 2.2 : The Destination Sequenced Distance Vector (DSDV) protocol

Lecture 2 : The DSDV Protocol Lecture 2.1 : The Distributed Bellman-Ford Algorithm Lecture 2.2 : The Destination Sequenced Distance Vector (DSDV) protocol The Routing Problem S S D D The routing problem

### Edges = communication links Vertices = computers, switches, routers, etc. For packet inbound at a particular vertex, determine what output edge to use

IP Routing Networks as Graphs Networks are graphs Edges = communication links Vertices = computers, switches, routers, etc For packet inbound at a particular vertex, determine what output edge to use Routers

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

### A Robust Method for Solving Transcendental Equations

www.ijcsi.org 413 A Robust Method for Solving Transcendental Equations Md. Golam Moazzam, Amita Chakraborty and Md. Al-Amin Bhuiyan Department of Computer Science and Engineering, Jahangirnagar University,

### Chapter 7 Load Balancing and Termination Detection

Chapter 7 Load Balancing and Termination Detection Load balancing used to distribute computations fairly across processors in order to obtain the highest possible execution speed. Termination detection

### Chapter 4. Trees. 4.1 Basics

Chapter 4 Trees 4.1 Basics A tree is a connected graph with no cycles. A forest is a collection of trees. A vertex of degree one, particularly in a tree, is called a leaf. Trees arise in a variety of applications.

### DATA ANALYSIS II. Matrix Algorithms

DATA ANALYSIS II Matrix Algorithms Similarity Matrix Given a dataset D = {x i }, i=1,..,n consisting of n points in R d, let A denote the n n symmetric similarity matrix between the points, given as where

### Graph Algorithms. Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar

Graph Algorithms Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text Introduction to Parallel Computing, Addison Wesley, 3. Topic Overview Definitions and Representation Minimum

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### Homework 15 Solutions

PROBLEM ONE (Trees) Homework 15 Solutions 1. Recall the definition of a tree: a tree is a connected, undirected graph which has no cycles. Which of the following definitions are equivalent to this definition

### Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming

### Graphs. Graph G=(V,E): representation

Graphs G = (V,E) V the vertices of the graph {v 1, v 2,..., v n } E the edges; E a subset of V x V A cost function cij is the cost/ weight of the edge (v i, v j ) Graph G=(V,E): representation 1. Adjacency

### Dynamic Programming. Applies when the following Principle of Optimality

Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.

### Rating and Generating Sudoku Puzzles Based On Constraint Satisfaction Problems

Rating and Generating Sudoku Puzzles Based On Constraint Satisfaction Problems Bahare Fatemi, Seyed Mehran Kazemi, Nazanin Mehrasa Abstract Sudoku is a logic-based combinatorial puzzle game which people

### Practical Graph Mining with R. 5. Link Analysis

Practical Graph Mining with R 5. Link Analysis Outline Link Analysis Concepts Metrics for Analyzing Networks PageRank HITS Link Prediction 2 Link Analysis Concepts Link A relationship between two entities

### The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science

Trees Mathematically speaking trees are a special class of a graph. The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science However, in computer

### Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

1. Introduction Linear Programming for Optimization Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc. 1.1 Definition Linear programming is the name of a branch of applied mathematics that

### A hybrid Approach of Genetic Algorithm and Particle Swarm Technique to Software Test Case Generation

A hybrid Approach of Genetic Algorithm and Particle Swarm Technique to Software Test Case Generation Abhishek Singh Department of Information Technology Amity School of Engineering and Technology Amity

### Problem Set 7 Solutions

8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

### 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT

DECISION 1 Revision Notes 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT Make sure you show comparisons clearly and label each pass First Pass 8 4 3 6 1 4 8 3 6 1 4 3 8 6 1 4 3 6 8 1

### A Survey on Intrusion Detection System with Data Mining Techniques

A Survey on Intrusion Detection System with Data Mining Techniques Ms. Ruth D 1, Mrs. Lovelin Ponn Felciah M 2 1 M.Phil Scholar, Department of Computer Science, Bishop Heber College (Autonomous), Trichirappalli,

### New binary representation in Genetic Algorithms for solving TSP by mapping permutations to a list of ordered numbers

Proceedings of the 5th WSEAS Int Conf on COMPUTATIONAL INTELLIGENCE, MAN-MACHINE SYSTEMS AND CYBERNETICS, Venice, Italy, November 0-, 006 363 New binary representation in Genetic Algorithms for solving

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### Computational Approach for Assessment of Critical Infrastructure in Network Systems

Computational Approach for Assessment of Critical Infrastructure in Network Systems EMIL KELEVEDJIEV 1 Institute of Mathematics and Informatics Bulgarian Academy of Sciences ABSTRACT. Methods of computational

### ISSN: 2319-5967 ISO 9001:2008 Certified International Journal of Engineering Science and Innovative Technology (IJESIT) Volume 2, Issue 3, May 2013

Transistor Level Fault Finding in VLSI Circuits using Genetic Algorithm Lalit A. Patel, Sarman K. Hadia CSPIT, CHARUSAT, Changa., CSPIT, CHARUSAT, Changa Abstract This paper presents, genetic based algorithm

### MGF 1107 CH 15 LECTURE NOTES Denson. Section 15.1

1 Section 15.1 Consider the house plan below. This graph represents the house. Consider the mail route below. This graph represents the mail route. 2 Definitions 1. Graph a structure that describes relationships.

### Internet Control Message Protocol (ICMP)

SFWR 4C03: Computer Networks & Computer Security Jan 31-Feb 4, 2005 Lecturer: Kartik Krishnan Lecture 13-16 Internet Control Message Protocol (ICMP) The operation of the Internet is closely monitored by

### AIMA Chapter 3: Solving problems by searching

AIMA Chapter 3: Solving problems by searching Ana Huaman January 13, 2011 1. Define in your own words the following terms: state, state space, search tree, search node, goal, action, transition model and

### Incremental Routing Algorithms For Dynamic Transportation Networks

UCGE Reports Number 20238 Department of Geomatics Engineering Incremental Routing Algorithms For Dynamic Transportation Networks (URL: http://www.geomatics.ucalgary.ca/research/publications/gradtheses.html)

### Load Balancing Routing Algorithm for Data Gathering Sensor Network

Load Balancing Routing Algorithm for Data Gathering Sensor Network Evgeny Bakin, Grigory Evseev State University of Aerospace Instrumentation Saint-Petersburg, Russia {jenyb, egs}@vu.spb.ru Denis Dorum

### Lab 4: 26 th March 2012. Exercise 1: Evolutionary algorithms

Lab 4: 26 th March 2012 Exercise 1: Evolutionary algorithms 1. Found a problem where EAs would certainly perform very poorly compared to alternative approaches. Explain why. Suppose that we want to find

### CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

### Analysis of Micromouse Maze Solving Algorithms

1 Analysis of Micromouse Maze Solving Algorithms David M. Willardson ECE 557: Learning from Data, Spring 2001 Abstract This project involves a simulation of a mouse that is to find its way through a maze.

### A Brief Study of the Nurse Scheduling Problem (NSP)

A Brief Study of the Nurse Scheduling Problem (NSP) Lizzy Augustine, Morgan Faer, Andreas Kavountzis, Reema Patel Submitted Tuesday December 15, 2009 0. Introduction and Background Our interest in the

### Mathematical Modelling Lecture 8 Networks

Lecture 8 Networks phil.hasnip@york.ac.uk Overview of Course Model construction dimensional analysis Experimental input fitting Finding a best answer optimisation Tools for constructing and manipulating

### Efficient Data Structures for Decision Diagrams

Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

### Project Ideas in Computer Science. Keld Helsgaun

Project Ideas in Computer Science Keld Helsgaun 1 Keld Helsgaun Research: Combinatorial optimization Heuristic search (artificial intelligence) Simulation Programming tools Teaching: Programming, algorithms

### SOFTWARE TESTING STRATEGY APPROACH ON SOURCE CODE APPLYING CONDITIONAL COVERAGE METHOD

SOFTWARE TESTING STRATEGY APPROACH ON SOURCE CODE APPLYING CONDITIONAL COVERAGE METHOD Jaya Srivastaval 1 and Twinkle Dwivedi 2 1 Department of Computer Science & Engineering, Shri Ramswaroop Memorial

### The Assignment Problem and the Hungarian Method

The Assignment Problem and the Hungarian Method 1 Example 1: You work as a sales manager for a toy manufacturer, and you currently have three salespeople on the road meeting buyers. Your salespeople are

### CS5314 Randomized Algorithms. Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles)

CS5314 Randomized Algorithms Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles) 1 Objectives Introduce Random Graph Model used to define a probability space for all graphs with

### D A T A M I N I N G C L A S S I F I C A T I O N

D A T A M I N I N G C L A S S I F I C A T I O N FABRICIO VOZNIKA LEO NARDO VIA NA INTRODUCTION Nowadays there is huge amount of data being collected and stored in databases everywhere across the globe.

### Hybrid Evolution of Heterogeneous Neural Networks

Hybrid Evolution of Heterogeneous Neural Networks 01001110 01100101 01110101 01110010 01101111 01101110 01101111 01110110 01100001 00100000 01110011 01101011 01110101 01110000 01101001 01101110 01100001

### A SURVEY ON GENETIC ALGORITHM FOR INTRUSION DETECTION SYSTEM

A SURVEY ON GENETIC ALGORITHM FOR INTRUSION DETECTION SYSTEM MS. DIMPI K PATEL Department of Computer Science and Engineering, Hasmukh Goswami college of Engineering, Ahmedabad, Gujarat ABSTRACT The Internet

### Graph Theory for Articulated Bodies

Graph Theory for Articulated Bodies Alba Perez-Gracia Department of Mechanical Engineering, Idaho State University Articulated Bodies A set of rigid bodies (links) joined by joints that allow relative

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Warshall s Algorithm: Transitive Closure

CS 0 Theory of Algorithms / CS 68 Algorithms in Bioinformaticsi Dynamic Programming Part II. Warshall s Algorithm: Transitive Closure Computes the transitive closure of a relation (Alternatively: all paths

### A Genetic Algorithm Approach for Solving a Flexible Job Shop Scheduling Problem

A Genetic Algorithm Approach for Solving a Flexible Job Shop Scheduling Problem Sayedmohammadreza Vaghefinezhad 1, Kuan Yew Wong 2 1 Department of Manufacturing & Industrial Engineering, Faculty of Mechanical

### Load Balancing by MPLS in Differentiated Services Networks

Load Balancing by MPLS in Differentiated Services Networks Riikka Susitaival, Jorma Virtamo, and Samuli Aalto Networking Laboratory, Helsinki University of Technology P.O.Box 3000, FIN-02015 HUT, Finland

### Highway Maintenance Scheduling Using Genetic Algorithm with Microscopic Traffic Simulation

Wang, Cheu and Fwa 1 Word Count: 6955 Highway Maintenance Scheduling Using Genetic Algorithm with Microscopic Traffic Simulation Ying Wang Research Scholar Department of Civil Engineering National University

### Graphs and Network Flows IE411 Lecture 1

Graphs and Network Flows IE411 Lecture 1 Dr. Ted Ralphs IE411 Lecture 1 1 References for Today s Lecture Required reading Sections 17.1, 19.1 References AMO Chapter 1 and Section 2.1 and 2.2 IE411 Lecture

### Data Structures in Java. Session 16 Instructor: Bert Huang

Data Structures in Java Session 16 Instructor: Bert Huang http://www.cs.columbia.edu/~bert/courses/3134 Announcements Homework 4 due next class Remaining grades: hw4, hw5, hw6 25% Final exam 30% Midterm

### Background. Linear Convolutional Encoders (2) Output as Function of Input (1) Linear Convolutional Encoders (1)

S-723410 Convolutional Codes (1) 1 S-723410 Convolutional Codes (1) 3 Background Convolutional codes do not segment the data stream, but convert the entire data stream into another stream (codeword) Some

### Differential Evolution Particle Swarm Optimization for Digital Filter Design

Differential Evolution Particle Swarm Optimization for Digital Filter Design Bipul Luitel, and Ganesh K. Venayagamoorthy, Abstract In this paper, swarm and evolutionary algorithms have been applied for

### USING SPECTRAL RADIUS RATIO FOR NODE DEGREE TO ANALYZE THE EVOLUTION OF SCALE- FREE NETWORKS AND SMALL-WORLD NETWORKS

USING SPECTRAL RADIUS RATIO FOR NODE DEGREE TO ANALYZE THE EVOLUTION OF SCALE- FREE NETWORKS AND SMALL-WORLD NETWORKS Natarajan Meghanathan Jackson State University, 1400 Lynch St, Jackson, MS, USA natarajan.meghanathan@jsums.edu

### A Non-Linear Schema Theorem for Genetic Algorithms

A Non-Linear Schema Theorem for Genetic Algorithms William A Greene Computer Science Department University of New Orleans New Orleans, LA 70148 bill@csunoedu 504-280-6755 Abstract We generalize Holland

### Graph Theory Topics in Computer Networking

Graph Theory Topics in Computer Networking By Chad Hart Spring 2013 In Partial Fulfillment of Math 4395 - Senior Project Department of Computer and Mathematical Sciences Faculty Advisor: Dr. Timothy Redl:

### Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling

6.854 Advanced Algorithms Lecture 16: 10/11/2006 Lecturer: David Karger Scribe: Kermin Fleming and Chris Crutchfield, based on notes by Wendy Chu and Tudor Leu Minimum cost maximum flow, Minimum cost circulation,

### Genetic Algorithms and Sudoku

Genetic Algorithms and Sudoku Dr. John M. Weiss Department of Mathematics and Computer Science South Dakota School of Mines and Technology (SDSM&T) Rapid City, SD 57701-3995 john.weiss@sdsmt.edu MICS 2009

### Search Heuristics for Load Balancing in IP-networks

Search Heuristics for Load Balancing in IP-networks Mattias Söderqvist Swedish Institute of Computer Science mso@sics.se 3rd March 25 SICS Technical Report T25:4 ISSN 11-3154 ISRN:SICS-T--25/4-SE Abstract

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Introduction To Genetic Algorithms

1 Introduction To Genetic Algorithms Dr. Rajib Kumar Bhattacharjya Department of Civil Engineering IIT Guwahati Email: rkbc@iitg.ernet.in References 2 D. E. Goldberg, Genetic Algorithm In Search, Optimization

### Part 2: Community Detection

Chapter 8: Graph Data Part 2: Community Detection Based on Leskovec, Rajaraman, Ullman 2014: Mining of Massive Datasets Big Data Management and Analytics Outline Community Detection - Social networks -

### 6.02 Practice Problems: Routing

1 of 9 6.02 Practice Problems: Routing IMPORTANT: IN ADDITION TO THESE PROBLEMS, PLEASE SOLVE THE PROBLEMS AT THE END OF CHAPTERS 17 AND 18. Problem 1. Consider the following networks: network I (containing

### MULTI-PHASE FUZZY CONTROL OF SINGLE INTERSECTION IN TRAFFIC SYSTEM BASED ON GENETIC ALGORITHM. Received February 2011; revised June 2011

International Journal of Innovative Computing, Information and Control ICIC International c 2012 ISSN 1349-4198 Volume 8, Number 5(A), May 2012 pp. 3387 3397 MULTI-PHASE FUZZY CONTROL OF SINGLE INTERSECTION

### GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

### COLORED GRAPHS AND THEIR PROPERTIES

COLORED GRAPHS AND THEIR PROPERTIES BEN STEVENS 1. Introduction This paper is concerned with the upper bound on the chromatic number for graphs of maximum vertex degree under three different sets of coloring

### A Hybrid Tabu Search Method for Assembly Line Balancing

Proceedings of the 7th WSEAS International Conference on Simulation, Modelling and Optimization, Beijing, China, September 15-17, 2007 443 A Hybrid Tabu Search Method for Assembly Line Balancing SUPAPORN

### Multiobjective Multicast Routing Algorithm

Multiobjective Multicast Routing Algorithm Jorge Crichigno, Benjamín Barán P. O. Box 9 - National University of Asunción Asunción Paraguay. Tel/Fax: (+9-) 89 {jcrichigno, bbaran}@cnc.una.py http://www.una.py

### Representing Vector Fields Using Field Line Diagrams

Minds On Physics Activity FFá2 5 Representing Vector Fields Using Field Line Diagrams Purpose and Expected Outcome One way of representing vector fields is using arrows to indicate the strength and direction

### Lecture Notes on Spanning Trees

Lecture Notes on Spanning Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model

### Graph definition Degree, in, out degree, oriented graph. Complete, regular, bipartite graph. Graph representation, connectivity, adjacency.

Mária Markošová Graph definition Degree, in, out degree, oriented graph. Complete, regular, bipartite graph. Graph representation, connectivity, adjacency. Isomorphism of graphs. Paths, cycles, trials.