Submitted By dsashank

Words 6091

Pages 25

Words 6091

Pages 25

A graph G = (V, E) is a set of objects, V = {v1, v2, . . .} called vertices, and a set E = {e1, e2, . . .} called edges, such that an edge ek is determined with an unordered pair (vi, vj) of vertices. The vertices vi, vj that belong to an edge ek are called the end vertices of ek. A graph is generally represented by a diagram, with points representing vertices and line segments joining these vertices representing edges. This diagram is generally referred to as a graph. For example, the figure below depicts a graph. [1]

Figure 1: A graph with 5 vertices and 10 edges

According to the definition above, an edge is associated with a vertex pair (vi,vi). A self loop is an edge that has the same initial and final vertices. Edge e1 in the above figure is a self-loop. Hence, a given pair of vertices may have more than one edge, for example, edges e4 and e5. These edges are termed parallel edges. A simple graph is a graph that does not have any self loops or parallel edges. There are many applications of graph theory in various fields. In engineering, in physical, social, and biological sciences, in linguistics, and in numerous other areas graph theory helps to solve many problems. Any physical involving discrete objects and their relationships can be shown by using graphs. The concept of Graph theory began in 1736 when Euler considered the Konigsberg bridge problem. [1]

1.1 Konigsberg Bridge Problem:

One of the classic and well known examples in graph theory is the Konigsberg Bridge Problem. The first solution to this problem was given by Leonard Euler in 1736, by using a graph. The first paper ever on graphs and their properties was written by him and thus he became the originator of graph theory. The Konigsberg bridge problem is as follows. The Pregel river in Konigsberg surrounds two islands say, A and C. These…...

...com/locate/dam The k-in-a-tree problem for graphs of girth at least k W. Liu a , N. Trotignon b,∗ a Université Grenoble 1, Joseph Fourier, France b CNRS, LIAFA, Université Paris 7, Paris Diderot, France article info Article history: Received 10 July 2009 Received in revised form 28 May 2010 Accepted 3 June 2010 Available online 1 July 2010 Keywords: Tree Algorithm Three-in-a-tree k-in-a-tree Girth Induced subgraph abstract For all integers k ≥ 3, we give an O(n4 )-time algorithm for the problem whose instance is a graph G of girth at least k together with k vertices and whose question is ‘‘Does G contains an induced subgraph containing the k vertices and isomorphic to a tree?’’. This directly follows for k = 3 from the three-in-a-tree algorithm of Chudnovsky and Seymour and for k = 4 from a result of Derhy, Picouleau and Trotignon. Here we solve the problem for k ≥ 5. Our algorithm relies on a structural description of graphs of girth at least k that do not contain an induced tree covering k given vertices (k ≥ 5). © 2010 Elsevier B.V. All rights reserved. 1. Introduction Many interesting classes of graphs are defined by forbidding induced subgraphs; see [1] for a survey. This is why the detection of several kinds of induced subgraph is interesting; see [5], where many such problems are surveyed. In particular, the problem of deciding whether a graph G contains as an induced subgraph some graph obtained after possibly......

Words: 4554 - Pages: 19

...) A) 4:1 B) 2:1 C) 1.7:1 D) 1.4:1 11) Two objects are thrown from the top of a tall building. One is thrown up, and the other is thrown down, both with the same initial speed. What are their speeds when they hit the street? A) The one thrown up is traveling faster. B) The one thrown down is traveling faster. C) They are traveling at the same speed. D) It is impossible to tell because the height of the building is not given. 12) The slope of a position versus time graph gives A) position. B) velocity. C) acceleration. D) displacement. 13) The slope of a velocity versus time graph gives A) position. B) velocity. C) acceleration. D) displacement. 14) The area under a curve in an acceleration versus time graph gives A) acceleration. B) velocity. C) displacement. D) position. 15) The area under a curve in a velocity versus time graph gives A) acceleration. B) velocity. C) displacement. D) position. 16) An object moves 15.0 m north and then 11.0 m south. Find both the distance traveled and the magnitude of the displacement vector. A) 4.0 m, 26.0 m B) 26.0 m, 4.0 m C) 26.0 m, 26.0 m D) 4.0 m, 4.0 m 17) A boat can move at 30 km/h in still water. How long will it take to move 12 km upstream in a river flowing 6.0 km/h? A) 20 min B) 22 min C) 24 min D) 30 min 18) 55 mi/h is how many m/s? (1 mi = 1609 m.) A) 25 m/s B) 49 m/s C) 90 m/s D) 120 m/s 19) If you are driving 72 km/h along a straight road and you look to......

Words: 10622 - Pages: 43

...Programming project 3 Task Title: Implementation of basic command-line interface to GraphApplication Task Description: Implement classes that will instantiate a graph editor. The system should accept various kinds of objects from user by given commands, and respond to these commands by creating node objects, creating arc objects, displaying them or deleting them. Implement the following classes: 1. GraphApplication class that will implement command line interface and interact with the user: This class needs to implement the following commands in its run() method: a. quit – exits the application b. nodes - lists the nodes in the graph c. arcs – lists the arcs in the graph these commands do not need index or parameters d. node - this command requires object for which the node will be created e. dir-arc – this command requires two objects that have nodes and relation name and makes a directed arc between them f. undir-arc – this command requires two objects that are added to nodes and relation name and makes non-directed (symmetric) arc between them these commands can take any object, but for now we will use strings g. printout, delete – these commands require an index or name for the object to be shown or deleted if delete takes two arguments it deletes the corresponding arc, of it gets only one, it deletes a node, if printout takes one argument it prints a node, if it takes two arguments it prints the fact......

Words: 2276 - Pages: 10

...Introduction to Algorithms Second Edition This page intentionally left blank Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein Introduction to Algorithms Second Edition The MIT Press Cambridge, Massachusetts London, England Dubuque, IA St. Louis Montr´ al e Madison, WI Toronto McGraw-Hill Book Company Boston Burr Ridge, IL New York San Francisco This book is one of a series of texts written by faculty of the Electrical Engineering and Computer Science Department at the Massachusetts Institute of Technology. It was edited and produced by The MIT Press under a joint production-distribution agreement with the McGraw-Hill Book Company. Ordering Information: North America Text orders should be addressed to the McGraw-Hill Book Company. All other orders should be addressed to The MIT Press. Outside North America All orders should be addressed to The MIT Press or its local distributor. Third printing, 2002 c 2001 by The Massachusetts Institute of Technology First edition 1990 All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. This book was printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Introduction to algorithms / Thomas H. Cormen . . . [et al.].—2nd ed. p. cm. Includes bibliographical references and...

Words: 426328 - Pages: 1706

...joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka 3 GRAPH THEORY AND APPLICATIONS ISBN 0-558-83970-3 Discrete and Combinatorial Mathematics: An Applied Introduction, Fifth Edition, by Ralph P. Grimaldi. Published by Addison Wesley. Copyright © 2004 by Pearson Education, Inc. joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka joka......

Words: 84444 - Pages: 338

...Length: 3 Parts: See Assignment Details Points Possible: 75 Graphs and Trees Task Background: Graphs and trees provide you with ways to visualize data sets, and the opportunity to do analysis on the data (e.g., shortest path). Knowing the structure of a database enables you to choose a proper algorithm for searching for data within a database. Primary Task Response: Within the Discussion Board area, write up to 3 paragraphs that respond to the following questions with your thoughts, ideas, and comments. This will be the foundation for future discussions by your classmates. Be substantive and clear, and use examples to reinforce your ideas. Part I (25 points – distributed as follows) Trees are somewhat less complicated than graphs, which makes things like data searching easier, when a data has the structure of a tree. However, not all data can be represented by a tree. Give an example of a data set that cannot be represented by a tree, but that can be represented by a more general graph. 1) Create, show, and describe your data set. (5 points) V = {Bill, John, Kim, James, Chris, Destiny, Noah, Paul} E = {(Bill, John), (Kim, James), (Chris, Destiny), (Noah, Paul), (Bill, Kim), (John, Chris), (Destiny, Noah)} These are people that are employees at a store. Some work on the same shift together and associate with each other. 2) Then, show by building a graph, how your data is represented by a graph. (5......

Words: 1054 - Pages: 5

...Approximation Algorithms Springer Berlin Heidelberg NewYork Barcelona Hong Kong London Milan Paris Singapore Tokyo To my parents Preface Although this may seem a paradox, all exact science is dominated by the idea of approximation. Bertrand Russell (1872–1970) Most natural optimization problems, including those arising in important application areas, are NP-hard. Therefore, under the widely believed conjecture that P = NP, their exact solution is prohibitively time consuming. Charting the landscape of approximability of these problems, via polynomial time algorithms, therefore becomes a compelling subject of scientiﬁc inquiry in computer science and mathematics. This book presents the theory of approximation algorithms as it stands today. It is reasonable to expect the picture to change with time. The book is divided into three parts. In Part I we cover a combinatorial algorithms for a number of important problems, using a wide variety of algorithm design techniques. The latter may give Part I a non-cohesive appearance. However, this is to be expected – nature is very rich, and we cannot expect a few tricks to help solve the diverse collection of NP-hard problems. Indeed, in this part, we have purposely refrained from tightly categorizing algorithmic techniques so as not to trivialize matters. Instead, we have attempted to capture, as accurately as possible, the individual character of each problem, and point out connections between problems and algorithms for solving......

Words: 140657 - Pages: 563

...Lesson 25 Planning algorithm - II Version 2 CSE IIT,Kharagpur 9.4.5 Partial-Order Planning Total-Order vs. Partial-Order Planners Any planner that maintains a partial solution as a totally ordered list of steps found so far is called a total-order planner, or a linear planner. Alternatively, if we only represent partial-order constraints on steps, then we have a partial-order planner, which is also called a non-linear planner. In this case, we specify a set of temporal constraints between pairs of steps of the form S1 < S2 meaning that step S1 comes before, but not necessarily immediately before, step S2. We also show this temporal constraint in graph form as S1 +++++++++> S2 STRIPS is a total-order planner, as are situation-space progression and regression planners Partial-order planners exhibit the property of least commitment because constraints ordering steps will only be inserted when necessary. On the other hand, situation-space progression planners make commitments about the order of steps as they try to find a solution and therefore may make mistakes from poor guesses about the right order of steps. Representing a Partial-Order Plan A partial-order plan will be represented as a graph that describes the temporal constraints between plan steps selected so far. That is, each node will represent a single step in the plan (i.e., an instance of one of the operators), and an arc will designate a temporal constraint between the two steps connected by the arc.......

Words: 3041 - Pages: 13

...Inductive Triple Graphs: A purely functional approach to represent RDF Jose Emilio Labra Gayo1 , Johan Jeuring2 , and Jose María Álvarez Rodríguez3 1 University of Oviedo Spain labra@uniovi.es Utrecht University, Open University of the Netherlands The Netherlands j.t.jeuring@uu.nl 3 South East European Research Center Greece jmalvarez@seerc.org 2 Abstract. RDF is one of the cornerstones of the Semantic Web. It can be considered as a knowledge representation common language based on a graph model. In the functional programming community, inductive graphs have been proposed as a purely functional representation of graphs, which makes reasoning and concurrent programming simpler. In this paper, we propose a simpliﬁed representation of inductive graphs, called Inductive Triple Graphs, which can be used to represent RDF in a purely functional way. We show how to encode blank nodes using existential variables, and we describe two implementations of our approach in Haskell and Scala. 1 Introduction RDF appears at the basis of the semantic web technologies stack as the common language for knowledge representation and exchange. It is based on a simple graph model where nodes are predominantly resources, identiﬁed by URIs, and edges are properties identiﬁed by URIs. Although this apparently simple model has some intricacies, such as the use of blank nodes, RDF has been employed in numerous domains and has been part of the successful linked open data movement. The main......

Words: 5524 - Pages: 23

...3PART ONE * Lecture 1 (01/09) Posted on: Monday, January 28, 2013 Topics: Stable Matching Reading: class handout * Lecture 2 (01/14) Posted on: Thursday, January 24, 2013 Topics: Graph Representation, BFS, DFS Reading: CLRS (Sections 22.1, 22.2, 22.3), KT (3.2, 3.3) Notes: 2 possible representations of a graph 1. Adjacency Matrix-used for dense graphs (V2 memory space) a. Aij=1 if edge exists between I and J but 0 if not 2. Adjacency List- Used for sparse graphs (V+E memory space or V+2E for undirected) b. Array adj of |V| lists, one for each vertex. c. Adj[u] contains all vertices adjacent (or reachable by one edge) to u Breadth First Search(G,s) BFS.G; s/ 1 for each vertex u in G.V –{s} 2 u.color = WHITE 3 u.disc =∞ 4 u.parent= NIL 5 s.color = GRAY 6 s.disc = 0 7 s.parent= NIL 8 Q = ∅; 9 ENQUEUE(Q,s) 10 while Q ≠ ∅ 11 u = DEQUEUE(Q) 12 for each v in G.Adj[u] 13 if v.color == WHITE 14 v.color = GRAY 15 v.disc = u.disc + 1 16 v.parent = u 17 ENQUEUE(Q,v) 18 u.color = BLACK White means not discovered yet, grey mean discovered but not finished, black means finished. Run time O(V+E) BFS gives shortest path from s to every vertex Lemma: x in Li and Y in Lj and edge (x,y) exists Then |i-j| less than or equal to 1 Depth First search Properties: 1) v is a descendenant of u iff v if discovered when u is gray 2) Parenthesis theorem, u and v in V. either discovery and finish times......

Words: 5019 - Pages: 21

...Abstract—This paper addresses the topic of methods for producing inter procedural static data flow graphs. The method used in this paper is a sort of progressive mining approach: A start location for the data flow edges is outlined, and through multiple iterations, the forward data flow step operation is taken on the universe, until no new paths have been found. I. INTRODUCTION New tools often provide novel approaches to longstanding problems. In the next update of C-Atlas, Ensoft intends to update the capabilities of C-Atlas. These improvements are intended to provide a customizable approach to evaluating a program’s design, structure, and security. Such an update seeks to address any number of problems. Analyzing a C program’s memory management is one such problem. This project would seek to use C-Atlas to better analyze C memory management. In memory leak (memory management) analysis, the user must show that for every path forward from an variable’s allocation, there exists at least one deallocation site for that variable. This task is trivial, unless the variable’s allocation and deallocation(s) are separated by a vast field of possible control flow. C-Atlas offers a flexible interface for data flow graph generation as a solution to this problem. Through this interface, one may then produce connected data flow graphs, allowing a single variable’s path to be traced through multiple functions. This visual aide can greatly increase the time efficiency of performing......

Words: 877 - Pages: 4

...Design and Analysis of Computer Algorithm Assignment 2 Name: Boyu Zhang UTD-ID: 2021226566 Email:bxz140830@utdallas.edu Contents Problem 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Problem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Problem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Problem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Problem 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Problem 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Problem 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Problem 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 Problem1 This problem can solution by Dial’s algorithm in the lesson six. We can set up W+2 buckets with the labels of 0, 1, …, W, . Then we carry out the following steps: (a). Initial the buckets with node S be in the bucket 0 and all other nodes be in the bucket . (b). then select the node with the minimum temporary distance label. For the first time, it should be the source node S in the bucket 0. (c). Update the buckets information. Then some node should be moved from the bucket to the corresponding distance bucket. (d). Remove the selected node from the bucket. Then repeat step 2 and 3 until there is no non-empty bucket.......

Words: 726 - Pages: 3

...Introduction To Virtual Spatial Graph Theory 1. Introduction The mathematical theory of knots studies the many ways a single loop can be tangled up in space. Since many biological molecules, such as DNA, often form loops, knot theory has been applied to biological systems with good effect. However, many biological molecules form far more complicated shapes than simple loops; proteins, for example, often contain extensive crosslinking between cystine residues, and hence from the mathematical viewpoint are far more complicated structures–spatial graphs. The study of graphs embedded in space is known as spatial graph theory, and researchers such as Flapan have obtained good results by applying it to chemical problems. However, in biological systems, proteins are often associated with membranes, meaning that some portions of the molecule are prevented from interacting with others. In the case of a simple loop, the virtual knot theory of Kauffman provides a mathematical framework for studying such systems, as it allows some crossings of strands to be labeled “virtual,” i.e. non-interacting. We hope that a merging of these two theories, called virtual spatial graph theory, will prove equally useful in the biological sciences. Knot theory studies embeddings of circles up to isotopy. There are many ways to extend the ideas of knot theory; two natural choices are the study of spatial graphs and the theory of virtual knots. The theory of spatial graphs generalizes the objects......

Words: 2895 - Pages: 12

...T C L I F F O R D STEIN INTRODUCTION TO ALGORITHMS T H I R D E D I T I O N Introduction to Algorithms Third Edition Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein Introduction to Algorithms Third Edition The MIT Press Cambridge, Massachusetts London, England c 2009 Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. For information about special quantity discounts, please email special sales@mitpress.mit.edu. This book was set in Times Roman and Mathtime Pro 2 by the authors. Printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Introduction to algorithms / Thomas H. Cormen . . . [et al.].—3rd ed. p. cm. Includes bibliographical references and index. ISBN 978-0-262-03384-8 (hardcover : alk. paper)—ISBN 978-0-262-53305-8 (pbk. : alk. paper) 1. Computer programming. 2. Computer algorithms. I. Cormen, Thomas H. QA76.6.I5858 2009 005.1—dc22 10 9 8 7 6 5 4 3 2 2009008593 Contents Preface xiii I Foundations 1 2 Introduction The Role of Algorithms in Computing 5 1.1 Algorithms 5 1.2 Algorithms as a technology 11 Getting Started 16 2.1 Insertion sort 16 2.2 Analyzing algorithms 23 2.3 Designing algorithms 29 3 3 4 Growth of Functions 43 3.1......

Words: 387342 - Pages: 1550

...2015 IEEE International Conference on Robotics and Automation (ICRA) Washington State Convention Center Seattle, Washington, May 26-30, 2015 A General Technique for Fast Comprehensive Multi-Root Planning on Graphs by Coloring Vertices and Deferring Edges Christopher M. Dellin Siddhartha S. Srinivasa {cdellin,siddh}@cs.cmu.edu The Robotics Institute Carnegie Mellon University Abstract—We formulate and study the comprehensive multi-root (CMR) planning problem, in which feasible paths are desired between multiple regions. We propose two primary contributions which allow us to extend stateof-the-art sampling-based planners. First, we propose the notion of vertex coloring as a compact representation of the CMR objective on graphs. Second, we propose a method for deferring edge evaluations which do not advance our objective, by way of a simple criterion over these vertex colorings. The resulting approach can be applied to any CMR-agnostic graph-based planner which evaluates a sequence of edges. We prove that the theoretical performance of the colored algorithm is always strictly better than (or equal to) that of the corresponding uncolored version. We then apply the approach to the Probabalistic RoadMap (PRM) algorithm; the resulting Colored Probabalistic RoadMap (cPRM) is illustrated on 2D and 7D CMR problems. I. I NTRODUCTION Many real-world tasks require a robot to quickly accomplish multiple subtasks without a prescribed order. Consider a......

Words: 6451 - Pages: 26