Download presentation
Presentation is loading. Please wait.
1
Communication Networks A Second Course Jean Walrand Department of EECS University of California at Berkeley
2
Routing: Complexity & Algorithms Overview Complexity Routing with Multiple Constraints Routing and Wavelength Assignments QoS routing in Ad Hoc Networks
3
Overview Easy Problem: Shortest Path (Dijkstra, Bellman-Ford) Difficult Problems: Finding path with bound on cost and delay Assigning wavelengths to paths to maximize the number of accepted paths Online and Offline QoS routing with interference (ad-hoc) First two words about complexity
4
Complexity Examples of Problems SSP: Subset-Sum Problem: Given a set of n positive integers, is there a subset of them that add up to N? [Note: easy to verify a solution; to see if there is one, one must essentially try the 2 n subsets.] KP: Knapsack Problem: Given a set of items each with a weight, find the number of each item to include to achieve the maximum weight less than a given value. HP: Halting Problem: Given an algorithm a and its input i, will it stop or will it run forever? SAT: Boolean Satisfiability Problem: Given a Boolean expression, is there an assignment (true or false) of the variables that makes the expression true?
5
Complexity Complexity measures the time (number of steps or operations) or the space (memory) required to solve a problem by the best possible algorithm P (Polynomial): Problems whose solution can be found on a sequential deterministic machine in a time that is polynomial in the size of the input NP (Nondeterministic Polynomial): Problems whose solution can be verified in polynomial time on a sequential deterministic machine; equivalently, whose solution can be found on a sequential nondeterministic machine in polynomial time. [Guess and check.] Open problem: P = NP? NP-Hard: A decision problem H such that any decision problem in NP can be reduced to H in polynomial time NP-Complete: A problem in NP to which every other problem in NP can be reduced in polynomial time = both NP-Hard and NP SAT, KP, SSP are NP-Complete, HP is NP-Hard but is not NP
6
Halting Theorem Theorem (Turing): There is no algorithm that can decide, for any algorithm a and any input i whether the algorithm a(i) halts. Proof: Assume there is an algorithm with h(a, i) = true if halts and h(a, i) = false otherwise. Consider the algorithm t defined so that t(i) is as follows: if h(i, i) = false, then return true; if h(i, i) = true, loop forever. Does the algorithm t(t) halt? If it does, then h(t, t) = false, which says that the algorithm t with input t does not halt. On the other hand, if t(t) does not halt, then h(t, t) must be true, so that t(t) should halt. Hence, there cannot be an algorithm h.
7
Cook’s Theorem Theorem (Stephen Cook): SAT is NP-Complete Proof: SAT is NP because a nondeterministic Turing machine (NTM) can guess an assignment of variables and check. Consider a problem that can be solved in p(n) by a NTM. The NTM corresponds to a tape with n symbols, transition rules, and an acceptance rule. Every instance of the problem can be encoded into a Boolean expression B that is satisfied iff the NTM accepts. The variables describe the contents of the tape and the position of the head at the different steps; the Boolean expression states that the rules of the NTM are followed and that the machine finishes in an accepting state. Counting shows that B is of size p(n).
8
Complexity EXPTIME-Complete: Problems that require an exponential time Currently, all know algorithms for solving an NP- complete problem require an exponential-time. Some problems require e^(e^n) time; other problems (e.g., halting) cannot be solved in finite time Note that a problem that requires a time 10 6 n 1000 is P, yet intractable The average time of an NP problem might be P
9
Routing with Multiple Constraints Problem: Given a graph where each link has an integer cost and an integer delay, find a path with cost C and delay D. Example: Find a path from S to D with cost 4 and delay 3 None Find a path from S to D with cost 5 and delay 3 SAD Find a path from S to D with cost 3 and delay 4 SBD Find a path from S to D with cost 5 and delay 4 SAD or SBD
10
Routing with Multiple Constraints Theorem: The problem is NP-Complete Proof: Reduction from SSP (that is, SSP is reduced to a routing problem) Consider SSP with n integers {x 1, x 2, …, x n } Construct following graph:
11
Routing with Multiple Constraints
12
Results (from Tripakis & Puri; Related results in literature): A. Puri and S. Tripakis. Algorithms for Routing with Multiple Constraints. In AIPS'02 Workshop on Planning and Scheduling using Multiple Criteria, 2002 Algorithms for routing with multiple constraints 1.Pseudo-polynomial Algorithm: O( |V||E|min{C, D}) steps 2.Approximation Result: Algorithm that either gives a path with cost at most C(1+ ) and delay at most D(1+ ) or states that no such path exists. O(|V| 2 |E|(1 + 1/ ))
13
Routing and Wavelength Assignments Problem: Lightpaths in optical network Example: Consider following network Each link can carry N wavelengths Requests for connections come from i to j When request comes, it can be satisfied by a direct connection if possible, or by an indirect one. Question: Should one be myopic? Answer: Probably not ….
14
Routing and Wavelength Assignments Example … Myopic strategy:
15
Routing and Wavelength Assignments Example … The morale of the story is that one should anticipate future arrivals. Optimization is difficult. How could we do it? Dynamic Programming LP Size of LP: variables are a(x) = p(accept and state is x) |X| = O(N 3 ). Practical Solution: Trunk Reservation Accept long route only if there are n free circuits on links
16
Routing and Wavelength Assignments Some easy results … (Ramawami, Sivarajan: Optical Networks, ’98) Coloring Upper Bound Greedy assignment in line network Ring Networks
17
Routing and Wavelength Assignments Coloring Assigning walengths is equivalent to coloring the path graph The minimum number of wavelengths is the minimum number of colors for the path graph – NP-Complete For this path graphs, two colors suffice: Let B, C be yellow and A, D black. This corresponds to B, C using one wavelength and A, D another one. 1 2 3 4 5 6 A B C D AB C D A and D share a link (link 24)
18
Routing and Wavelength Assignments Upper Bound Assume a given routing with at most L wavelengths/link and at most H hops per path The number of necessary wavelengths is at most min{(L – 1)H + 1, (2L – 1)|E| 0.5 – L + 2} Proof: Each lightpath can intersect at most (L – 1)H other lightpaths The degree of the pathgraph is at most (L – 1)H and can be colored in a greedy way with (L – 1)H + 1 colors Assume there are K lightpaths of length |E| 0.5. The average number of wavelengths per link is then K|E| 0.5 /|E| L, so that K L|E| 0.5. Assign L|E| 0.5 different wavelengths to these long paths. Consider the path with fewer than |E| 0.5 – 1 hops. Each intersects with at most (L – 1)(|E| 0.5 – 1) other such lightpaths and require at most (L – 1)(|E| 0.5 – 1) wavelengths other bound.
19
Routing and Wavelength Assignments Linear Network – Fact: Greedy assignment requires the minimum number L of wavelengths Proof: Let L be the maximum number of intersecting paths Number wavelengths 1 to L Proceed from left to right: left-most lightpath is assigned 1, then next path is assigned smallest available number, and so on This requires at most L wavelengths L
20
Routing and Wavelength Assignments Ring Networks – Most optical networks are arranged as rings (SONET) Cute observation: Shortest path routing may require more wavelengths, but at most twice as many
21
Routing and Wavelength Assignments Cute observation: Shortest path routing may require more wavelengths, but at most twice as many Proof: Assume shortest path requires k wavelengths Consider a link j that uses k wavelengths. Reroute n paths that use that link j reduce # wavelengths on j to k – n but they now use at least N/2 hops and must cross link j + N/2 and increase its # of wavelengths by n Thus, the minimum number L* of wavelengths must be such that L* min n max{k – n, n} k/2
22
QoS in Ad-Hoc Networks Ad-Hoc Networks QoS Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
23
QoS in Ad-Hoc Networks Ad-Hoc Networks QoS Model and Related Work Interference Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
24
Ad-Hoc Networks No base station Multi-hop transmissions Distributed and dynamic operations
25
QoS in Ad-Hoc Networks Ad-Hoc Networks QoS Model and Related Work Interference Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
26
QoS Model, related work Want to support flows with quality (bandwidth) requirements Aspects of the problem Maximum capacity in a network Interference Feasibility of a given set of flows Available capacity once flows are assigned Routing a given set of flows
27
QoS Model, related work Capacity of ad-hoc networks Random/homogenous topology, traffic matrix Asymptotic bounds on capacity (see next lecture) Our Approach Arbitrary topology, traffic matrix Graph theoretic model Feasibility of given set of flows Distributed, localized and dynamic algorithm
28
QoS in Ad-Hoc Networks Ad-Hoc Networks QoS Model and Related Work Interference, conflict graph, independent sets Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
29
Interference In wired networks, all links may be used simultaneously In Ad-Hoc networks, neighboring links interfere Interference Range > Transmission Range
30
Single Link: F 1 <= C Two Links: F 1 + F 2 <= C Three Links: F 1 + F 2 <= C and F 2 + F 3 <= C Interference: Conflict Graph L3L3 L2L2 L1L1 Interference Radius L1L1 L2L2 L3L3 Conflict Graph:
31
Independent Set Solution Identify All Maximal Independent Sets {L 1, L 3 } L1L1 L2L2 L3L3 L4L4 L5L5, {L 1, L 4 } {L 2, L 4 }, {L 2, L 5 }, {L 3, L 5 } Write Constraints such that Only one Independent Set “on” at a time QoS requirements met for flow at each link “A New Model for Packet Scheduling in Multihop Wireless Networks”, H. Luo, S. Lu, and V. Bhargavan, ACM Mobicom 2000. Construct Conflict Graph
32
Issues with Independent Sets Shown to be necessary and sufficient for existence of global feasible schedule But scales poorly Need centralized information Finding all maximal independent sets is exponential Takes 10’s of minutes for simple graph (<100 links) Want distributed and sufficient constraints that can be computed quickly in a large network "Impact of Interference on Multi-hop Wireless Network Performance”, K. Jain, J. Padhye, V. N. Padmanabhan, and L. Qiu, ACM Mobicom 2003.
33
Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Interference Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
34
Single Link: F 1 <= C Necessary and Sufficient: F 1 + F 2 <= C and F 2 + F 3 <= C Necessary and Sufficient: F 1 + F 2 <= C and F 2 + F 3 <= C Conflict Graph L3L3 L2L2 L1L1 Interference Radius L1L1 L2L2 L3L3 Conflict Graph: Sufficient: F 1 + F 2 + F 3 <= C Sufficient: F 1 + F 2 + F 3 <= C
35
Row Constraints At Node 2: F 2 + F 1 <= C At Node 1: F 1 + F 2 + F 3 + F 4 + F 5 <= C Sufficient for existence of feasible schedule Often too pessimistic F 2 = F 3 = F 4 = F 5 = C possible Row constraints allow only F 2 = F 3 = F 4 = F 5 = C/4 Each row in the Conflict Graph incidence matrix yields a constraint:
36
Sufficiency of Row Constraints: Proof Assume each weight F i is integral Transform CG CG F Replace each node i with K i fully connected nodes Color this graph Each node will be scheduled for requisite number of slots Neighboring nodes will be scheduled for disjoint slots Need to achieve coloring in T colors/slots Greedy algorithm Color each node with smallest available color Can always find such a color since degree (row constraints) < T
37
Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
38
Cliques Observe Cliques in CG are local structures (IS are global) Only one node in a clique may be active at once Maximal Cliques: ABC, BCEF, CDF Definitions Clique = Complete Subgraph Maximal Clique = Clique not a subset of any other
39
Clique Constraints Identify All Maximal Cliques {L 1, L 2 }, {L 1, L 5 }, {L 2, L 3 }, {L 3, L 4 }, {L 4, L 5 } Write Constraints Only one member of a Clique can be on at once F 1 + F 2 <= C, F 1 + F 5 <= C,... Necessary conditions for a feasible schedule L1L1 L2L2 L3L3 L4L4 L5L5 Clique
40
Insufficiency of Clique Constraints But, clique constraints are not sufficient F 1 =F 2 =F 3 =F 4 =F 5 = C/2 satisfy clique constraints But, we see that only 2 of 5 nodes may be on at once F 1 =F 2 =F 3 =F 4 =F 5 = 2C/5 is the max possible allocation Sufficient only for ‘Perfect Graphs’ L1L1 L2L2 L3L3 L4L4 L5L5
41
Imperfection Ratio is the ratio between the weighted Chromatic and Clique numbers Supremum over all weight (flow) vectors Bounded when the underlying graph is UDG Feasible schedule exists if scaled clique constraints are satisfied on a conflict graph Scale capacity of each link by So, Imperfection Ratio “Graph Imperfection I”, S. Gerke and C. McDiarmid, Journal of Combinatorial Theory, Series B, vol. 83 (2001), pp. 58-78.
42
Earlier results valid for CG that are unit disk graph Variance in interference range Model interference range varying between [x,1] Then, need to scale the clique constraints by Obstructions in network Consider virtual CG V without obstructions Feasible schedule in CG V implies schedule in CG Satisfy scaled clique constraints in CG V Extensions to Realistic Networks
43
Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing
44
X position in km Y position in km 0 kbps1000 kbps500 kbps Choose Source Choose DestinationClick on bar to choose flow rateRouting…
45
0 kbps1000 kbps500 kbps Choose Next SourceChoose DestinationClick on bar to choose flow rateRouting…
47
0 kbps1000 kbps500 kbps Choose Next Source Choose DestinationClick on bar to choose flow rate Flow Rejected. Insufficient Resources
48
Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Computing Cliques Implementation of Algorithms Simulations of 802.11b Interference-based QoS Routing
49
Shortest Path Methods ?? 1-3 is widest path from node 1 to 3 Consider path from 1 to 5 Path 1-3-4-5: F A +F D +F E <=C, so f<=C/3 Path 1-2-3-4-5: F B +F C <=C, F C +F D <=C, F D +F E <=C, so f<=C/2 Violates Bellman’s principle of optimality Does not conform to distributed algorithm extending path hop by hop Distributed algorithm unlikely to be optimal Work with distributed heuristic algorithms
50
Source Routing Link state exchange allows src to know Topology Available capacity on all links i New flow (src, dest, bw) arrives Choose several candidate paths by source routing Shortest Path (SP) SP complement Approximation of Shortest Widest Path (ASWP) (evaluate local constraints: row or clique; keep n-best paths) Send probe packets along each path Final path chosen and confirmed by destination
51
SWP Tradeoffs (contd) Short Paths Take least resources Tend to crowd middle of network Wide Paths Use up too much resources Computation intensive ASWP seems pretty good in simulations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.