Graphs
Graph: A graph consists of a nonempty set of points or vertices, and a set of edges that link together the vertices. A simple real world example of a graph would be your house and the corner store. Where the house and the store are the vertices and the road between them is the edge connecting the two vertices.
Or a graph is a network consisting of vertices (or nodes) and edges (V,E) Simple Graph
A graph can take on many forms: directed or undirected.
Directed Graph: A directed graph is one in which the direction of any given edge is defined. Or A graph with directed edges = directed graph (digraph)
Directed edges = arcs
Directed Graph
Undirected Graph: An undirected graph is one in which the direction of any given edge is not defined. Conversely, in an undirected graph you can move in both directions between vertices. Or a graph with undirected edges is called undirected graph. Undirected graph Mixed Graph: A graph is one in which contains both directed and undirected edges.
Mixed Graph
Null Graph:  A null graph is one that contains only isolated vertices (example no edges). Null Graph
Connected graph: All vertices are directly or indirectly connected with each other (otherwise we have a graph, consisting of at least two sub graphs).
Connected Graph
Complete graph: Each vertex is directly connected with every other vertex. Or a simple graph in which every pair of vertices is adjacent.
Complete Graph
...V. Adamchik
1
GraphTheory
Victor Adamchik Fall of 2005
Plan
1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs
Introduction
A.Aho and J.Ulman acknowledge that “Fundamentally, computer science is a science of abstraction.” Computer scientists must create abstractions of realworld problems that can be represented and manipulated in a computer. Sometimes the process of abstraction is simple. For example, we use a logic to design a computer circuits. Another example  scheduling final exams. For successful scheduling we have to take into account associations between courses, students and rooms. Such set of connections between items is modeled by graphs. Let me reiterate, in our model the set of items (courses, students and rooms) won't be much helpful. We also have to have a set of connections between pairs of items, because we need to study the relationships between connections. The basic idea of graphs were introduced in 18th century by the great Swiss mathematician Leonhard Euler. He used graphs to solve the famous Königsberg bridge problem. Here is a picture (taken from the internet)
V. Adamchik
21127: Concepts of Mathematics
German city of Königsberg (now it is Russian Kaliningrad) was situated on the river Pregel. It had a park situated on the banks of the river and two islands. Mainland and islands were joined by seven bridges. A problem...
...
Graphs
1 Introduction
We have studied one nonlinear data structure so far i.e Trees. A graph is another nonlinear data structure that is widely used to solve many reallife computing problems. For example, we need to use a graph to find out whether two places on a roadmap are connected and what is the shortest distance between them. Graphs are used in simulating electrical circuits to find out current flows and voltage drops at various points in the circuit. Graphs are widely used in telephone and computer networks.
Graphs have great historical significance too. In 1736, the famous mathematician Euler used the concept of a graph to solve the “Koenigsberg problem”. In the small town of Koenisberg in Prussia, the river Pregal flows around the island of Kneiphof and then divides into two. The four land areas ( A, B, C, D) bordering the river are connected by seven bridges ( a,b,c,d,e,f,g). The problem is to find out whether it is possible to start walking from some area, cross each bridge exactly once and return to the starting land area. Euler used graphs to prove that this would not be possible. A walk which achieves this is called an “Eulerian Walk”.
{{{ Diagram }}}
In this chapter, we will study this data structure, its implementation and its applications. Before that, we will study some definitions and terminology.
Definitions and Terminology...
...Baker Machine Company
Layout
Problem 3.4. (Summary)
Baker Machine is considering two alternative layouts. We will compare the WeightedDistance Scores using rectilinear distance* of the two block plans to determine which alternative layout is better.
Alternative Layout 1 Alternative Layout 2
3  6  4 
5  1  2 
3  1  4 
5  6  2 
* rectilinear distance – the distance between two points with a series 90degree turns, as along city blocks
Data
Baker Machine Company is a job shop that specialized in precision parts for firms in the aerospace industry. The current block plan is as follows:
3  4  2 
1  5  6 
The weighteddistance score for the current layout is 115.
 Closeness Matrix       
       
  Trips Between Departments  
 Department  1  2  3  4  5  6 
1  Burr and grind    7  16   10  5 
2  Numerically controlled (NC) equipment      4   
3  Shipping and receiving       9  9 
4  Lathes and drills        3 
5  Tool crib        3 
6  Inspection        
Solution
To determine which alternative layout is better we calculate the weighted distance, wd, scores of the two block plans.
Layouts can be assessed using the Layout solver of OM Explorer.
Solution (continue)
Alternative Layout 1
Solver  Layout 
       

   
...
...Introduction in GraphTheory
(BASIC CONCEPTS)
BASIC CONCEPTS
We used decision trees in Unit DT and used them to study decision making. However,
we did not look at their structure as trees. In fact, we didn’t even define a tree precisely.
What is a tree? It is a particular type of graph, which brings us to the subject of this unit.
What is a Graph?
There are various types of graphs, each with its own definition. Unfortunately, some
people apply the term “graph” rather loosely, so you can’t be sure what type of graph
they’re talking about unless you ask them. After you have finished this chapter, we expect you to use the terminology carefully, not loosely. To motivate the various definitions, we’ll begin with some examples.
Example 1 (A computer network) Computers are often linked with one another so
that they can interchange information. Given a collection of computers, we would like to describe this linkage in fairly clean terms so that we can answer questions such as “How can we send a message from computer A to computer B using the fewest possible intermediate computers?”
We could do this by making a list that consists of pairs of computers that are connected. Note that these pairs are unordered since, if computer C can communicate with computer D, then the reverse is also true. (There are sometimes exceptions to this, but they are rare and we will...
...LAB # 1
Graph Matching
Principles of Physics I Laboratory
Breanna Wilhite
Introduction
In this lab motion will be represented by graphs that plots distance and velocity vs. time. A motion detector will be used to measure the time it takes for a high frequency sound pulse to travel from the detector to an object and back. By using this method sound can determine the distance to the object, or its position. This device will determine in what direction the woman in the video was walking and how fast she was walking. This information will be plotted on a graph and show the motion as the woman moves, whether she speed up or slowed down. Logger Pro will use the change in position to calculate the object’s velocity and acceleration. All of this information is in graph form. A qualitative analysis of the graphs of motion will help you develop an understanding of the concepts of kinematics.
Theory
The motion of an object can be measured using a motion detector. The detector helps in knowing where an object is according to an indication point. How fast and in what direction an object is moving, and how an object is accelerating is necessary in understanding the kinematics graphs.
The Motion detector uses pulses of ultrasound that bounces off of an object to determine the position of the person/object. As the person moves, the change in its position is measured many times...
...Graphs  Introduction
Terminology
Graph ADT
Data Structures
Reading: 12.112.2
COSC 2011, Summer 2004
Definition
• A graph is a pair (V, E), where
– V is a set of nodes, called vertices
– E is a collection of pairs of vertices, called edges
• Both are objects (i.e. store data)
G
E
B
F
A
Vertex
city
computer
web page
airport
C
D
COSC 2011, Summer 2004
H
Edge
road
cable
hyperlink
flight
Example Applications
•
•
•
•
•
Electronic circuits
– Printed circuit board
– Integrated circuit
Transportation networks
– Highway network
– Flight network
Computer networks
– Local area network
– Internet
– Web
Databases
– Entityrelationship diagram
Questions
– Are two points connected?
– What is the shortest path between
them?
cslab1a
cslab1b
math.brown.edu
cs.brown.edu
brown.edu
qwest.net
att.net
cox.net
John
Paul
COSC 2011, Summer 2004
David
Types of edges
• Undirected edge {u,v}
– Does not indicate direction
– We can “travel” in either direction
A
B
• Directed edge (u,v)
– Has a direction
A
– We can only “travel” in one direction along the edge
B
• Selfloop
– Edge that originates and ends at the same vertex
• Parallel edges
A
– Two undirected edges with same end vertices
– Two directed edges with same origin and destination
COSC 2011, Summer 2004
A
B
Types of graphs
• Undirected graph
– All edges are undirected
• Directed graph
– All edges are directed
• Mixed...
...tructureResearch on Graphs in Data Structure
Source: http://www.algolist.net/Algorithms/Graph/Undirected/Depthfirst_search
Introduction to graphsGraphs are widelyused structure in computer science and different computer applications. We don't say data structurehere and see the difference. Graphs mean to store and analyze metadata, the connections, which present in data. For instance, consider cities in your country. Road network, which connects them, can be represented as a graph and then analyzed. We can examine, if one city can be reached from another one or find the shortest route between two cities.
First of all, we introduce some definitions on graphs. Next, we are going to show, how graphs are represented inside of a computer. Then you can turn to basic graph algorithms.
There are two important sets of objects, which specify graph and its structure. First set is V, which is called vertexset. In the example with road network cities are vertices. Each vertex can be drawn as a circle with vertex's number inside.
 
vertices  
Next important set is E, which is called edgeset. E is a subset of V x V. Simply speaking, each edge connects two vertices, including a case, when a vertex is connected to itself (such an edge is called a loop). All graphs are divided into two big groups: directed and...
...MATH1081 Discrete Mathematics
T. Britz/D. Chan/D. Trenerry
§5 GraphTheory
Loosely speaking, a graph is a set of dots and dotconnecting lines. The dots are called vertices and the lines are called edges. Formally, a (ﬁnite) graph G consists of A ﬁnite set V whose elements are called the vertices of G; A ﬁnite set E whose elements are called the edges of G; A function that assigns to each edge e ∈ E an unordered pair of vertices called the endpoints of e. This function is called the edgeendpoint function. Note that these graphs are not related to graphs of functions. Graphs can be used as mathematical models for networks such roads, airline routes, electrical systems, social networks, biological systems and so on. Graphtheory is the study of graphs as mathematical objects.
1
Exercise. Consider the following graph G with vertices and edges V = {v1 , v2 , v3 , v4 , v5 } and E = {e1 , e2 , e3 , e4 , e5 , e6 , e7 } :
v3 e2 e5 v1 e 1 v2 e3 v4 e 6 v5 e7 e4
Edge e1 e2 e3 e4 e5 e6 e7
Endpoints {v1 , v2 } {v2 , v3 } {v2 , v4 } {v3 , v4 } {v3 , v4 } {v4 , v5 } {v5 }
2
Example. Below are 3 diﬀerent pictorial representations of the same graph. e1 v1 e2 v2 e1 e3 v3 e4 v1 e4 e2 e3 v3 v2 e4 v1 e1 e3 v3 e2 v2
The edgeendpoint function of this graph is as follows: Edge e1 e2 e3...