Communication Networks A Second Course Jean Walrand Department of EECS University of California at Berkeley.

Slides:



Advertisements
Similar presentations
The Capacity of Wireless Networks Danss Course, Sunday, 23/11/03.
Advertisements

Complexity Classes: P and NP
NP-Hard Nattee Niparnan.
Time Complexity P vs NP.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Discrete Structures & Algorithms The P vs. NP Question EECE 320.
Interference Considerations for QoS in MANETs Rajarshi Gupta, John Musacchio, Jean Walrand {guptar, musacchj, University of California,
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
ASWP – Ad-hoc Routing with Interference Consideration June 28, 2005.
ASWP – Ad-hoc Routing with Interference Consideration Zhanfeng Jia, Rajarshi Gupta, Jean Walrand, Pravin Varaiya Department of EECS University of California,
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Approximation Algorithms
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.
Time Complexity.
Graph Theory in Networks Lecture 5, 9/14/04 EE 228A, Fall 2004 Rajarshi Gupta University of California, Berkeley.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
Complexity Issues Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Smart Networks Project University of California, Berkeley DARPA NMS PI Meeting Miami, Jan 21-23, 2004.
Interference-aware QoS Routing (IQRouting) for Ad-Hoc Networks Rajarshi Gupta, Zhanfeng Jia, Teresa Tung, and Jean Walrand Dept of EECS, UC Berkeley Globecom.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Profile-Based Topology Control and Routing of Bandwidth-Guaranteed Flows in Wireless Optical Backbone Networks A. Kashyap, M.K. Khandani, K. Lee, M. Shayman.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
CSC 413/513: Intro to Algorithms
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
The NP class. NP-completeness
Chapter 10 NP-Complete Problems.
Hard Problems Introduction to NP
Graph Theory in Networks
ICS 353: Design and Analysis of Algorithms
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
The Theory of NP-Completeness
Presentation transcript:

Communication Networks A Second Course Jean Walrand Department of EECS University of California at Berkeley

Routing: Complexity & Algorithms Overview Complexity Routing with Multiple Constraints Routing and Wavelength Assignments QoS routing in Ad Hoc Networks

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

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?

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

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.

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).

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

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

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:

Routing with Multiple Constraints

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/  ))

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 ….

Routing and Wavelength Assignments Example … Myopic strategy:

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

Routing and Wavelength Assignments Some easy results … (Ramawami, Sivarajan: Optical Networks, ’98) Coloring Upper Bound Greedy assignment in line network Ring Networks

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 A B C D AB C D A and D share a link (link 24)

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.

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

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

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

QoS in Ad-Hoc Networks Ad-Hoc Networks QoS Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing

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

Ad-Hoc Networks No base station Multi-hop transmissions Distributed and dynamic operations

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

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

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

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

Interference In wired networks, all links may be used simultaneously In Ad-Hoc networks, neighboring links interfere Interference Range > Transmission Range

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:

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 Construct Conflict Graph

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.

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

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

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:

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

Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing

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

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

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

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

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

Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Implementation of Algorithms Interference-based QoS Routing

X position in km Y position in km 0 kbps1000 kbps500 kbps Choose Source Choose DestinationClick on bar to choose flow rateRouting…

0 kbps1000 kbps500 kbps Choose Next SourceChoose DestinationClick on bar to choose flow rateRouting…

0 kbps1000 kbps500 kbps Choose Next Source Choose DestinationClick on bar to choose flow rate Flow Rejected. Insufficient Resources

Overview Introduction and Motivation QoS in Ad-Hoc Networks Model and Related Work Row Constraints Clique Constraints Computing Cliques Implementation of Algorithms Simulations of b Interference-based QoS Routing

Shortest Path Methods ?? 1-3 is widest path from node 1 to 3 Consider path from 1 to 5 Path : F A +F D +F E <=C, so f<=C/3 Path : 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

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

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