Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch.

Similar presentations


Presentation on theme: "Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch."— Presentation transcript:

1 Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch.

2 2 Application  Graphs useful mathematical objects for representing many physical systems.  Communication  systematical analyze of electrical circuits  Relationship of data  Distributed Computing on a multi-Processor Computers  Cloud computing  Other science fields

3 3 basic questions  Shortest path problem  Maximum flow problem  Minimum cost flow problem  Assignment problem  Transportation problem  Circulation problem  Convex cost flow problems  Generalized flow problems  Multicommodity flow problems  Minimum spanning tree problem

4 4 Notation  Let G = (N, A) be a directed network defined by a set N of n nodes and a set A of m directed arcs. Each arc (i, j)EA has an associated cost Cij that denotes the cost per unit flow on that arc. We assume that the flow cost varies linearly with the amount of flow. We also associate with each arc (i, j)EA a capacity Uij that denotes the maximum amount that can flow on the arc and a lower bound lij that denotes the minimum amount that must flow on the arc. We associate with each node iEN an integer number b(i) representing its supply/demand. If b(i) > 0, node i is a supply node; if b(i) < 0, node i is a demand node with a demand of - b(i); and if b(i) = 0, node i is a transshipment node.

5 5 Definition  Tails and Heads  Degrees  Adjacency List  Multiarcs and Loops  Subgraph  Walk  Directed Walk  Path: A path is a walk without any repetition of nodes.  Directed Path  Cycle  Acyclic Graph  Connectivity  Strong Connectivity  Cut

6 6 Various Types of Shortest Path Problems  1. Finding shortest paths from one node to all other nodes when arc lengths are nonnegative  2. Finding shortest paths from one node to all other nodes for networks with arbitrary arc lengths  3. Finding shortest paths from every node to every other node  4. Various generalizations of the shortest path problem

7 7 SHORTEST PATHS

8 8 iterative algorithmic approaches  label setting (Dijkstra' s algorithm O(n 2 ))  several versions of Dijkstra's algorithm that improve upon its worst-case complexity.  implementations uses a heap (or priority queue) data structure  Knapsack Problem  label correcting (O(n 2 C) C on the maximum absolute value of any arc length)  reduces the distance label of one node at each iteration by considering only local information, namely the length of the single arc and the current distance labels of its incident nodes.  flexibility  Label-setting algorithms designate one label as permanent (optimal) at each iteration. In contrast, label-correcting algorithms consider all labels as temporary until the final step, when they all become permanent.  modified versions

9 9 Dijkstra' s algorithm

10 10 Label-Correcting Algorithm

11 11 Label-Correcting Algorithm (continue)

12 12 Label-Correcting Algorithm (continue)

13 13 Label-Correcting Algorithm (continue)

14 14 Label-Correcting Algorithm (continue)

15 15 Label-Correcting Algorithm (continue)

16 16 Label-Correcting Algorithm (continue)

17 17 OPTIMALITY CONDITIONS of Label-Correcting Algorithm  they must satisfy the following necessary optimality conditions

18 18 ALL-PAIRS SHORTEST PATH PROBLEM  repeated shortest path algorithm  If S(n, m, C) denotes the time needed to solve a shortest path problem  All-pairs shortest path problem in O(n S(n, m, C))time.  all-pairs label-correcting algorithm  especially well suited for dense networks  Floyd-Warshall algorithm

19 19 MAXIMUM FLOWS  The maximum flow problem and the shortest path problem are complementary  Shortest path problems model arc costs but not arc capacities; maximum flow problems model capacities but not costs.  we wish to send as much flow as possible between two special nodes, a source node s and a sink node t, without exceeding the capacity of any arc.  The max-flow min-cut theorem establishes an important correspondence between flows and cuts in networks.  Indeed, as we will see, by solving a maximum flow problem, we also solve a complementary minimum cut problem: From among all cuts in the network that separate the source and sink nodes, find the cut with the minimum capacity.

20 20 MAXIMUM FLOWS (continue)  s-t cut: a cut is a partition of the node set N into two subsets Sand S = N - S;  Capacity of an s-t cut: sum of the capacities of the forward arcs in the cut  Minimum cut: an s-t cut whose capacity is minimum among all s-t cuts as a minimum cut.

21 21 MAXIMUM FLOWS (continue)

22 22 MAXIMUM FLOWS (continue)

23 23 Finding Minimum Cuts Using Shortest Paths

24 24 MINIMUM COST FLOWS APPLICATIONS  Distribution Problems  Min energy routing  Resource allocation  TCP protocol  MAC Layer Fair Rate Control

25 25 MINIMUM COST FLOWS  shortest path problem contains no arc capacities

26 26 MINIMUM COST FLOWS

27 27 potential of node

28 28 potential of node  the node potentials do not change the shortest path between any pair of nodes k and I, since the potentials increase the length of every path by a constant amount  (l) -  (k).

29 29 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM  It maintains a solution x that satisfies the nonnegativity and capacity constraints, but violates the mass balance constraints of the nodes.

30 30 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM(continue)  A pseudofllow is a function x: A -> R+ satisfying only the capacity and nonnegativity constraints; it need not satisfy the mass balance constraints. For any pseudoflow x, we define the imbalance of node i as  If e(i) > 0 for some node i, we refer to e(i) as the excess of node i; if e(i) <0, we call - e(i) the node's deficit. We refer to a node i with e(i) = 0 as balanced.

31 31 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM(continue)  Let E and D denote the sets of excess and deficit nodes in the network.  if the network contains an excess node, it must also contain a deficit node.  classical in the sense that researchers developed them in the 1950s and 1960s

32 32 RELAXATION ALGORITHM  a more recent vintage minimum cost flow algorithm

33 33 RELAXATION ALGORITHM(continue)  each flow variable Xij appears twice: once with a coefficient of -  (i) and the second time with a coefficient of  (j).

34 34 RELAXATION ALGORITHM(continue)

35 “ ” ؟


Download ppt "Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch."

Similar presentations


Ads by Google