Chapter 10 - Network Flashcards
What is a directed network?
A network with only directed edges/arcs
Define a path between two nodes
A path is a sequence of distinct arcs connecting the two nodes.
What types of “paths” do we have?
Directed, undirected. If we have directed path, then we can only move in one direction. If undirected, the path works as a channel in both ways.
What is a cycle in networks?
A path that begins and ends in the same point/node
What is the requirement for two nodes to be connected?
There must exist at least one undirectional edge between them.
There is no requirement on direction, and there can be different edges (directed and undirected).
What is a connected network?
A connected network is one where all nodes are connected to each other.
What is a spanning tree?
A spanning tree is a connected network that contains no undirected cycles.
How many arcs will a minimum spanning tree?
Exactly n-1 arcs.
What is “arc capacity”?
The maximum amount of flow that a specific arc can hold
What is a supply node?
A supply node is a node where the flow out of the node exceeds the flow in to the node. It is also called source node.
What is a demand node?
A demand node is a node that have more flow in than out. Also called a sink.
What is a transshipment node?
A transshipment node is a node that satisfies the conservation of flow, meaning that flow in equals flow out.
Formuler korteste vei problemet matematisk
Vi bruker indekser i og j.
Xij = binær beslutningsvariabel som er 1 dersom path i-j er med i den optimale (korteste) løsningen.
cij = Kantvekt som representerer en form for kostnad.
N er mengden av alle noder.
B er mengden av alle kanter/buer.
Problemet kan da defineres slik:
min Z = ∑cijxij [(i,j) in B]
s.t.
∑xsj [j in N] = 1
∑xin [i in N] = 1
∑xij [i in N] - ∑xji [i in N]= 0 , for all J in N.
and
xij = {0,1} for all i and j.
Forklar stegene i PRIM
Trinn 0:
Start fra en vilkårlig node i grafen. Valget har ingenting å si, alle noder skal med i MST uansett.
LA denne noden definere mengden S.
La resterende noder definere mengden S’.
La også T = Ø være mengden med kanter i vårt foreløpige MST.
Trinn 1:
Finn den buen (j,k) i nettverket med LAVEST KOSTNAD der j er i mengden S og k er i mengden S’.
Vi bruker altså mengden S som angrepspunkt hver iterasjon. Husk kruskal, som ikke gjør dette.
Trinn 2:
Oppdater mengden T til å være T union (j,k).
Oppdater S = S union k.
T er mengden med kanter i MST.
S er arbeidsmengden vår.
Trinn 3:
Stopp hvis |T| = n-1. Ellers gå til trinn 1.
KOMMENTARER:
Legg merke til hvordan T, ved hver iterasjon, holder et MST som er en delmengde av MST vi ønsker å finne.
Vi vet at den endelige mengden med kanter skal være lik n-1. Dette kommer også frem fra trinn 3.
Describe the maximum flow problem
1) All flow through a directed and connected network originates at ONE node, called the source, and terminates at ONE node, called the sink.
2) All remaining nodes are called TRANSSHIPMENT nodes.
3) Flow through an arc is allowed only in the direction of the arrowhead, where the maximum allowed flow through that arc is given by its capacity. At the source, all flow goes out from the node, while at the sink, all flow goes in to the node.
4) THe objective is to maximize the total amount of flow from SOURCE to DESTINATION/SINK.
We can measure this max flow in two ways: Either as the flow leaving the source, or the flow entering the sink.
What do we do if our network have multiple sources, and or multiple sinks, and we want to find max flow?
Max flow algorithm doesnt allow this, so we have to adjust the network.
We add a dummy source and possibly a dummy sink.
The important thing is that the edge going from dummy source to each of the original sources MUST have the same capacity as the original source support out from them. So, if source 1 sends out flow to 3 nodes, each along arcs of capacity 10, the capacity on the new arc between the new dummy source and original source #1 must be equal to 3 times 10 = 30.
The same principle applies for dummy sink.
Remember, we can do this because the source is not “generating” any flow. In a max flow problem, we dont look at what the node is generating. We are ponly looking at how much potential flow this network can carry.
What do we call the algorithm we use for maximum flow?
Augmenting path algorithm.
This algorithm is built on concepts:
1) Residual network
2) Residual capacities
What does the residual network show?
The residual network shows the remaining available capacities.
The original/actual network contains only directed arcs. However, the residual network consists of undirected edges.
How do we illustrate residual capacity?
like the image.
The number on the side indicate the remaining available capacity from its node, to the other node.
Recall that we can also cancel flows.
What is the relationship between assigning a flow, and the residual network?
When we assign a flow to an arc, that flow-amount is subtracted from the residual capacity in the same direction, AND ADDED to the residual capacity in the opposite direction.
So, when we assign a flow, we remove this from the residual capacity, indicating less availability. At the same time, we offer the possibility of cancelling this amount of flow.
What is an augmenting path?
An augmenting path is a directed path from source to sink in the RESIDUAL NETWORK such that every arc on this path has STRICTLY POSITIVE residual capacity.
The minimum of these residual capacities (along the path) is called the “residual capacity of the augmenting path” because it represent the flow that can feasibly be added to the entire path. Therefore, each augmenting path provides an opportunity to further augment the flow through the original network.