0% found this document useful (0 votes)
17 views35 pages

08 Networks + Short Route + Spanning 20241209

The document discusses network optimization models, defining networks as collections of connected nodes and arcs, and highlighting their applications in various fields such as transportation, computer science, and biology. It covers algorithms used for solving network problems, including the Shortest-Route Algorithm and Minimum Spanning Tree Algorithm, with examples of their implementation. Additionally, it explains the significance of graph theory in optimizing network designs and provides insights into specific algorithms like Dijkstra's and Prim's for finding optimal paths and connections.

Uploaded by

RohitNikam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views35 pages

08 Networks + Short Route + Spanning 20241209

The document discusses network optimization models, defining networks as collections of connected nodes and arcs, and highlighting their applications in various fields such as transportation, computer science, and biology. It covers algorithms used for solving network problems, including the Shortest-Route Algorithm and Minimum Spanning Tree Algorithm, with examples of their implementation. Additionally, it explains the significance of graph theory in optimizing network designs and provides insights into specific algorithms like Dijkstra's and Prim's for finding optimal paths and connections.

Uploaded by

RohitNikam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Network Optimization Models

Networks A network is simply a collection of


connected objects. We refer to the
objects as nodes or vertices, and
2 13 usually draw them as points (circles).
5 We refer to the connections between
6 5 the nodes as arcs or edges, and usually
7 draw them as lines between points.
1 8 6
3 Nodes represented as 1,2,3, etc.
Arcs represented as 1-2, 1-3, etc.
7 1 6
16
Characteristics…
4 1) Direction (with or without)
2) Weight
• Cost (cost of travel)
Useful in representing various systems, such • Time
as distribution systems, production • Distance
systems, and transportation systems.

Network models are an important approach for problem solving because:


• They can be used to model a wide range of problems.
• They are relatively simple to work with.
• They provide a visual portrayal of a problem. 2
Some of the notable applications of graph or network theory:
1. Computer Science and Networking:
- Network Analysis: Graphs are used to model and analyze computer networks, social networks, and
communication networks.
- Routing Algorithms: Graphs help in designing and analyzing routing algorithms in computer networks.

2. Transportation and Logistics:


- Route Planning: Graphs are employed to find the shortest or most efficient routes in transport networks.

3. Social Networks:
- Social Network Analysis: Graphs model relationships and interactions in social networks, helping to
understand patterns and structures in social systems.

4. Biology and Medicine:


- Genomics: Graphs represent relationships between genes and their functions.
- Epidemiology: Graphs model the spread of diseases in populations.

5. Supply Chain Management:


- Optimization: Graphs are used to model and solve optimization problems in various domains, such as
supply chain management and resource allocation.

6. Cryptography:
- Key Management: Graphs are used in the study of cryptographic algorithms and protocols, particularly
in the management of cryptographic keys.

7. Neural Network and AI:


Neural networks are made up of interconnected nodes, or neurons, that process information and pass it to
the next layer. Each neuron receives input from the previous layer, applies a mathematical function, and
passes the result to the next layer.
The original invention
in the Facebook
network is the "News
Feed" algorithm,
which was launched in
2006. This innovative
feature revolutionized
the way users
interacted with each
other on the platform.

Facebook uses a proprietary method


called EdgeRank

In the Facebook network model, there are three types of nodes which are users, posts
and groups. The links are friendship (red), reactions on posts (green), creation of posts
(blue), messages (pink) and group membership (purple). Four sub graphs can be extracted
from Facebook network model to analyze the user behavior of Facebook. They are;
Friendship graph, Graph for reacting on posts, Groups graph, Messaging graph.
Network Example
Transportation
network • This kind of network
is called bipartite
graph (or bigraph),
a graph whose vertices
can be divided into
two disjoint sets
• There is no
connection among
sources or among
destinations

In mathematics, networks are often referred to as graphs, and the area of


mathematics concerning the study of graphs is called graph theory.
Here, we'll use the terms network and graph interchangeably.
5
Frequently Used Algorithms
Shortest-Route Algorithm
Used for determining the shortest time,
distance, or cost from an origin to a
destination through a network.

Minimum Spanning Tree Algorithm


Used in determining the minimum
distance (cost, time) needed to connect
all locations in a single system.

Maximal Flow Algorithm


Used for determining the greatest
amount of flow that can be transmitted
through a system in which various
branches, or connections, have specified
flow capacity limitations. 6
7-6
Shortest-Route Problem
Dijkstra's Algorithm
Shortest Path First (SPF) algorithm

The shortest-route problem is concerned with finding the


shortest path in a network from one node (or set of nodes)
to another node (or set of nodes).

7
7-7
Applications

8
The Shortest Route Problem
Definition and Example Problem Data (1 of 2)
Problem: Determine the shortest routes (shortest travel time) from the origin
to all destinations.

5
4 6

2
3

1
The Shortest Route Problem
Definition and Example Problem Data (2 of 2)

Network Representation
The Shortest Route Problem
Solution Approach (1 of 8)
Select origin. Put the origin in permanent set. Determine all nodes directly connected
to the permanent set. Determine the initial shortest route from the origin (node
1) to the closest node. Mark the node with the shortest time from origin. Mark
the branch as well.

Network with Node 1 in the Permanent Set


The Shortest Route Problem
Solution Approach (2 of 8)
Put the newly marked node in the permanent set (node 3). Determine all nodes directly
connected to the permanent set. Determine the shortest route from the origin (node 1) to
the closest node. Mark the node with the shortest time from origin. Mark the branch as
well.

Network with Nodes 1 and 3 in the Permanent Set


The Shortest Route Problem
Solution Approach (3 of 8)
Repeat the previous step.

Network with Nodes 1, 2, and 3 in the Permanent Set


The Shortest Route Problem
Solution Approach (4 of 8)

Network with Nodes 1, 2, 3, and 4 in the Permanent Set


The Shortest Route Problem
Solution Approach (5 of 8)

Network with Nodes 1, 2, 3, 4, & 6 in the Permanent Set


The Shortest Route Problem
Solution Approach (6 of 8)

Network with Nodes 1, 2, 3, 4, 5 & 6 in the Permanent Set


The Shortest Route Problem
Solution Approach (7 of 8)

Network with Optimal Routes


The Shortest Route Problem
Solution Approach (8 of 8)

From Node 1: Route Total Hours


Node 2 1-2 16
Node 3 1-3 9
Node 4 1-3-4 24
Node 5 1-3-4-5 38
Node 6 1-3-6 31
Node 7 1-3-4-7 43

Shortest Travel Time from Origin to Each Destination


The Shortest Route Problem
Solution Method Summary
1. Select the node with the shortest direct route from the
origin.
2. Establish a permanent set with the origin node and the
node that was selected in step 1.
3. Determine all nodes directly connected to the permanent
set of nodes.
4. Select the node with the shortest route from the group of
nodes directly connected to the permanent set of nodes.
5. Repeat steps 3 & 4 until all nodes have joined the
permanent set.
Exercise

Find the Shortest-Route


using Dijkstra's Algorithm
Minimal Spanning Tree Problem
Prim’s Minimum Spanning Tree (MST) Algorithm
or
Greedy Algorithm

Seeks to determine the minimum sum of arc weights necessary


to connect all nodes in a network.

22
What is a Spanning Tree?
Consider the
following Graph G 4 vertices Spanning Tree
4 edges
n vertices
Connected
2 Edges have some weight n-1 edges
5
6 Form a cycle Does not form cycle
1
A graph can have… 2
3 5
n vertices
7 6
>=n edges
1 1
4 Connected & form a cycle
3
7
2
Consider a subgraph G’ of G 5 Sum of arc
4
lengths = 18
2 1
5
2
5
7
1
3 4 1
3
Tree Tree 7
<=n vertices <=n vertices 1
4 Sum of arc
<= n-1 edges <= n-1 edges
lengths = 13
Not connected Connected
23
Does not form cycle Does not form cycle
Minimal Spanning Tree Problem
• A tree is a subnetwork of a network that does not form a
cycle.

• A spanning tree is a tree that connects all nodes of a


network. Hence, a spanning tree does not have cycles and it
cannot be disconnected..

• The minimal spanning tree problem seeks to determine the


minimum sum of arc lengths necessary to connect all nodes
in a network.

• The criterion to be minimized in the minimal spanning tree


problem is not limited to distance but also can have criteria
such as time and cost. 24
Application
Network design.
– telephone, electrical, hydraulic, TV cable, computer, road
The standard application is to a problem like phone network design.
You have a business with several offices; you want to lease phone lines
to connect them up with each other; and the phone company charges
different amounts of money to connect different pairs of cities. You
want a set of lines that connects all your offices with a minimum total
cost. It should be a spanning tree.

25
Network for Oil Pipeline Problem
Romania
Bellarus Italy

Turkey
Russia

Poland
Germany

26
Arbitrarily begin at any node and connect it to the closest node (shortest distance).
The two nodes are referred to as connected nodes, and the remaining nodes are
referred to as unconnected nodes.

27
Identify the unconnected node that is closest to one of the connected nodes (break ties
arbitrarily). Add this new node to the set of connected nodes. Repeat this step until all nodes
have been connected.

28
Repeat previous step until all nodes have been connected.

29
The length of pipe that will be needed for this system can be found by summing
the arc lengths:

18+13+22+18+24+32 = 127 30
Minimal Spanning Tree Algorithm
• Step 1: Arbitrarily begin at any node and connect it to the
closest node. The two nodes are referred to as connected
nodes, and the remaining nodes are referred to as
unconnected nodes.

• Step 2: Identify the unconnected node that is closest to one


of the connected nodes (break ties arbitrarily). Add this new
node to the set of connected nodes. Repeat this step until all
nodes have been connected.

• Note: A problem with n nodes to be connected will require


n - 1 iterations of the above steps.
31
Note on Prim’s Vs Kruskal’
algorithms for MST

1. Algorithm Paradigm:
• Prim's Algorithm: Prim's algorithm is greedy but works by growing
the minimum spanning tree one vertex at a time. It starts with an
arbitrary vertex and adds the edge with the smallest weight connecting
the growing tree to an external vertex at each step.
• Kruskal's Algorithm: Kruskal's algorithm is also a greedy approach,
sorting all the edges by weight and adding them to the growing
minimum spanning tree as long as they do not form a cycle.

2. Performance:
• Prim's Algorithm: Often more efficient on dense graphs (graphs
with many edges).
• Kruskal's Algorithm: Generally more efficient on sparse graphs
(graphs with fewer edges).
Exercise
Find the Minimal Spanning
Tree for the following
network
One solution:
Arcs:
0-1, 0-7, 2-8, 7-6, 2-5, 6-5, 2-3, 3-4
MST length=
4+8+4+2+1+7+2+9
= 37

Another solution:
Arcs
0-1, 1-2, 2-8, 7-6, 2-5, 6-5, 2-3, 3-4
=37
Backup

You might also like