Free Essay

Graphs and Trees

In:

Submitted By richardlibeau
Words 1054
Pages 5
Phase 3 Discussion Board Richard Libeau MATH215-1301B-01 March 4, 2013

Task Type: Discussion Board Deliverable 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

Destiny
Destiny

James
James

Noah
Noah

Paul
Paul

3) Explain exactly why YOUR data can be represented by a graph, but not a tree. Clearly explain. (15 points)

My data can only be represented by a graph and not a tree because it has disjointed sets. A tree cannot have disjointed sets. This data can only be displayed in a graph. It is not possible to display it in a tree because it does not have one simple path and some nodes are not reachable or connected to each other.

Part II (35 points – distributed as follows)
The set of all possible sequences of moves in a chess game can be represented by a tree (decision tree). If you were to write a chess-playing computer program that can determine the best move at each step, would you use a depth-first or a breadth-first search for the best move at each step in the game? Why? 1) What is a graph? (5 points)
Graphs are generalizations of trees. They have nodes and edges like trees but they are basically more general than trees. A graph can have any number of edges and can be undirected or directed. In directed graphs you can only go node to node. Undirected graphs have no direction. You must follow the arrows in a directed graph but in a undirected graph you can go either way along an edge.

2) What is a Tree and how is a tree different from a graph – give at least 2 reasons? (5 points) A tree is a undirected graph. It is connected with no cycles and is connected by any two vertices with one simple path. There are also directed trees which is a directed graph if the direction of the edges were not acknowledged. Trees have direction and do not contain cycles.Trees cannot have disjointed nodes like graphs either. 3) What is a Depth First Search of a tree? (5 points)

Depth First Search explores a path all the way to the edges before backtracking and exploring another path. It will process the vertices first deep and then widen. Afterwards it processes a vertex it recursively processes all of its descendants. The object of a Depth First Search is to search deeper into a graph wherever possible.

4) What is a Breadth First Search of a tree and how is it different from a Depth First Search? (5 points)
Breadth First Search is a search that explores the nodes nearest to the root before exploring nodes further away. It goes level by level through searching node by node. It is the shortest path from the root and no path can skip a level. Difference in Depth First and Breadth First searching are Breadth begins at the root and searches all neighboring nodes and Depth explores as far as possible before backtracking.

5) What is a Decision Tree? (5 points)
Decision Tree is a schematic tree shaped diagram used to determine a course of action or to show a statistical probability. Every branch of a Decision Tree stands for a decision or occurrence. The structure of the tree shows how one choice leads to the next. The Decision Tree can be used to find an answer to a complex problem. The structure of the tree can be displayed in an easy format to show relationships between events or decisions. The branches the furthest away indicate the possible end results.

6) Choose either Depth First Search or Breadth First Search and explain why you would prefer to use that method to write a chess-playing game that determines the best next move using a decision tree. (10 points)

I think I would choose Breadth First Search because it explores nodes closest to the root and goes from there one node at a time. Therefore, It does a thorough job of exploring every possible scenario that could happen along the way during the game. I feel it would be more effective than a Depth First approach which takes one path and then backtracks. With the Breadth approach backtracking is not needed as it goes through every possible node hence it does not miss anything along the way.

Responses to Other Students: Due by Sunday (10 points: 5 points for each response)
Respond to at least 2 of your fellow classmates with a reply of at least 1 paragraph about their primary task response regarding items you found to be compelling and enlightening. To help you with your discussion, please consider the following questions: * What did you learn from your classmate's posting? * What additional questions do you have after reading the posting? * What clarification do you need regarding the posting?

Spelling, grammar, professionalism: (5 points)

Similar Documents

Free Essay

Discret Math

...Assigment Capter 3 and 4 Graph And Tree Graph Bipartite Graph Graph coloring Adjancency matrices incidence matrices A short-path algorithm (Using dijksta ‘s algorithm to find a shortest path from) Trees trees as model Spanning Trees Minimum Spanning Trees (Produced by kruskal’s Algorithm.) C6 Bipartite Graph K6 . D . E . F A . B . C . Graph coloring K6 V1 blue e2 V2 red A D e8 e1 e3 e4 V6 Red, F e9 B V3 blue e7 e5 V5C ,blue e6 V4 , E,red Adjancency matrices K6 A B C D E F A 0 0 0 1 1 1 B 0 0 0 1 1 1 C 0 0 0 1 1 1 D 1 1 1 0 0 0 E 1 1 1 0 0 0 F 1 1 1 0 0 0 Incidence matrices e1 e2 e3 e4 e5 e6 e7 e8 e9 v1 1 1 0 0 0 0 0 1 0 v2 0 1 1 1 0 0 0 0 0 v3 0 0 0 1 1 0 0 0 1 v4 1 0 0 0 1 1 0 0 0 v5 0 0 1 0 0 1 1 0 0 v6 0 0 0 0 0 0 1 1 1 ...

Words: 301 - Pages: 2

Free Essay

Mth/221 Discrete Math for Information Technology Week 4

...text-pg:609 Exercise 12.5, problems 3 , text-pg:621 Chapter 11 Exercise 11.1 Problem 8: Figure 11.10 shows an undirected graph representing a section of a department store. The vertices indicate where cashiers are located; the edges denote unblocked aisles between cashiers. The department store wants to set up a security system where (plainclothes) guards are placed at certain cashier locations so that each cashier either has a guard at his or her location or is only one aisle away from a cashier who has a guard. What is the smallest number of guards needed? Figure 11.10 Problem 11: Let G be a graph that satisfies the condition in Exercise 10. (a) Must G be loop-free? (b) Could G be a multigraph? (c) If G has n vertices, can we determine how many edges it has? Exercise 11.2 Problem 1: Let G be the undirected graph in Fig. 11.27(a). a) How many connected subgraphs ofGhave four vertices and include a cycle? b) Describe the subgraph G1 (of G) in part (b) of the figure first, as an induced subgraph and second, in terms of deleting a vertex of G. c) Describe the subgraphG2 (ofG) in part (c) of the figure first, as an induced subgraph and second, in terms of the deletion of vertices of G. d) Draw the subgraph of G induced by the set of vertices U _ {b, c, d, f, i, j}. e) For the graph G, let the edge e _...

Words: 1159 - Pages: 5

Free Essay

Tree and Graphs

...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

Free Essay

Optimal Packet Routing Scheme with Multiple Sources and Multiple Destinations

...places. How these packets are routed so as to minimize the cost is a big problem. Most of the times these stores have multiple distribution centers or outlets from where the demand can be met. Thus the problem takes the shape of multiple source, multiple, multiple destinations. Given ‘n’ Source points (Distribution centers), and ‘m’ destination/consumer points. Location of the distribution and destination points described in their (x,y) co-ordinates. The measure of cost is the distance metric (length of the route). Output The output of the problem would be, which distribution center would serve which destination points and how the packet would be routed to minimize cost. Note: If the routes are represented as a graph then the graph would be a disconnected graph, depending on what destination nodes are served by which distribution center node. What is known? The general case of this problem, without any restrictions, can be modeled as Steiner Tree problem. It is a well known problem and its computation has been shown to be NPHard, by Garey, Graham and Johnson (1976). Approach In this analysis, I am considering the following 3 problems. 1. Multiple source Minimum Spanning Tree (M ST) 2. Multiple source Steiner Tree 3. Multiple source Traveling Salesman Problem (TSP) Multiple source TSP problem refers to the case where we have only one vehicle per distribution center, and it has to cover all the customers or destination points. The other two problems refer to the case...

Words: 2950 - Pages: 12

Free Essay

Discriptive Statisticss

...vertices in a connected undirected graph G, the distance from a to b is defined to be the length of a shortest path from a to b (when a =b the distance is defined to be 0). For the graph in Fig. 11.9, find the distances from d to (each of) the other vertices in G. Sec 11.1 /8 Figure 11.10 shows an undirected graph representing a section of a department store. The vertices indicate where cashiers are located; the edges denote unblocked aisles between cashiers. The department store wants to set up a security system where (plainclothes) guards are placed at certain cashier locations so that each cashier either has a guard at his or her location or is only one aisle away from a cashier who has a guard. What is the smallest number of guards needed? a b c Sec 11.1 /11 10. Give an example of a connected graph G where removing any edge of G results in a disconnected graph. 11. Let G be a graph that satisfies the condition in Exercise 10. (a) Must G be loop-free? (b) Could G be a multigraph? (c) If G has n vertices, can we determine how many edges it has? Sec 11.1 /15 15. For the undirected graph in Fig. 11.12, find and solve a recurrence relation for the number of closed v-v walks of length n ≥ 1, if we allow such a walk, in this case, to contain or consist of one or more loops. Sec 11.1 /16 16. Unit-Interval Graphs. For n ≥ 1, we start with n closed intervals of unit length and draw the corresponding unit-interval graph on n vertices, as shown in Fig...

Words: 1858 - Pages: 8

Premium Essay

Dumyat Research Paper

...At site 1 the infiltration rate was 10 minutes, it then dropped to 56 seconds at site 4 before rising slightly at site 6 and 7 and dropping back down at site 8 to 25 seconds. The reason infiltration rate decreases as the altitude increases is due to the saturation of the soil. Ground shaded by trees has more water in it, because very little sunlight can reach it, meaning almost no evaporation happens, thus increasing the water content in the soil. Ground out in the open is exposed to sunlight almost all day, as a result of this more evaporation happens, reducing the water content significantly. The reduction in water content means it is easier for the soil to gain water, reducing the infiltration...

Words: 1509 - Pages: 7

Free Essay

Mth 390 Paper

...DMontae Jones MTH 390 – Combinatorics Dr. Robert Molina 8 December 2011 The Reconstruction Conjecture – A Brief Introduction to Graph Reconstruction, Graph Properties, and Kelly’s Lemma Abstract The Graph Reconstruction Conjecture formally proposes that all finite, simple, undirected graphs with at least three vertices, or more, can be determined by the collection set of their vertex-deleted subgraphs. The content of this paper will focus its attention toward finite, simple, undirected graphs and provide a brief introduction of the conjecture and properties of graphs that have been uncovered through the conjecture. Furthermore, this paper will review an approach to the conjecture due to Kelly (1957), and other theorems and corollaries that branched from Kelly’s original lemma. Introduction Paul J. Kelly, in 1957, wrote his doctoral dissertation under the supervision of Polish-American Mathematician Stanislaw M. Ulam. Kelly’s dissertation proved the Reconstruction Conjecture held true for trees. Ulam officially published a statement of the conjecture, which was known to him since 1929, in 1960. It is said that Ulam published the conjecture as a result of collecting various mathematical problems proposed by some of his graduate students. As a result of this, his credit for the proposal of the unsolved problem was questioned. This led to some confusion as to whose name would be associated with the conjecture. None the less, the conjecture has been...

Words: 2058 - Pages: 9

Free Essay

Graduate Student

...17 18 19 22 26 29 33 34 35 38 41 44 IV 13 14 15 16 G RAPH A LGORITHMS Graph Search Shortest Paths Minimum Spanning Trees Union-Find Fourth Homework Assignment T OPOLOGICAL A LGORITHMS 17 18 19 Geometric Graphs Surfaces Homology Fifth Homework Assignment G EOMETRIC A LGORITHMS 20 21 22 Plane-Sweep Delaunay Triangulations Alpha Shapes Sixth Homework Assignment NP-C OMPLETENESS 23 24 25 Easy and Hard Problems NP-Complete Problems Approximation Algorithms Seventh Homework Assignment 45 46 50 53 56 60 61 62 65 68 72 73 74 77 81 84 85 86 89 92 95 V II 6 7 8 9 Binary Search Trees Red-Black Trees Amortized Analysis Splay Trees Second Homework Assignment P RIORITIZING VI III 10 11 12 Heaps and Heapsort Fibonacci Heaps Solving Recurrence Relations Third Homework Assignment VII 2 1 Introduction Meetings. We meet twice a week, on Tuesdays and Thursdays, from 1:15 to 2:30pm, in room D106 LSRC. Communication. The course material will be delivered in the two weekly lectures. A written record of the lectures will be available on the web, usually a day after the lecture. The web also contains other information, such as homework assignments, solutions, useful links, etc. The main supporting text is TARJAN . Data Structures and Network Algorithms. SIAM, 1983. Overview. The main topics to be covered in this course are I Design Techniques; II Searching; III Prioritizing; IV Graph Algorithms; V Topological Algorithms; VI Geometric Algorithms; VII NP-completeness...

Words: 49158 - Pages: 197

Premium Essay

Unit 3 Ip

...Task Background: Graphs and trees are useful in visualizing data and the relations within and between data sets. Conversely, it is also important to be able to represent graphs as databases or arrays, so that programs for processing the data can be written. Part I: Adjacency Matrix and Shortest Path Construct a graph based on the adjacency matrix that appears below. Label all nodes with indices consistent with the placement of numbers within the matrix. ⌈0 | 6 | 0 | 5 | 0⌉ | | 6 | 0 | 1 | 0 | 3 | | | 0 | 1 | 0 | 4 | 8 | | | 5 | 0 | 4 | 0 | 0 | | ⌊0 | 3 | 8 | 0 | 0⌋ | | | | | | * Describe the graph and why it is consistent with the matrix. The Graph above is an undirected graph. As the lines are not directed towards a particular node, the lines or edges go both ways. It is consistent with the matrix because the matrix is defining the edges. * How many simple paths are there from vertex 1 to vertex 5? Explain. There are 3 paths. 1-2-5, 1-2-3-5, 1-4-3-5. * Which is the shortest of those paths? That would be the 1-2 path. As the sum equals 9 and is the shortest path. 1-2-3-5=15 and 1-4-3-5=17 Part II: Trees * Construct and describe a tree that indicates the following: * A college president has 2 employees who answer directly to him or her, namely a vice president and provost. * The vice president and provost each have an administrative assistant. * Three deans answer to the provost, and the heads of finance and alumni relations...

Words: 396 - Pages: 2

Free Essay

Mm250 Unit 7

...Unit 7: Trees - Assignment Part I. Basic Computations 1. Using the following tree, name two vertices that are considered the following. Explain in your own words how you know: (a) parent-child (2 points). Answer: 202 - 401 Explanation: the parent of a vertex is the vertex connected to it on the path to the root, 202 is the parent and 401 is the child (b) sibling nodes (2 points): Answer: 301, 302, 303 Explanation: If two vertices are children of the same parent, then these two vertices are called siblings, 301, 302, 303 have the same parent that is 201 (c) leaf nodes (2 points) Answer: 301, 302, 303, 401 Explanation: the leaves are all terminal vertices 2. Determine if each of the following graphs is considered a tree. Explain why or why not, using what you learned in this unit. a. (2 points) Answer: not a tree Explanation: A tree is a connected graph with no cycles, and there is cycles in this graph b. (2 points) Answer: yes Explanation: A tree is a connected graph with no cycles, and there is no cycles in this graph c. (1 point) Answer: no Explanation: A tree is a connected graph with no cycles, and there a cycle in this graph 3. Determine and sketch two different spanning trees for this graph: a. (1 point) b. (1 point) 4. Consider this graph: a. Determine the total weight for this graph. Show your work. (1 point) Answer: 122 Explanation: 5 + 10 +5 +10 +17 +15 + 5 +4+4+8+5+6+13+7+8 ...

Words: 717 - Pages: 3

Free Essay

Week 4 Problems

...Individual Assignment 11.1 (513-518) 3. For the graph in Fig. 11.7, how many paths are there from b to f ? There are 6 paths from b to f: (b, a, c, d, e, f), (b, c, d, e, f), (b, e, f), (b, a, c, d, e, g, f), (b, c, d, e, g, f), and (b, e, g, f) 11. Let G be a graph that satisfies the condition in Exercise 10. a) Must G be loop-free? b) Could G be a multigraph? c) If G has n vertices, can we determine how many edges it has? a) Yes, G must be loop-free because an edge is a bridge only if that edge is not contained in any cycles. A loop is a cycle. b) Yes, G can be a multi-graph. For example, the multi-graph in Figure 11.6 (pg. 518) becomes disconnected if we remove edge (c, e). This would leave two components of (a, b, c) and (d, e). c) Yes, G would have n – 1 edges for n vertices; the same vertex closes a graph and there is always a vertex at the start and end, which means there is one more vertex than an edge. 11.2 (520-528) 4. If G = (V, E) is an undirected graph, how many spanning subgraphs of G are also induced subgraphs? The undirected graph G = (V, E) has 2|E| spanning subgraphs, one for each subset of the edge set, and 2|V| induced subgraphs, one for each subset of the vertex set. 11.3 (530-537) 5. Let G1 = (V1, E1) and G2 = (V2, E2) be the loop-free undirected connected graphs in Fig. 11.42. a) Determine |V1|, |E1|, |V2|, and |E2|. Counting the vertices and edges in both graphs: |V1| = |V2| = 8 |E1| = |E2| = 14 11.4 (540-553) ...

Words: 772 - Pages: 4

Free Essay

Discrete Mathematics

...Discrete Mathematics Lecture Notes, Yale University, Spring 1999 L. Lov´sz and K. Vesztergombi a Parts of these lecture notes are based on ´ ´ L. Lovasz – J. Pelikan – K. Vesztergombi: Kombinatorika (Tank¨nyvkiad´, Budapest, 1972); o o Chapter 14 is based on a section in ´ L. Lovasz – M.D. Plummer: Matching theory (Elsevier, Amsterdam, 1979) 1 2 Contents 1 Introduction 2 Let 2.1 2.2 2.3 2.4 2.5 us count! A party . . . . . . . . Sets and the like . . . The number of subsets Sequences . . . . . . . Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7 7 9 12 16 17 21 21 23 24 27 27 28 29 30 32 33 35 35 38 45 45 46 47 51 51 52 53 55 55 56 58 59 63 64 69 3 Induction 3.1 The sum of odd numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Subset counting revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Counting regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Counting subsets 4.1 The number of ordered subsets . . . . 4.2 The number of subsets of a given size 4.3 The Binomial Theorem . . . . . . . . 4.4 Distributing presents . . . . . . . . . . 4.5 Anagrams . . . . . . . . . . . . . . . . 4.6 Distributing money . . . . . . . . . . ...

Words: 59577 - Pages: 239

Premium Essay

Isle Royale

...Isle Royale Introduction The Wolves and Moose of Isle Royale If you were to travel on Route 61 to the farthest reaches of Minnesota and stand on the shore of Lake Superior looking east, on a clear day you would see Isle Royale. This remote, forested island sits isolated and uninhabited 15 miles off of the northern shore of Lake Superior, just south of the border between Canada and the USA. If you had been standing in a similar spot by the lake in the early 1900s, you may have witnessed a small group of hardy, pioneering moose swimming from the mainland across open water, eventually landing on the island. These fortunate moose arrived to find a veritable paradise, devoid of predators and full of grass, shrubs, and trees to eat. Over the next 30 years, the moose population exploded, reaching several thousand individuals at its peak. The moose paradise didn’t last for long, however. Lake Superior rarely freezes. In the 1940s, however, conditions were cold and calm enough for an ice bridge to form between the mainland and Isle Royale. A small pack of wolves found the bridge and made the long trek across it to the island. Once on Isle Royale, the hungry wolves found their own paradise — a huge population of moose. The moose had eaten most of the available plant food, and many of them were severely undernourished. These slow-moving, starving moose were easy prey for wolves. The Isle Royale Natural Experiment The study of moose and wolves on Isle Royale began in 1958 and...

Words: 1444 - Pages: 6

Premium Essay

Decision Trees

...Decision trees http://www.alchemyformanagers.co.uk/topics/4qpj5es2SiaJVVXn.html Decision trees A decision tree is a visual tool for analysing decisions. In using it, you generate a tree-like graph of decisions and their consequences. In the simplest form of this technique Squares represent decisions Triangles represent end points. Jewish proverb When the graph is completed, you can then add probabilities for each of the individual branches and from the overall probabilities of the end points. If there are two courses of action, you should take the third. Using the technique As a simple example, let’s suppose that I decide that I want to travel from my home to a hotel in town A. So let’s draw the options in a decision tree: We can now add some percentages to reflect either our preferences or an estimate of some factor that we would like to consider (for example cost, estimated likelihood and so on). In this case, I will use personal preferences: I am assuming here that the train station is close to my home. For ‘walk’ I have added 0 per cent because it is a long distance to town A. The bus takes a long time, but it is quite cheap, so I have given it ten per cent. Notice that I have also added end points to ‘walk’ and ‘drive’ as they both get me to my destination. ‘Train’ and ‘bus’ however do not get me to my final destination, so I now extend my decision tree by adding more decision points, options and estimates: We can now see what the final end point percentages...

Words: 720 - Pages: 3

Premium Essay

Biology Influence of One Environment Factor Onto the Morphology of the Oak Tree (Queveus Species).

...get a bigger chances for sunlight to hit on them. On the other hand, the tree that was growing under the sun should have smaller leaves due to the fact that they did not need to force themselves to grow lager for getting sunlight. Variables Independent variables: independent variables are the variables that we change. Here in my investigation the independent variable is the amount of sunlight these trees got. One of the trees should have been growing under shade or at least have been growing under much less amount of sunlight than the other one (because we can not make sure that the tree grew in complete shade). Another tree should have been growing under a large amount of sunlight. Dependent variables: in this task, i investigate how long leaves’ central veins are according the amount of sunlight that trees got. Therefore, the dependent variable is the length of leaves’ central veins. Control variables: To make sure the investigation goes on well, we need to control several variables which means these variables should be the same for both trees. Age of trees is one of the variables,...

Words: 1123 - Pages: 5