0% found this document useful (0 votes)
162 views

Network Model

A network model is a mathematical representation of interconnected nodes that can represent entities like people, devices, or concepts. The connections represent relationships between entities. In computer networks, a network model describes how devices connect and communicate. In social networks, a network model can analyze connections between individuals to identify patterns. Network models can be represented using graph theory and used to simulate complex system behavior.

Uploaded by

nyapete
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

Network Model

A network model is a mathematical representation of interconnected nodes that can represent entities like people, devices, or concepts. The connections represent relationships between entities. In computer networks, a network model describes how devices connect and communicate. In social networks, a network model can analyze connections between individuals to identify patterns. Network models can be represented using graph theory and used to simulate complex system behavior.

Uploaded by

nyapete
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Network Model

A network model is a mathematical representation of a complex system that can be viewed as a


set of interconnected nodes or components. These nodes can represent various entities such as
people, devices, machines, or even abstract concepts. The connections between the nodes can
represent relationships, interactions, or flows between these entities.

In the context of computer networks, a network model is a conceptual framework used to


describe how different devices and components are connected and communicate with each
other. This can include models such as the OSI (Open Systems Interconnection) model, which is a
layered approach to network design and communication.

In social networks, a network model can be used to analyze and visualize the connections
between individuals or groups of people. This can help identify patterns of behavior, influence, or
information flow within the network.

Network models can be represented using various mathematical and graphical techniques, such
as graph theory, which provides a way to describe and analyze the properties of networks. They
can be used to simulate and predict the behavior of complex systems, test different scenarios,
and optimize network performance.

Minimal Spanning Tree Algorithm


A minimal spanning tree algorithm is an algorithm used to find the minimum spanning tree
(MST) of a connected, weighted graph. A spanning tree is a subgraph of a graph that connects all
nodes while not forming any cycles. A minimum spanning tree is a spanning tree that has the
smallest possible sum of edge weights.

One commonly used minimal spanning tree algorithm is Kruskal's algorithm, which works as
follows:

1. Sort all the edges of the graph in ascending order of weight.


2. Start with an empty MST and add the edge with the smallest weight to it.
3. For each subsequent edge in order of weight, add it to the MST if it does not form a cycle with
the edges already in the MST.
4. Repeat step 3 until all nodes are in the MST or all edges have been examined.

Another commonly used minimal spanning tree algorithm is Prim's algorithm, which works as
follows:

1. Start with an arbitrary node and add it to the MST.


2. For each neighboring node of the nodes already in the MST, add the edge with the smallest
weight to the MST.
3. Repeat step 2 until all nodes are in the MST.
Both Kruskal's algorithm and Prim's algorithm are efficient and can find the minimum spanning
tree of a graph with a large number of nodes and edges.

Shortest Route Problem


The shortest route problem is a classic optimization problem in graph theory that involves finding
the shortest path between two nodes in a graph. It is also known as the shortest path problem.

The problem can be stated as follows: given a graph with nodes and weighted edges, find the
shortest path from a starting node to a target node.

One commonly used algorithm to solve this problem is Dijkstra's algorithm, which works as
follows:

1. Initialize a distance array with the starting node's distance set to 0 and all other nodes set to
infinity.
2. Create a priority queue of nodes ordered by their distance from the starting node, with the
starting node at the top.
3. Pop the node with the smallest distance from the queue and relax all its outgoing edges.
Relaxing an edge means updating the distance of its endpoint if it is shorter than the current
distance.
4. Add the endpoint of each relaxed edge to the queue if it is not already in the queue.
5. Repeat steps 3 and 4 until the target node is reached or the queue is empty.

Dijkstra's algorithm guarantees to find the shortest path in a graph with non-negative weights. If
negative weights are allowed, Bellman-Ford algorithm can be used to find the shortest path.

Example of the Short-Route application


An example of the shortest route problem in real-world applications is finding the shortest route
between two locations on a map or in a transportation network. For example, a ride-hailing app
needs to calculate the shortest route between the rider's pickup location and the destination,
taking into account the real-time traffic conditions and the road network.

Another example is in logistics and supply chain management, where finding the shortest route
between warehouses, distribution centers, and retail stores can help optimize the delivery routes,
reduce transportation costs, and improve delivery times.

In the field of telecommunications, the shortest route problem can be used to find the most
efficient path for data transmission between network nodes, such as routers and servers.

The shortest route problem also has applications in the field of robotics and autonomous
vehicles, where finding the shortest path between locations can help navigate robots and vehicles
in complex environments, avoid obstacles, and optimize energy consumption.

Linear Programming formulation of the Shortest Route problem


The shortest route problem can be formulated as a linear programming problem. Let G=(V,E) be
a directed graph with node set V and edge set E, where each edge (i,j) has a non-negative weight
w(i,j) representing the cost of traveling from node i to node j. Let s be the starting node and t be
the target node. We want to find the shortest path from s to t.

We can represent the problem using binary decision variables x(i,j) that indicate whether an edge
(i,j) is included in the shortest path or not. The objective is to minimize the total weight of the
selected edges:

minimize: ∑(i,j)∈Ex(i,j)w(i,j)

subject to:

1. The flow balance constraint: For each node i∈V, the total incoming flow minus the total outgoing
flow equals 0, except for the starting node s and the target node t:

∑(i,j)∈Ex(i,j) - ∑(j,i)∈Ex(j,i) = -1 if i=s 1 if i=t 0 otherwise

2. The edge selection constraint: The decision variable x(i,j) is a binary variable that takes the value
of 1 if and only if edge (i,j) is included in the shortest path:

x(i,j) ∈ {0,1} for all (i,j)∈E

3. The path constraint: The selected edges must form a path from the starting node s to the target
node t:

∑(i,j)∈Ex(i,j) = 1

The above linear programming formulation is known as the shortest path problem with flow
constraints. It can be solved using various optimization techniques, such as the simplex method
or the interior-point method.

Maximum flow model


The maximum flow model is a classic optimization problem in network flow theory that involves
finding the maximum amount of flow that can be sent from a source node to a sink node in a
network of interconnected nodes and edges. The problem can be stated as follows: given a
directed graph with nodes and weighted edges, find the maximum flow from a source node to a
sink node.

The maximum flow problem has various applications in real-world scenarios, such as
transportation network design, water supply networks, electrical power grids, and communication
networks.

The maximum flow problem can be modeled using a directed graph G = (V, E) with a source
node s and a sink node t. Each edge (i, j) in E has a non-negative capacity c(i, j) that represents
the maximum amount of flow that can be sent from node i to node j. The goal is to find the
maximum flow that can be sent from the source node s to the sink node t.
One commonly used algorithm to solve this problem is the Ford-Fulkerson algorithm, which
works by iteratively finding augmenting paths, which are paths from the source node to the sink
node that have available capacity for more flow. The algorithm increases the flow along the
augmenting path until no more such paths can be found.

A more efficient version of the Ford-Fulkerson algorithm is the Edmonds-Karp algorithm, which
uses a breadth-first search to find augmenting paths, resulting in a faster convergence to the
maximum flow.

The maximum flow problem can also be formulated as a linear programming problem known as
the maximum flow LP. The objective is to maximize the flow from the source node to the sink
node subject to the flow conservation constraint and the edge capacity constraint. The maximum
flow LP can be solved using linear programming techniques, such as the simplex method.

Enumeration of Cuts
In graph theory and network analysis, a cut is a set of edges that, when removed from a graph,
disconnects the graph into two or more components. The enumeration of cuts in a graph refers
to the process of systematically generating all possible sets of edges that can be removed to
disconnect the graph.

Enumerating all cuts in a graph can be useful for solving optimization problems, such as the
minimum cut problem or the maximum flow problem. One way to enumerate all cuts is to use
the inclusion-exclusion principle, which states that the number of sets that belong to at least one
of the sets A_1, A_2, ..., A_n is given by:

|A_1 ∪ A_2 ∪ ... ∪ A_n| = ∑|A_i| - ∑|A_i ∩ A_j| + ∑|A_i ∩ A_j ∩ A_k| - ... + (-1)^(n+1)|A_1 ∩ A_2 ∩ ...
∩ A_n|

The above formula can be applied to the set of all edges in the graph, with each subset of edges
representing a cut. Let G = (V, E) be a graph with n nodes and m edges, and let S be a subset of
edges in E. We can define the characteristic function χ_S(e) as follows:

χ_S(e) = 1 if e ∈ S χ_S(e) = 0 if e ∉ S

Using the above characteristic function, we can define the incidence matrix A of G as an n x m
matrix whose (i,j)-th entry is given by:

A(i,j) = χ_ej(i)

where χ_ej(i) is the characteristic function of edge j with respect to node i.

Then, the number of cuts in the graph can be obtained by applying the inclusion-exclusion
principle to the columns of the incidence matrix A. The resulting formula is:

Number of cuts = ∑(-1)^k * (m choose k)


where (m choose k) is the binomial coefficient that gives the number of ways to choose k edges
out of m. The above formula enumerates all possible cuts in the graph, including the empty cut
and the full cut. Therefore, the actual number of non-trivial cuts can be obtained by subtracting 2
from the above formula.

Maximum Flow Algorithm


The Maximum Flow Algorithm is a method used to find the maximum flow that can be sent
through a network from a source node to a sink node. The algorithm can be used to solve a
variety of problems, including transportation planning, water distribution, and communication
network design.

The most widely used algorithm for finding the maximum flow is the Ford-Fulkerson algorithm,
which works by iteratively finding augmenting paths from the source node to the sink node. An
augmenting path is a path from the source node to the sink node that has available capacity for
more flow.

Here are the steps for the Ford-Fulkerson algorithm:

1. Initialize the flow on each edge to 0.


2. While there exists an augmenting path from the source node to the sink node: a. Find an
augmenting path from the source node to the sink node using any path-finding algorithm, such
as breadth-first search. b. Determine the maximum amount of flow that can be sent along the
augmenting path. c. Update the flow on each edge in the augmenting path by adding the
maximum flow that can be sent.
3. Return the maximum flow.

The algorithm terminates when there are no more augmenting paths to be found. The time
complexity of the Ford-Fulkerson algorithm is O(Ef), where E is the number of edges in the graph
and f is the maximum flow. However, in the worst case, the algorithm can take an exponential
amount of time to terminate.

To improve the efficiency of the algorithm, several modifications have been proposed, such as
the Edmonds-Karp algorithm and the Dinic's algorithm. These algorithms use different
techniques to find augmenting paths and can be much faster than the Ford-Fulkerson algorithm.

Linear Programming formulation of Maximum flow mode


The Maximum Flow problem can be formulated as a Linear Programming (LP) problem. In this
formulation, we use decision variables to represent the amount of flow on each edge in the
network.

Let G = (V, E) be a directed graph with a source node s and a sink node t. For each edge (i, j) ∈ E,
we introduce a non-negative decision variable x_ij, which represents the amount of flow that can
be sent from node i to node j. The LP formulation of the Maximum Flow problem is as follows:

maximize ∑x_sj (over all edges (s,j) ∈ E) subject to:


1. Capacity constraints: For each edge (i, j) ∈ E, the amount of flow on that edge cannot exceed its
capacity c_ij.
x_ij ≤ c_ij (for all edges (i,j) ∈ E)
2. Conservation constraints: For each node i ∈ V except for the source and sink nodes, the incoming
flow must equal the outgoing flow. This is known as the conservation of flow principle.
∑x_ij = ∑x_ji (for all nodes i ∈ V, except for s and t)
3. Non-negativity constraints: The flow on each edge must be non-negative.
x_ij ≥ 0 (for all edges (i,j) ∈ E)

The objective function is to maximize the flow from the source node s to the sink node t. The
capacity constraints ensure that the flow on each edge does not exceed its capacity. The
conservation constraints ensure that the total flow into each node is equal to the total flow out of
that node. The non-negativity constraints ensure that the flow on each edge is non-negative.

The LP formulation of the Maximum Flow problem can be solved using standard LP solvers, such
as the simplex method or the interior-point method. Once the LP is solved, the maximum flow
can be obtained by summing the flow on all edges leaving the source node s. The LP formulation
is often used as a basis for developing algorithms for solving the Maximum Flow problem.

CPM and PERT


CPM (Critical Path Method) and PERT (Program Evaluation and Review Technique) are two project
management techniques used to plan, schedule, and control complex projects. They both use
network diagrams to represent the project activities and their dependencies, and help to identify
the critical path, which is the sequence of activities that determines the duration of the project.

CPM is a deterministic method that assumes a fixed duration for each activity, whereas PERT is a
probabilistic method that allows for uncertainty in the duration of each activity. PERT uses three
time estimates for each activity: optimistic, pessimistic, and most likely, and calculates the
expected duration of each activity using a weighted average of these estimates.

Here are the key features of each method:

CPM:

 Assumes fixed duration for each activity


 Uses a single estimate of activity duration
 Focuses on identifying the critical path and slack time for non-critical activities
 Used for projects with well-defined activities and clear dependencies
 Can be used to calculate early and late start and finish times for each activity
 Often used in engineering and construction projects

PERT:

 Allows for uncertainty in activity duration


 Uses three estimates of activity duration: optimistic, pessimistic, and most likely
 Calculates expected duration of each activity using a weighted average of these estimates
 Focuses on probability of completing the project within a given time frame
 Used for projects with uncertain activity durations or where there is a risk of delays
 Can be used to calculate the probability of meeting a specific deadline
 Often used in research and development projects, software development, and other complex
projects

Both CPM and PERT are useful tools for project planning and management, and can help to
identify potential delays and critical activities. They can also be used to optimize project
schedules and resource allocation, and to track progress and performance against the plan.

Network Representation
Networks can be represented using a variety of graphical and mathematical models, depending
on the application and the level of detail required. Here are some common network
representations:

1. Graphs: A graph is a mathematical representation of a network consisting of nodes and edges.


The nodes represent the elements of the network, such as people, machines, or locations, and the
edges represent the connections or relationships between them. Graphs can be directed or
undirected, weighted or unweighted, and can include loops or cycles.
2. Adjacency matrices: An adjacency matrix is a square matrix that represents the connections
between the nodes of a graph. The rows and columns of the matrix correspond to the nodes, and
the elements of the matrix indicate whether there is an edge between the corresponding nodes.
For a weighted graph, the elements of the matrix represent the weights of the edges.
3. Incidence matrices: An incidence matrix is a rectangular matrix that represents the connections
between the nodes and edges of a graph. The rows correspond to the nodes, and the columns
correspond to the edges. The elements of the matrix indicate whether the corresponding node is
the start or end point of the corresponding edge.
4. Network diagrams: A network diagram is a graphical representation of a network that shows the
nodes and edges and their connections. Network diagrams can include additional information
such as labels, colors, and annotations to represent attributes such as the type of node or edge,
the direction of the edge, or the weight of the edge.
5. Geographic maps: For spatial networks, such as transportation or communication networks,
geographic maps can be used to represent the location of nodes and the paths of edges.
Geographic maps can include additional information such as traffic flow, travel times, or
population density to help analyze and optimize the network.

These network representations can be used in combination with network analysis techniques
such as shortest path algorithms, minimum spanning tree algorithms, maximum flow algorithms,
and others to solve various problems related to network optimization, routing, and flow.

Critical Path Method Computation


The Critical Path Method (CPM) is a project management technique that helps to identify the
critical path of a project, which is the sequence of activities that determines the total duration of
the project. The CPM algorithm involves the following steps:
1. Define the activities: Identify all the activities required to complete the project and their
dependencies. Each activity should have a unique identifier and a duration estimate in time units
(e.g., days, weeks, months).
2. Construct the network diagram: Draw a graph of the project activities and their dependencies,
using nodes to represent the activities and edges to represent the dependencies between them.
The direction of the edges indicates the order of the activities.
3. Calculate the earliest start and finish times: Starting from the first activity, calculate the earliest
start and finish times for each activity in the network, based on the duration of the activity and
the earliest finish time of its predecessors. The earliest start time of an activity is the maximum of
the earliest finish times of its predecessors, and the earliest finish time is the sum of the earliest
start time and the duration of the activity.
4. Calculate the latest start and finish times: Starting from the last activity, calculate the latest start
and finish times for each activity in the network, based on the latest finish time of the activity and
the latest start time of its successors. The latest finish time of an activity is the minimum of the
latest start times of its successors, and the latest start time is the difference between the latest
finish time and the duration of the activity.
5. Calculate the slack time: For each activity, calculate the slack time, which is the amount of time
that the activity can be delayed without delaying the project completion time. The slack time of
an activity is the difference between its latest start time and earliest start time.
6. Identify the critical path: The critical path is the sequence of activities with zero slack time. It
represents the longest path through the network and determines the total duration of the
project.

By following these steps, the CPM algorithm provides a comprehensive view of the project
schedule and helps to identify the critical path and the activities that have the greatest impact on
the project completion time. The CPM algorithm can be implemented using software tools or
spreadsheet programs that provide automatic calculation of the network parameters and
visualization of the network diagram.

Linear programming Formulation of CPM


The Critical Path Method (CPM) can also be formulated as a linear programming problem. The
main idea is to define decision variables that represent the start time of each activity and then
minimize the overall project duration subject to the constraints that the start times of each
activity are consistent with the activity durations and the precedence constraints.

Let:

 x_i: the start time of activity i


 d_i: the duration of activity i
 p_{ij}: a binary variable that is equal to 1 if activity i precedes activity j, and 0 otherwise

Then, the linear programming formulation for CPM is:

Minimize: Z = max{x_i + d_i}

subject to:
 x_i + d_i <= x_j, for all (i,j) such that p_{ij} = 1
 x_i >= 0, for all i

The objective function represents the project duration, which is equal to the maximum of the
start time plus the duration of each activity. The first constraint ensures that the start time of
activity j is greater than or equal to the finish time of activity i for all activities that are connected
by an edge in the network. The second constraint ensures that the start time of each activity is
non-negative.

The decision variables x_i and d_i can be integer or continuous, depending on the precision
required for the analysis. Linear programming solvers can be used to solve the CPM problem and
identify the optimal start times for each activity and the critical path of the project.

You might also like