# Graph Theory

Length: 1544 words (4.4 double-spaced pages)

Rating: Excellent

#### Essay Preview

Tree definitions

If you already know what a binary tree is, but not a general tree, then pay close attention, because binary trees are not just the special case of general trees with degree two. I use the definition of a tree from the textbook, but bear in mind that other definitions are possible.
Definition. A tree consists of a (possible empty) set of nodes. If it is not empty, it consists of a distinguished node r called the root and zero or more non-empty subtrees T1, T2, …, Tk such that there is a directed edge from r to each of the roots of T1, T2, …, Tk.Definition. A forest is a collection of trees. You can always create a tree form a forest by creating a new root node and making it the parent of the roots of all of the trees in the forest. Conversely, if you lop off the root of a tree, what is left is a forest.
I assume that you are familiar with the terminology of binary trees, e.g., parents, children, siblings, ancestors, descendants, grandparents, leaf nodes, internal nodes, external nodes, and so on, so I will not repeat their definitions here. Because the definitions of height and depth may vary from one book to another, I do include their definitions here, using the ones from the textbook.
Definition. A path from node n1 to node nk is a sequence of nodes n1, n2, …, nk such that ni is the parent of ni+1 for 1 ≤ i < k. The length of a path is the number of edges in the path, not the number of nodes. Because the edges in a tree are directed, all paths are “downward”, i.e., towards leaves and away from the root. The height of a node is the length of the longest path from the node to any of its descendants. Naturally the longest path must be to a leaf node. The depth of a node is the length of the path from the root to the node. The root has depth 0. All leaf nodes have height 0.
The height of a tree is the height of its root. The degree of a node is the number of children of the node. The degree of a tree is the maximum degree of the degrees of its nodes. The tree on the next page has height 3 and degree 5.

MLA Citation:
"Graph Theory." 123HelpMe.com. 18 Aug 2018
<https://www.123helpme.com/view.asp?id=158816>.

## Need Writing Help?

Get feedback on grammar, clarity, concision and logic instantly.

## Graph Theory Concepts and Strategies with Ticket to Ride Essay

- Ticket to Ride is a board game created by Alan R. Moon that has been growing in popularity since its first release in 2004 by Days of Wonder. The game components include a map with cities and defined train routes, sets of 45 colored, plastic train car tokens for up to five players, destination tickets, and colored train cards. The premise of the game involves collecting enough of the colored train cards to claim or build train routes to connect various major cities in the United States and southern Canada to earn points as well as completing routes designated on the destination tickets....   [tags: Alan R Moon, board game, United States, Canada]

Research Papers
2979 words (8.5 pages)

- Tree definitions If you already know what a binary tree is, but not a general tree, then pay close attention, because binary trees are not just the special case of general trees with degree two. I use the definition of a tree from the textbook, but bear in mind that other definitions are possible. Definition. A tree consists of a (possible empty) set of nodes. If it is not empty, it consists of a distinguished node r called the root and zero or more non-empty subtrees T1, T2, …, Tk such that there is a directed edge from r to each of the roots of T1, T2, …, Tk.Definition....   [tags: Information Technology Computer Science]

Free Essays
1544 words (4.4 pages)

## Essay on Chaos Theory

- Chaos Theory      What exactly is chaos theory. From the understanding of many scientists such as Edward Lorenz, Ian Stewart, and Robert May the chaos theory relatively means the same thing. Each of these scientists contributed to the science of chaos theory.      First and Foremost chaos theory itself comes from the seemingly half-hazard way things seem to happen in its equations, but chaos theory is really about finding the similarities between these seemingly random events in an equation.      Edward Lorenz, a meteorologist, discovered this theory when he was working on a calculation for weather prediction on his computer....   [tags: Science Scientists Chaos Theory Essays]

Research Papers
1509 words (4.3 pages)

## Essay on Diffusion of Innovation Theory

- Why do some innovations get adopted while others fail. The diffusion theory offers up one explanation for this phenomenon. The theory can be applied to a multitude of different products or ideas. This theoretical approach is fascinating do to the breadth of different fields that it can be applied to and to the depth that it can go into the field to formulate a. It allows for people to formulate a better understanding of the spread of new innovations. Diffusion theory can give a comprehensive picture as to how ideas spread in this social media age....   [tags: Sociology, Everett M. Rogers]

Research Papers
2178 words (6.2 pages)

## Theory of Constraints Essay

-   Table of Contents I. Introduction 2 II. Then Why Do Most CI Programs Produce Such Disappointing Results? 2 The Improvement Conflict What’s wrong with the traditional approach. Resistance to Change: The Reasons for Unsatisfactory Results. III. TLS ­ Theory of Constraints Lean Six Sigma 8 The TLS Process: IV. Results of TLS: 11 Sanmaina-SCI DOE results: Tata Steel Results: V. The Path Forward – Implementing TLS 13 VI. TLS Summary: A Synergetic Solution 14 VII. TLS Benefits: 14 VIII. Bibliography 15 Introduction Many organizations struggle with their continuous improvement (CI) efforts; real bottom line results, whether in cost savings or increased revenues, just never materialize...   [tags: business, improvement programs]

Research Papers
2449 words (7 pages)

## Essay on Grand Theft Theory: Vice City

- Grand Theft Theory: Vice City Both Cote and Khan said it's up to parents to decide whether their teens should be allowed to play Vice City. "Parents should be informed of what this game is about," said Khan. "I would definitely warn kids of the violence." Cote said when his mother first discovered that he and his brother played Grand Theft Auto III, she was "mortified."[1] Patriarchal formations of familial angst and romance included, Vice City has been received again and again in the several orifices of the public body....   [tags: Essays Papers]

Free Essays
3830 words (10.9 pages)

## Essay on Financial Theory Discussion and Analysis

- ... Generally investors cannot borrow and lend at risk free rate as risk premium is charged by banks depending upon their credit worthiness. Thereby this assumption is one of the fundamental disadvantages followed by perfect capital theory which does not hold true. The advantages are as follows: It considers only the systematic risk thereby quantifying market risk element separately and in very scientific and simplistic way. The relationship established between return and systematic risk has become a standard model for modern researchers to extend and add more variable to the theory....   [tags: computing risk, market, capital]

Research Papers
1857 words (5.3 pages)

## Explaining the Chaos Theory Essay

- Chaos Theory Chaos theory is a modern development in the math and science field to provide a frame work for understanding the irregular fluctuations in nature. Chaos is typically defined as mathematical property of the dynamic system. The study of their dynamics is an essential part of the growing science of complexity. There are some examples that explained what the chaos theory is like “the butterfly effect” and the “pendulum swing” that show an erratic behavior of the chaos theory. To understand the chaos theory’s principles of that underlie pattern of all real systems; they research from the ecosystems to the social systems to the universe as a whole....   [tags: unpredictable, butterfly effect, system]

Research Papers
1025 words (2.9 pages)

- Situational Leadership Theory Since there is no special or one precise type of leader, numerous leadership styles and theories have surfaced. This is because a different situations require different type of leadership styles. In many occasions, leadership theories help to predict the best leadership style to employ in a particular situation. This essay seeks explain why situational leadership theory is useful and relevant in developing an effective leadership culture. It is this writers hope that it can be used as a how to guide to enable managers to be more successful....   [tags: leadership styles, theories, culture]

Research Papers
1103 words (3.2 pages)

## Choas Theory In Biology Essay

- Chaos In Biological Systems In today’s world of high-tech methods to study just about anything that exists, we are still imperfect. Scientists continue to look for ways to understand, explain, and even predict the actions and reactions of the universe. In the last two centuries, scientists have been looking in every possible place to understand the universe; from science, to math, even religion. They have turned to mathematicians and their strange theories of determinism and predictability. This search to understand the universe has spawned several new areas of science; there are now scientists devoted solely to the research of mere theories, such as chaos theorists....   [tags: essays research papers]

Research Papers
2032 words (5.8 pages)

It is not hard to see that a tree with N nodes must have N-1 edges because every node except the root has exactly one incoming edge. How many edges are in a forest with N nodes and K trees?

Applications of General Trees
A general tree is useful for representing hierarchies in which the number of children varies.
• In a file system, a node represents each file, and if the file is a directory, then it is an internal node whose children are the files contained in the directory. Some file systems do not restrict the number of files per folder, implying that the number of children per node is varying and unbounded.
• In computational linguistics, as sentences are parsed, the parser creates a representation of the sentence as a tree whose nodes represent grammatical elements such as predicates, subjects, prepositional phrases, and so on. Some elements such as subject elements are always internal nodes because they are made up of simpler elements such as nouns and articles. Others are always leaf nodes, such as nouns. The number of children of the internal nodes is unbounded and varying.
• In genealogical software, the tree of descendents of a given person is a general tree because the number of children of a given person is not fixed.
Spanning Trees
Given a connected graph G, a spanning graph of G that is a tree is called a spanning tree. A spanning tree for an undirected graph G = (V,E) is a graph G’ = (V,E’) such that G’ is a tree. In other words, G’ has the same set of vertices, but edges have been removed from E so that the resulting graph is a tree. This amounts to saying that G’ is acyclic. If G is directed, it means that cycles have been removed. Since a tree with |V| vertices has |V|-1 edges, to generate a spanning tree of a connected graph G having |V| vertices and |E| edges we must delete all but (|V|-1) edges from the G. We cannot do that randomly because it has to be a tree which is acyclic and connected. We must delete |E|-(|V|-1) = |E|-|V|+1 edges, none of which is a bridge. A graph G can have several spanning tree.
Removal of any single edge from a spanning tree causes the graph to be unconnected.
For any spanning tree T of graph G, if an edge e that is not in T is added, a cycle is created. And also see one thing if we add any edge from ~G, we will also create a cycle.
Minimum Spanning Trees
A spanning tree is minimum if there is no other spanning tree with smaller cost. If the graph is unweighted, then the cost is just the number of edges. If it has weighted edges, then the cost is the sum of the edge weights of the edges in the spanning tree.
An example of an application of spanning trees is for finding the least wiring to wire the electrical connections in a building.
A weighted graph and one of its minimum spanning trees:

Figure 1

Figure 2
A relatively simple algorithm for finding a minimum spanning tree is Kruskal’s Algorithm. It is a greedy algorithm in that it always tries to find the best solution at each step. Not all greedy approaches work. Here it does. It uses the Union-Find algorithm from Chapter 8.
Kruskal’s Algorithm
The strategy of this algorithm is continually to select the edges in order of smallest weight and accept an edge if it does not cause a cycle. The idea is to start out with a forest in which each vertex is a tree by itself. Then look for the edge with least weight and connect its two vertices into a tree with two vertices. Find the next smallest weight edge and connect the two vertices together if they are not already in a tree together. If they are in the same tree, then adding this edge would form a cycle, so the edge should not be added. If we continue this process until there is just one tree, then this tree will be minimum cost because the edges were added in order of ascending cost.
The algorithm treats the trees like sets of vertices. To form a new tree the union operation is used. A disjoint set ADT is used to represent the vertices. A heap is used for picking the minimum edge at each step.

Kruskal’s Algorithm
void kruskal()
{
int edgesAccepted;
DisjointSet s(NUM_VERTICES );
PriorityQueue h( NUM_EDGES );
Vertex u,v;
SetType uset, vset;
Edge e;

h.buildHeap();

edgesAccepted = 0;
while ( edgesAccepted < NUM_VERTICES –1 ) {
h.deleteMin( e ); // assume e = (u,v)
uset = s.find(u);
vset = s.find(v);
if ( uset != vset ) {
edgesAccepted++;
s.union(uset, vset);
}}}

The algorithm takes roughly O(|E| log |V| ) time. Figure 3 shows action of Kruskal’s algorithm on graph G.
Edge Weight Action
(V1,V4) 1 Accepted
(V6,V7) 1 Accepted
(V1,V2) 2 Accepted
(V3,V4) 2 Accepted
(V2,V4) 3 Rejected
(V1,V3) 4 Rejected
(V4,V7) 4 Accepted
(V3,V6) 5 Rejected
(V5,V7) 6 Accepted
Figure 3

Figure 4

K-Deficient Vertices of spanning Trees
A vertex v in a spanning tree T of graph G is called k-deficient if its degree satisfies the equation deg G(v) – deg T(v) = k. The integer k is called the deficiency of vertex. If k = 0, v is a degree preserving vertex- that is deg G(v) = deg T(v). Observe that for any k-deficient vertex of a nontrivial tree T, we have k<= ^(G) -1, since deg T(v) > 0.

K-Deficient Vertices Theorem 3.3
Let G be a connected graph on n vertices and q edges. Then the sum of the deficiencies of the vertices of any spanning tree of G is 2(q-n+1).

Proof
Let T be a spanning tree of G. Since the deficiency of a vertex v e V(T) is deg G(v) – deg T(v), the sum of the deficiencies of the vertices of T may be obtained by adding the degrees of the vertices in G and then subtracting the sum of the degrees in T. We know that the sum of the degrees of the vertices in G is 2q. Since T has n-1 edges, the sum of the degrees of the vertices in T is 2(n-1). The difference is 2q-2(n-1) = 2(q-n+1).
Real life application of spanning trees
Suppose that a county needs to build a passenger railroad to serve its eight major towns. Joining all (8:2) pairs of town directly would be too expensive and wasteful; railroad tracks would clutter the county. Using spanning tree we are able to design the rail system in such a way that, using the system a person can travel from each of the eight towns to any of the others. It will be cost effective and efficient.