...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 that...
Words: 2276 - Pages: 10
...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 points) Bill Bill John John Chris Chris Kim Kim ...
Words: 1054 - Pages: 5
...Phase 3 DB Graphs and Trees Elie De Jesus MATH203-1302A-01 – Discrete Mathematics Professor Andrew Halverson April 24, 2013 Part I Graphs and trees are a little more complicated to understand than what I thought. Based on the information that I found they give you a way to visualize your sets and use the data that you have to find the shortest path. So because of this it shows that Trees cannot contain a cycle, so a set would be Y=COS(X); which can be a general graph but not a tree. The one example that I understood was the one about “the mileage on a bike”. Now I don’t quite understand the example but it shows that the graph would have a decrease in mileage where as it would increase in time. That is not how a tree is explained because there is no sequence to be shown for the data. This is the examples graph: So based on that example I understand that the tree encoding defines a root node or one path between two nodes that represent the output of a solution. A tree is still a graph but without multiple paths. So to be a tree it has to start from any node and be able to reach another, there can be no cycles, and you must have more nodes that edges. Part II To first answer this question one must know the meaning of a Breadth-first or a Depth-first. A Breadth-first search is a strategy for searching in a graph when search is limited to essentially two operations: (a) visit and inspect a node of a graph; (b) gain access to visit the nodes that neighbor the currently...
Words: 479 - Pages: 2
...Koinsber bridge, in 1735. This problem lead to the concept of Eulerian Graph. Euler studied the problem of Koinsberg bridge and constructed a structure to solve the problem called Eulerian graph. In 1840, A.F Mobius gave the idea of complete graph and bipartite graph and Kuratowski proved that they are planar by means of recreational problems. The concept of tree, (a connected graph without cycles [1]) was implemented by Gustav Kirchhoff in 1845, and he employed graph theoretical ideas in the calculation of currents in electrical networks or circuits. In 1852, Thomas Gutherie found the famous four color problem. Then in 1856, Thomas. P. Kirkman and William R.Hamilton studied cycles on polyhydra and invented the concept called Hamiltonian graph by studying trips that visited certain sites exactly once. In 1913, H.Dudeney mentioned a puzzle problem. Eventhough the four color problem was invented it was solved only after a century by Kenneth Appel and Wolfgang Haken. This time is considered as the birth of Graph Theory. Graph theoretical concepts are widely used to study and model various applications, in different areas. They include, study of molecules, construction of bonds in chemistry and the study of atoms. Similarly, graph theory is used in sociology for example to measure actor prestige or to explore diffusion mechanisms. Graph theory is used in biology and conservation efforts where a vertex represents regions where certain species exist and the edges represent...
Words: 476 - Pages: 2
...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 simplified 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, identified by URIs, and edges are properties identified 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 strengths...
Words: 5524 - Pages: 23
...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 we embed...
Words: 2895 - Pages: 12
...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 subdividing prescribed...
Words: 4554 - Pages: 19
...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 memory...
Words: 877 - Pages: 4
...Chapter-1 INTRODUCTION TO GRAPH THEORY 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...
Words: 6091 - Pages: 25
...Section 9.1: Exercises 6, 12, 20, 28, 32, 50 6.) Explain why each graph is that of a function. * Each graph is that of a function because at each point in a graph we get a value for y corresponding to a value for x. This is just the pictorial reflection of what we get in case of a function. Solve each system by substitution 12.) Solution * 2x + y = 5 * y = 5- 2x Substituting in first equation 4x – 5y = -11 4x – 5(5-2x) = -11 4x – 25 + 10x = -11 14 x = -11 + 25 14x = 14 x = 1 Therefore, we get : So, y = 5-2x = 5 -2*1 = 3 x = 1, y =3 Solve each system by elimination. 20.) Solution 4x +y = -23 ………………………eq 1 x - 2y = -17…………………………….eq 2 Performing 2*eq 1 + eq 2 we get : 8x + 2y = -46 x – 2y = -17 This Gives us : 8x + x = -46 -17 9x = -63 x = -7 So, x – 2y = -17 -7 -2y = -17 2y = 17-7 =10 y = 5 So, X = -7, Y =5 28.) Solution 3x/2 + y/2 = -2 * 3x + y = -4 ……………………………….eq 1 x/2 + y/2 = 0 * x + y = 0 ………………………………………..eq2 Performing eq 1 – eq 2 3x + y = -4 (-)x + (-)y = (-)0 3x – x = -4 * 2x = -4 * X = -2 So, X + y = 0 * -2 + y = 0 * Y = 2 So, x = - 2, y = 2 Solve each system. State whether it is inconsistent or has infinitely many solutions. If the system has infinitely many solutions, write the solution set and y arbitrary. 32) Solution 3x + 2y = 5 ……………….eq 1 6x + 4y = 8 ……………….eq2 * 3x + 2y = 4 ……………………...
Words: 1309 - Pages: 6
...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 personal...
Words: 6451 - Pages: 26
...previous page into the spreadsheet. t'JJ The first issue you have to deal with is the heading "Concentration (mol/L)" is too large to fit in • j cell AI. This must be fixed. You can either increase the column width or wrap text. l'j The second issue is that by default, data in the spreadsheet is not "centered" in the cells as shown in the figure. This must also be fixed. Follow the instructions of your instructor. o Notes: • 3. initial here: • 0 Your spreadsheet should look exactly like that in the example, including capitalization, etc. If it does, 2 " :rQ.e 0~ j Name • Using Spreadsheets and Graphing A Skill-Building Exercise in Excel Goal: To Successfully Create an XY Scatter Chart (Graph) using Microsoft Excel 2013 Introduction This lab exercise will walk you through 20 J 3 and using the available I. Background: In most spreadsheet the process of creating an XY Scatter...
Words: 1308 - Pages: 6
...One collaboration that I’ve had is trying to plan the recruitment of an organization that I’m a part of. The executive board consists of 7 people and we frequently face problems, due to being a small, still-growing-in-campus-presence group. These problems occur often as a result of being remote during a lot of the recruitment action items. However, I believe that perhaps the interaction we have isn’t the source of the problems, but rather commitment to the organization (which is a separate issue). As the recruitment chair, I try to divvy out tasks for each member to complete for recruitment that pertains to their position on the board. However, I often find that my requests are untouched. I believe that if I asked my group to do some of these tasks when we were “together” or perhaps during our face-to-face meetings, they would actually get done, and get done quicker. Kiesler and Cummings mentioned that the mere presence of others increases involvement, urgency of proximate task, and contribution to the group. The only way technology could help this is if it could facilitate a same-time meeting, but not necessarily a face-to-face meeting, as I believe that can take too much time and planning. Something that I have in mind is Google docs. Most people use it only to write projects together, but I think something similar could be used to have remote meetings. It’s not always necessary to see someone’s face, but it’s still nice to know they’re there. Perhaps a Google-doc type of...
Words: 335 - Pages: 2
...With the change in our social and technology the needs have increased fiercely in scope and composure, and we have grown to meet that challenge by reaching our consumers in person and as group. Our company is a small sized network consulting company that specializes in LAN configuration, Inter-LAN routing designing, topology designs, and VLAN configurations. Our quality teams of experts are all certified qualified in all the services we can provide for the merger of the two networks. Many of our consultants are highly rated in the industry. The company built its reputation primarily as a technology consultant and systems integrator. Throughout the past decade our organization has expanded its offerings and capitalized on evolving management trends and technologies to benefit its clients. The company pioneered systems integration and business integration; led the deployment of enterprise resource planning, customer relationship management and electronic services; and has established itself as a leader in today's global marketplace. Our Organization has worked projects that required specialized skills, quick turnarounds, and high-level domain knowledge. Projects can be rather complicated to design, deploy, secure and manage; therefore, a project requires a strong level of expertise to execute it proficiently. It is a big advantage if the supplier also has the capabilities to deliver IT project management services. A dedicated consulting team like ours can focus on delivering trouble-free...
Words: 459 - Pages: 2
...3 I J Consider the graph above (not drawn to scale). Given the heuristic values for the distance to city F: h(A) = 5 h(B) = 3 h(C) = 6 h(D) = 3 h(E) = 2 h(F) = 0 h(G) = 7 h(H) = 8 h(I) = 29 h(J) = 9 h(K) = 8 Draw the search trees resulting from i) BFS can be performed on the graph ii) DFS iii) Uniform Cost iv) A* search on the graph with start node A. Q2) Consider the problem of finding a path in the grid shown below from the position s to the position g. A piece can move on the grid horizontally and vertically, one square at a time. No step may be made into a forbidden shaded area. 1. On the grid, number the nodes in the order in which they are removed from the frontier in a depth-first search from s to g, given that the order of the operators you will test is: up, left, right, then down. Assume there is a cycle check. 2. Number the nodes in order in which they are taken off the frontier for an A* search for the same graph. Manhattan distance should be used as the heuristic function. The Manhattan distance between two points is the distance in the x-direction plus the distance in the y-direction. It corresponds to the distance traveled along city streets arranged in a grid. For example, the Manhattan distance between g and s is 4. What is the path that is found? 3. Based on this experience, discuss which of the two algorithms is best suited for this problem. 4. Suppose that the graph extended infinitely in all directions...
Words: 758 - Pages: 4