This observation leads to the following algorithm.
|
|
- Buck Franklin
- 5 years ago
- Views:
Transcription
1 126 Andreas Jakoby A Bounding-Function for the Knapsack Problem Finding a useful bounding-function is for most problems a difficult task. Let us consider the Knapsack Problem: Let us consider the version of the Knapsack Problem where also fractions of an item can be added to the knapsack. In this case the fraction ε, 0 ε 1, of an item j has weight ε w j and value ε v j. We call this version the rational Knapsack Problem. To solve the rationale Knapsack Problem we choose the item i that maximize the quotint v i /w i. It holds: For a weight ε wi with ε 1 we can get at most the value ε v i. This observation leads to the following algorithm.
2 Algorithm RationalKnapsack(n, V, W, M) Input: instance (V, W, M) with n items Output: optimal solution (x 0,..., x n 1 ) [0; 1] n for the rational Knapsack Problem, where x i is the fraction of item i in the solution. 1: sort the items according to the quotients v i /w i 2: let i 0,..., i n 1 be the resulting sequence of items 3: for j := 0 to n 1 do x j := 0 end for 4: let j := 0; V := 0; W := 0 5: while W M and j < n do 6: if W + w wij M then 7: x ij := 1; W := W + w ij ; V := V + v ij ; j := j + 1 8: else 9: x ij := M W w ij ; W := M; V := V + x ij v ij ; j := j : end if 11: end while 12: Return((x 0,..., x n 1 )) 127
3 Algorithm BoundingKnapsack(l, X akt, V akt, W akt ) Input: instance I = (V, W, M), best solution X opt found so far, value V opt of X opt (globally given) X akt = (x akt,0,..., x akt,n 1 ) with value V akt and weight W akt Output: new optimal solution X opt with value V opt (given globally) 1: if l = n then 2: if V akt > V opt then V opt := V akt ; X opt := X akt end if 3: else 4: if W akt + w l M then C l := {0, 1} else C l := {0} end if 5: for all x C l do 6: x akt,l := x 128
4 129 Andreas Jakoby 7: let I = (V, W, M W akt x w l ) be the instance I 8: restricted to items i > l 9: (x l+1,..., x n 1 ) :=RationalKnapsack(n l 1, 10: V, W, M W akt x w l ) 11: B := V akt + x w l + n 1 i:=l+1 x i w i 12: if B > V opt then 13: BoundingKnapsack(l + 1, X akt, V akt + x v l, W akt + x v l ) 14: end if 15: end for 16: end if
5 5.4 The Traveling Salesperson Problem Definition 12 [Traveling Salesperson Problem (TSP)] Given an undirected graph G = (V, E) and a weight matrix M = (m i,j ) i,j V where m i,j = if {i, j} E. 1 A Hamiltonian cycle is a sequence v 0, v 1,..., v n of nodes with v 0 = v n that visits each node exactly once. The weight of a cycle v 0,..., v n is defined as follows: cost(v 0,..., v n 1 ) := n 1 m vi,v (i+1) mod n. i:=0 Problem: Find a Hamiltonian cycle of minimum weight. 1 For easier notation we denote nodes by integers. 130
6 Algorithm TSP-Backtrack(l, C l 1, X akt, X opt, V opt ) Input: subset of node C l 1 not added to the actual cycle, prefix of a new trail X akt = x akt,0,..., x akt,l 1, optimal solution (found so far) X opt of value V opt Output: new optimal solution X opt of value V opt 1: if l = n then 2: V akt := cost(x akt ) 3: if V akt < V opt then V opt := V akt ; X opt := X akt end if 4: else 5: if l = 0 then C l := {0} end if 6: if l = 1 then C l := {1,..., n 1} end if 7: if l > 1 then C l := C l 1 \ {x akt,l 1 } end if 8: for each x akt,l C l do 9: (X opt, V opt ) := TSP-Backtrack(l + 1, C l, X akt x akt,l, X opt, V opt ) 10: end for 11: end if 12: Return(X opt, V opt ) 131
7 132 Andreas Jakoby 1. Bounding-Function For a set of nodes W V and a node x V let b(x, W ) := min w W m x,w be the minimum cost for a connection between x and a node of W. For a path X := x 0,..., x l 1 in G let X := V \ X and define the bounding function l 2 b(x l 1, X ) + X {x 0 }) for l < n BTSP(X ) := m xi,x i+1 + v Xb(v, i=0 m xl 1,x 0 for l = n. Note that every node of X {x l 1 } has to have a successor on the Hamiltonian cycle. Thus BTSP is a bounding-function that gives a lower bound for the length of every Hamiltonian cycle that contains X as a subpath.
8 Algorithm TSP-Bounding(l, C l 1, X akt, X opt, V opt ) Input: subset of node C l 1 not added to the actual cycle, prefix of a new trail X akt = x akt,0,..., x akt,l 1, optimal solution (found so far) X opt of value V opt Output: new optimal solution X opt of value V opt 1: if l = n then 2: V akt := cost(x akt ) 3: if V akt < V opt then V opt := V akt ; X opt := X akt end if 4: else 5: if l = 0 then C l := {0} end if 6: if l = 1 then C l := {1,..., n 1} end if 7: if l > 1 then C l := C l 1 \ {x akt,l 1 } end if 8: for each x akt,l C l with V opt BTSP(X akt x akt,l ) do 9: (X opt, V opt ) := TSP-Bounding(l + 1, C l, X akt x akt,l, X opt, V opt ) 10: end for 11: end if 12: Return(X opt, V opt ) 133
9 2. Bounding-Function To find a second bounding-function we modify the weight matrix as follows: 1. For each column of the weight matrix determine its minimum value and reduce the values of the matrix each by the corresponding minimum column value. 2. Than for each row of the modified weight matrix determine its minimum value and reduce the values of the matrix each by the corresponding minimum row value. Let redval be the sum of these minimum values. All entries of the resulting matrix have still positive values. But at least one entry of each column and of each row has value
10 Algorithm Redval(M) Input: k k-weight matrix Output: value of redval 1: redval:= 0 2: for i := 0 do k 1 do 3: row:= min j [0..k 1] m i,j 4: for j := 0 to k 1 do m i,j := m i,j row end for 5: redval:=redval+row 6: end for 7: for j := 0 do k 1 do 8: col:= min i [0..k 1] m i,j 9: for i := 0 to k 1 do m i,j := m i,j col end for 10: redval:=redval+col 11: end for 12: Return(redval) 135
11 Lemma 8 Redval(M) is a lower bound for the weight of every Hamiltonian cycle of a graph G with weight matrix M. Proof of Lemma 8: If we mark all edges of a Hamiltonian cycle in the weight matrix one can see that there is a marked entry m i,j in every row and every column. It can be shown, that the sum of these values is bounded (from below) by Redval(M). To compute the bounding-function we have to modify the weight matrix by using the actual path. 136
12 For a path X := x 0,..., x l 1 let X := V \ X. Let M X be the submatrix of the weight matrix M whose entries are subscribed by the nodes of X. We subscribe the columns and rows of M X by the nodes of X. M X M X X 137
13 138 Andreas Jakoby Now we add one column and one row to M X. E.g. at the column and row originally subscribed by x 0. At the positions of the new row we add the edge weight of the edge from the corresponding node of X to x 0. At the positions of the new column we add the edge weight of the edge from x l 1 to the corresponding node of X. The position where the new row and the new column intersect we insert the weight. Let M be the resulting matrix then we choose { l 2 Redval(M ) for l < n BTSP2(X ) := m xi,x i+1 + m xl 1,x 0 for l = n. i=0
14 139 Andreas Jakoby Algorithm BTSP2(X ) Input: a path X = x 0,..., x l 1 in G Output: a bounding-value 1: if l = n then 2: Return(cost(X )) 3: else 4: let M = (m i,j ) i,j [0..n l] be a n l + 1 n l + 1-matrix 5: let m 0,0 := ; j := 1; i := 1 6: for all v X do m 0,j := m x l 1,v ; j := j + 1 end for 7: for all v X do m i,0 := m v,x 0 ; i := i + 1 end for 8: i := 0 9: for all u X do 10: j := 1; i := i : for all v X do m i,j := m u,v ; j := j + 1 end for 12: end for 13: Return( l 2 i=0 m x i,x i+1 + Redval(M )) 14: end if
15 5.5 The MAXCLIQUE Problem Let us now consider the problem to determine the size of the maximum clique of a graph. This problem is again N P-hard. Based on the algorithm Clique-Backtrack we will now develop a new algorithm. 140
16 Algorithm MAXCLIQUE(l, X akt, C l 1, G, V opt ) Input: instance G, maximum size V opt of all cliques found so far, node set C l 1, and new trail to construct a clique X akt = x 0,..., x l 1 Output: maximum size of a clique 1: if l = 0 then C l := V else C l := C l 1 Γ(x l 1 ) B(x l 1 ) end if 2: if C l = then 3: if l > V opt then Return(l) else Return(V opt ) end if 4: else 5: for all x C l do 6: V opt :=MAXCLIQUE(l + 1, X akt x, C l, G, V opt ) 7: end for 8: end if 9: Return(V opt ) 141
17 We will now discuss a bounding-function for the MAXCLIQUE problem that is based on a coloring problem. We investigate the node coloring problem of the subgraph with node set C l : Find a color for every node of the graph such that no two adjacent nodes have the same color and a minimum number of colors are used. If we can color a graph G by k colors, then G has no clique of size k + 1! The coloring problem is N P-hard. Therefore we try to find a greedy algorithm that gives a good approximation for the coloring problem. 142
18 Greedy algorithm for the coloring problem: Let V = {0,..., n 1} be a set of nodes for the coloring problem. By N resp. [0..k 1] we denote the set of all colors. For a color h let CClass[h] denote the set of nodes that are colored by h. For a node v let Color[v] denote the color of v. 143
19 Algorithm Greedy-Color(G) Input: graph G Output: upper bound for the number of colors k 1: k := 0 2: for v = 0 to n 1 do 3: h := 0 4: while h < k and CClass[h] Γ(v) do h := h + 1 end while 5: if h = k then k := k + 1; CClass[h] := end if 6: CClass[h] :=CClass[h] {v} 7: Color[v] := h 8: end for 9: Return(k) 144
20 There are instances for the coloring problem, where Greedy-Color does not find an optimal solution. If the maximum degree of G is d, i.e. Γ(v) d for all nodes of the graph, then our algorithm finds a coloring of d + 1 colors. Using our algorithm Greedy-Color we determine an upper bound for the number of needed colors for every subgraph G l = (C l, E 2 C l ) reached by MAXCLIQUE. Thus we get also an upper bound for the maximum size of a clique of G l. The maximum size of a clique that includes X akt is bounded by X akt + Greedy-Color(G l ). 145
21 5.6 Branch-and-Bound Schema Using the bounding-function we try to find an order to traverse the backtracking-tree such that we can eliminate some additional candidates resp. subtrees. For a maximization problem we sort C l in decreasing order with respect to the value of the bounding-function. We consider the elements of C l according to the determined order. If we get a value of a solution for an element of C l that is close to the value of the bounding-function then we can eliminate all elements of C l whose bounding-value is smaller than the actual found optimal value i.e. these candidates cannot lead to an optimal solutions. 146
22 Algorithm BranchAndBound(l, X, X opt, V opt, I ) Input: depth l N, partial solution X := (x 1,..., x l 1 ), best solution X opt found so far with value V opt, instance I Output: optimal solution in comp(x ) {X opt } 1: if X is a valid solution then 2: V := val(i, X ) 3: if V > V opt then V opt := V ; X opt := X end if 4: end if 5: determine C l and F l = {(x, bound(i, X x)) x C l } 6: sort F l in decreasing order according to the second coordinate 7: let F l [1],..., F l [k] be the sorted sequence 8: for i = 1 to k do 9: let (x, B) := F l [i] 10: if B V opt then Return(X opt, V opt ) end if 11: (X opt, V opt ) := BranchAndBound(l + 1, X x, X opt, V opt, I ) 12: end for 13: Return(X opt, V opt ) 147
23 148 Andreas Jakoby 6 2-Party-Games 6.1 Types of 2-Party-Games A second category of optimization problem are 2-party-games: A game where 2 parties alternate to choose there move out of a finite set of possible alternative moves can be described as a tree. Each node of the tree represents a configuration of the game. The edges starting from node represent alternative moves. The game-tree of a 2-party-game is a generalization of the backtracking-tree (solution tree) of an optimization problem.
24 149 Andreas Jakoby For 2-Party-Games we distinguish between the following types of games randomized games, e.g. play dice or intermixing cards, and deterministic players, players with hidden information, e.g. games with closed cards, and players with complete knowledge, e.g. chess, checkers, or go. In a zero-sum-situation the winning situation of one party is the losing situation of the other party. The finale state of a game can be rated by a numeric value that determines the amount one player has to pay the second player. In a game with simple ginning or loosing conditions we can choose these values as +1 for winning and 1 for loosing. We choose 0 if we cannot find out how has won the game (e.g. for tie game).
25 150 Andreas Jakoby 6.2 Alpha-Beta-Search for 2-Party-Games Since the size of the game-tree is exponential for many games, we cannot completely search the game-tree. Thus we are looking for appropriate heuristics to determine uninteresting subtrees which can be skipped. This strategy correlates to the operation of the bounding-function in backtracking. For 2-party-games we consider two values: a α-bound, for the maximum profit, player 1 can achieve in the actual situation, and a β-bound, for the maximum profit, player 2 can achieve in the actual situation. In a zero-sum-situation the maximum profit of one party is the maximum loss of the second party.
26 The α- and β-bound of a node can be compute from the values of the predecessors by maximization or minimization depending on the party how is choosing the next move. We define a α-cut as follows: We do not continue to consider a configuration where player 1 has to choose his move because player 2 will never enter this configuration since an alternative move will lead to better bounds. A β-cut is defined simultaneously. 151
Algorithms and Complexity Theory. Chapter 8: Introduction to Complexity. Computer Science - Durban - September 2005
Algorithms and Complexity Theory Chapter 8: Introduction to Complexity Jules-R Tapamo Computer Science - Durban - September 2005 Contents 1 Introduction 2 1.1 Dynamic programming...................................
More information(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 )
Algorithms Chapter 5: The Tree Searching Strategy - Examples 1 / 11 Chapter 5: The Tree Searching Strategy 1. Ex 5.1Determine the satisfiability of the following Boolean formulas by depth-first search
More informationInteger Linear Programming
Integer Linear Programming Solution : cutting planes and Branch and Bound Hugues Talbot Laboratoire CVN April 13, 2018 IP Resolution Gomory s cutting planes Solution branch-and-bound General method Resolution
More informationAlgorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University
Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case
More informationCombinatorial optimization problems
Combinatorial optimization problems Heuristic Algorithms Giovanni Righini University of Milan Department of Computer Science (Crema) Optimization In general an optimization problem can be formulated as:
More information3.4 Relaxations and bounds
3.4 Relaxations and bounds Consider a generic Discrete Optimization problem z = min{c(x) : x X} with an optimal solution x X. In general, the algorithms generate not only a decreasing sequence of upper
More informationMVE165/MMG630, Applied Optimization Lecture 6 Integer linear programming: models and applications; complexity. Ann-Brith Strömberg
MVE165/MMG630, Integer linear programming: models and applications; complexity Ann-Brith Strömberg 2011 04 01 Modelling with integer variables (Ch. 13.1) Variables Linear programming (LP) uses continuous
More informationNETS 412: Algorithmic Game Theory March 28 and 30, Lecture Approximation in Mechanism Design. X(v) = arg max v i (a)
NETS 412: Algorithmic Game Theory March 28 and 30, 2017 Lecture 16+17 Lecturer: Aaron Roth Scribe: Aaron Roth Approximation in Mechanism Design In the last lecture, we asked how far we can go beyond the
More informationData Structures in Java
Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways
More information1 Primals and Duals: Zero Sum Games
CS 124 Section #11 Zero Sum Games; NP Completeness 4/15/17 1 Primals and Duals: Zero Sum Games We can represent various situations of conflict in life in terms of matrix games. For example, the game shown
More informationQuestion Paper Code :
www.vidyarthiplus.com Reg. No. : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2011. Time : Three hours Fourth Semester Computer Science and Engineering CS 2251 DESIGN AND ANALYSIS OF ALGORITHMS (Regulation
More informationKnapsack. Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i
Knapsack Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i Goal: find a subset of items of maximum profit such that the item subset fits in the bag Knapsack X: item set
More informationEasy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P
Easy Problems vs. Hard Problems CSE 421 Introduction to Algorithms Winter 2000 NP-Completeness (Chapter 11) Easy - problems whose worst case running time is bounded by some polynomial in the size of the
More informationComputational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9
1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives Classify problems as tractable or intractable Define decision problems Define the class P Define
More information1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)).
Code No: R05220502 Set No. 1 1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)). 2. (a) List some of the relative advantages
More informationAlgorithm Design Strategies V
Algorithm Design Strategies V Joaquim Madeira Version 0.0 October 2016 U. Aveiro, October 2016 1 Overview The 0-1 Knapsack Problem Revisited The Fractional Knapsack Problem Greedy Algorithms Example Coin
More informationCS/COE
CS/COE 1501 www.cs.pitt.edu/~nlf4/cs1501/ P vs NP But first, something completely different... Some computational problems are unsolvable No algorithm can be written that will always produce the correct
More informationPolynomial-Time Reductions
Reductions 1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. [von Neumann 1953, Godel
More informationDynamic Programming on Trees. Example: Independent Set on T = (V, E) rooted at r V.
Dynamic Programming on Trees Example: Independent Set on T = (V, E) rooted at r V. For v V let T v denote the subtree rooted at v. Let f + (v) be the size of a maximum independent set for T v that contains
More informationCSCI3390-Lecture 17: A sampler of NP-complete problems
CSCI3390-Lecture 17: A sampler of NP-complete problems 1 List of Problems We now know that if L is any problem in NP, that L P SAT, and thus SAT is NP-hard. Since SAT is also in NP we find that SAT is
More informationP P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions
Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems
More informationWorst Case Instances for Maximum Clique Algorithms and How to Avoid Them
Worst Case Instances for Maximum Clique Algorithms and How to Avoid Them Alexandre Prusch Züge Renato Carmo Universidade Federal do Paraná Programa de Pós-Graduação em Informática Grupo de Pesquisa em
More informationNP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]
NP-Completeness Andreas Klappenecker [based on slides by Prof. Welch] 1 Prelude: Informal Discussion (Incidentally, we will never get very formal in this course) 2 Polynomial Time Algorithms Most of the
More informationCS Algorithms and Complexity
CS 50 - Algorithms and Complexity Linear Programming, the Simplex Method, and Hard Problems Sean Anderson 2/15/18 Portland State University Table of contents 1. The Simplex Method 2. The Graph Problem
More informationBBM402-Lecture 11: The Class NP
BBM402-Lecture 11: The Class NP Lecturer: Lale Özkahya Resources for the presentation: http://ocw.mit.edu/courses/electrical-engineering-andcomputer-science/6-045j-automata-computability-andcomplexity-spring-2011/syllabus/
More information1 T 1 = where 1 is the all-ones vector. For the upper bound, let v 1 be the eigenvector corresponding. u:(u,v) E v 1(u)
CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh (rezab@stanford.edu) Final Review Session 03/20/17 1. Let G = (V, E) be an unweighted, undirected graph. Let λ 1 be the maximum eigenvalue
More information8.5 Sequencing Problems
8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,
More informationICS 252 Introduction to Computer Design
ICS 252 fall 2006 Eli Bozorgzadeh Computer Science Department-UCI References and Copyright Textbooks referred [Mic94] G. De Micheli Synthesis and Optimization of Digital Circuits McGraw-Hill, 1994. [CLR90]
More informationIE418 Integer Programming
IE418: Integer Programming Department of Industrial and Systems Engineering Lehigh University 23rd February 2005 The Ingredients Some Easy Problems The Hard Problems Computational Complexity The ingredients
More informationLecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007
CS880: Approximations Algorithms Scribe: Tom Watson Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007 So far in this course, we have been proving upper bounds on the approximation factors
More informationIntractable Problems Part Two
Intractable Problems Part Two Announcements Problem Set Five graded; will be returned at the end of lecture. Extra office hours today after lecture from 4PM 6PM in Clark S250. Reminder: Final project goes
More informationSummer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.
Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA NP Completeness Susmita Sur-Kolay Advanced Computing and Microelectronics Unit
More informationComputer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms
Computer Science 385 Analysis of Algorithms Siena College Spring 2011 Topic Notes: Limitations of Algorithms We conclude with a discussion of the limitations of the power of algorithms. That is, what kinds
More informationData Structures and Algorithms
Data Structures and Algorithms CS245-2015S-23 NP-Completeness and Undecidablity David Galles Department of Computer Science University of San Francisco 23-0: Hard Problems Some algorithms take exponential
More informationOptimisation and Operations Research
Optimisation and Operations Research Lecture 15: The Greedy Heuristic Matthew Roughan http://www.maths.adelaide.edu.au/matthew.roughan/ Lecture_notes/OORII/ School of
More informationThe minimum G c cut problem
The minimum G c cut problem Abstract In this paper we define and study the G c -cut problem. Given a complete undirected graph G = (V ; E) with V = n, edge weighted by w(v i, v j ) 0 and an undirected
More informationLecture 4: NP and computational intractability
Chapter 4 Lecture 4: NP and computational intractability Listen to: Find the longest path, Daniel Barret What do we do today: polynomial time reduction NP, co-np and NP complete problems some examples
More informationNP-Complete Reductions 2
x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete
More informationCS60007 Algorithm Design and Analysis 2018 Assignment 1
CS60007 Algorithm Design and Analysis 2018 Assignment 1 Palash Dey and Swagato Sanyal Indian Institute of Technology, Kharagpur Please submit the solutions of the problems 6, 11, 12 and 13 (written in
More informationGraduate Algorithms CS F-21 NP & Approximation Algorithms
Graduate Algorithms CS673-2016F-21 NP & Approximation Algorithms David Galles Department of Computer Science University of San Francisco 21-0: Classes of Problems Consider three problem classes: Polynomial
More informationAlpha-Beta Pruning: Algorithm and Analysis
Alpha-Beta Pruning: Algorithm and Analysis Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction Alpha-beta pruning is the standard searching procedure used for 2-person
More informationNP Complete Problems. COMP 215 Lecture 20
NP Complete Problems COMP 215 Lecture 20 Complexity Theory Complexity theory is a research area unto itself. The central project is classifying problems as either tractable or intractable. Tractable Worst
More informationCSC 8301 Design & Analysis of Algorithms: Lower Bounds
CSC 8301 Design & Analysis of Algorithms: Lower Bounds Professor Henry Carter Fall 2016 Recap Iterative improvement algorithms take a feasible solution and iteratively improve it until optimized Simplex
More informationAlgorithms and Theory of Computation. Lecture 22: NP-Completeness (2)
Algorithms and Theory of Computation Lecture 22: NP-Completeness (2) Xiaohui Bei MAS 714 November 8, 2018 Nanyang Technological University MAS 714 November 8, 2018 1 / 20 Set Cover Set Cover Input: a set
More informationAlpha-Beta Pruning: Algorithm and Analysis
Alpha-Beta Pruning: Algorithm and Analysis Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction Alpha-beta pruning is the standard searching procedure used for solving
More informationIntroduction to Mathematical Programming IE406. Lecture 21. Dr. Ted Ralphs
Introduction to Mathematical Programming IE406 Lecture 21 Dr. Ted Ralphs IE406 Lecture 21 1 Reading for This Lecture Bertsimas Sections 10.2, 10.3, 11.1, 11.2 IE406 Lecture 21 2 Branch and Bound Branch
More informationGreedy Algorithms My T. UF
Introduction to Algorithms Greedy Algorithms @ UF Overview A greedy algorithm always makes the choice that looks best at the moment Make a locally optimal choice in hope of getting a globally optimal solution
More informationFINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)
FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except
More informationNP Completeness and Approximation Algorithms
Winter School on Optimization Techniques December 15-20, 2016 Organized by ACMU, ISI and IEEE CEDA NP Completeness and Approximation Algorithms Susmita Sur-Kolay Advanced Computing and Microelectronic
More informationCS 6783 (Applied Algorithms) Lecture 3
CS 6783 (Applied Algorithms) Lecture 3 Antonina Kolokolova January 14, 2013 1 Representative problems: brief overview of the course In this lecture we will look at several problems which, although look
More informationApproximation Algorithms for Re-optimization
Approximation Algorithms for Re-optimization DRAFT PLEASE DO NOT CITE Dean Alderucci Table of Contents 1.Introduction... 2 2.Overview of the Current State of Re-Optimization Research... 3 2.1.General Results
More informationAlpha-Beta Pruning: Algorithm and Analysis
Alpha-Beta Pruning: Algorithm and Analysis Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction Alpha-beta pruning is the standard searching procedure used for 2-person
More informationSome Algebra Problems (Algorithmic) CSE 417 Introduction to Algorithms Winter Some Problems. A Brief History of Ideas
Some Algebra Problems (Algorithmic) CSE 417 Introduction to Algorithms Winter 2006 NP-Completeness (Chapter 8) Given positive integers a, b, c Question 1: does there exist a positive integer x such that
More informationPolynomial-time Reductions
Polynomial-time Reductions Disclaimer: Many denitions in these slides should be taken as the intuitive meaning, as the precise meaning of some of the terms are hard to pin down without introducing the
More informationHamiltonian Graphs Graphs
COMP2121 Discrete Mathematics Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5) [O1 Abstract Concepts] [O2 Proof Techniques] [O3 Basic Analysis Techniques] 1 Hamiltonian Paths and Circuits [O1] A Hamiltonian
More informationComputational Complexity
Computational Complexity Problems, instances and algorithms Running time vs. computational complexity General description of the theory of NP-completeness Problem samples 1 Computational Complexity What
More informationDiscrete (and Continuous) Optimization WI4 131
Discrete (and Continuous) Optimization WI4 131 Kees Roos Technische Universiteit Delft Faculteit Electrotechniek, Wiskunde en Informatica Afdeling Informatie, Systemen en Algoritmiek e-mail: C.Roos@ewi.tudelft.nl
More informationDiscrete (and Continuous) Optimization WI4 131
Discrete (and Continuous) Optimization WI4 131 Kees Roos Technische Universiteit Delft Faculteit Electrotechniek, Wiskunde en Informatica Afdeling Informatie, Systemen en Algoritmiek e-mail: C.Roos@ewi.tudelft.nl
More informationNP-Completeness. Sections 28.5, 28.6
NP-Completeness Sections 28.5, 28.6 NP-Completeness A language L might have these properties: 1. L is in NP. 2. Every language in NP is deterministic, polynomial-time reducible to L. L is NP-hard iff it
More informationDatabase Theory VU , SS Ehrenfeucht-Fraïssé Games. Reinhard Pichler
Database Theory Database Theory VU 181.140, SS 2018 7. Ehrenfeucht-Fraïssé Games Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Pichler 15
More informationAlgorithms, Lecture 3 on NP : Nondeterminis7c Polynomial Time
Algorithms, Lecture 3 on NP : Nondeterminis7c Polynomial Time Last week: Defined Polynomial Time Reduc7ons: Problem X is poly 7me reducible to Y X P Y if can solve X using poly computa7on and a poly number
More informationP,NP, NP-Hard and NP-Complete
P,NP, NP-Hard and NP-Complete We can categorize the problem space into two parts Solvable Problems Unsolvable problems 7/11/2011 1 Halting Problem Given a description of a program and a finite input, decide
More informationACO Comprehensive Exam October 18 and 19, Analysis of Algorithms
Consider the following two graph problems: 1. Analysis of Algorithms Graph coloring: Given a graph G = (V,E) and an integer c 0, a c-coloring is a function f : V {1,,...,c} such that f(u) f(v) for all
More informationNP-Completeness. Subhash Suri. May 15, 2018
NP-Completeness Subhash Suri May 15, 2018 1 Computational Intractability The classical reference for this topic is the book Computers and Intractability: A guide to the theory of NP-Completeness by Michael
More informationOptimization Exercise Set n.5 :
Optimization Exercise Set n.5 : Prepared by S. Coniglio translated by O. Jabali 2016/2017 1 5.1 Airport location In air transportation, usually there is not a direct connection between every pair of airports.
More informationShow that the following problems are NP-complete
Show that the following problems are NP-complete April 7, 2018 Below is a list of 30 exercises in which you are asked to prove that some problem is NP-complete. The goal is to better understand the theory
More informationCS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003
CS6999 Probabilistic Methods in Integer Programming Randomized Rounding April 2003 Overview 2 Background Randomized Rounding Handling Feasibility Derandomization Advanced Techniques Integer Programming
More informationTheoretical Computer Science
Theoretical Computer Science 411 (010) 417 44 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: wwwelseviercom/locate/tcs Resource allocation with time intervals
More informationOptimal Tree-decomposition Balancing and Reachability on Low Treewidth Graphs
Optimal Tree-decomposition Balancing and Reachability on Low Treewidth Graphs Krishnendu Chatterjee Rasmus Ibsen-Jensen Andreas Pavlogiannis IST Austria Abstract. We consider graphs with n nodes together
More informationP and NP. Warm Up: Super Hard Problems. Overview. Problem Classification. Tools for classifying problems according to relative hardness.
Overview Problem classification Tractable Intractable P and NP Reductions Tools for classifying problems according to relative hardness Inge Li Gørtz Thank you to Kevin Wayne, Philip Bille and Paul Fischer
More informationScheduling and Optimization Course (MPRI)
MPRI Scheduling and optimization: lecture p. /6 Scheduling and Optimization Course (MPRI) Leo Liberti LIX, École Polytechnique, France MPRI Scheduling and optimization: lecture p. /6 Teachers Christoph
More informationMassachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr.
Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Radhika Nagpal Quiz 1 Appendix Appendix Contents 1 Induction 2 2 Relations
More informationClassical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems
Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems Rani M. R, Mohith Jagalmohanan, R. Subashini Binary matrices having simultaneous consecutive
More informationCS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle
8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,
More informationGeneral Methods for Algorithm Design
General Methods for Algorithm Design 1. Dynamic Programming Multiplication of matrices Elements of the dynamic programming Optimal triangulation of polygons Longest common subsequence 2. Greedy Methods
More informationCSE 202 Homework 4 Matthias Springer, A
CSE 202 Homework 4 Matthias Springer, A99500782 1 Problem 2 Basic Idea PERFECT ASSEMBLY N P: a permutation P of s i S is a certificate that can be checked in polynomial time by ensuring that P = S, and
More information1 Non-deterministic Turing Machine
1 Non-deterministic Turing Machine A nondeterministic Turing machine is a generalization of the standard TM for which every configuration may yield none, or one or more than one next configurations. In
More informationNP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof
T-79.5103 / Autumn 2006 NP-complete problems 1 NP-COMPLETE PROBLEMS Characterizing NP Variants of satisfiability Graph-theoretic problems Coloring problems Sets and numbers Pseudopolynomial algorithms
More informationComputational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs
Computational Complexity IE 496 Lecture 6 Dr. Ted Ralphs IE496 Lecture 6 1 Reading for This Lecture N&W Sections I.5.1 and I.5.2 Wolsey Chapter 6 Kozen Lectures 21-25 IE496 Lecture 6 2 Introduction to
More informationTree Decompositions and Tree-Width
Tree Decompositions and Tree-Width CS 511 Iowa State University December 6, 2010 CS 511 (Iowa State University) Tree Decompositions and Tree-Width December 6, 2010 1 / 15 Tree Decompositions Definition
More informationDynamic Programming( Weighted Interval Scheduling)
Dynamic Programming( Weighted Interval Scheduling) 17 November, 2016 Dynamic Programming 1 Dynamic programming algorithms are used for optimization (for example, finding the shortest path between two points,
More informationLimitations of Algorithm Power
Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying
More informationSome Algebra Problems (Algorithmic) CSE 417 Introduction to Algorithms Winter Some Problems. A Brief History of Ideas
CSE 417 Introduction to Algorithms Winter 2007 Some Algebra Problems (Algorithmic) Given positive integers a, b, c Question 1: does there exist a positive integer x such that ax = c? NP-Completeness (Chapter
More informationECS122A Handout on NP-Completeness March 12, 2018
ECS122A Handout on NP-Completeness March 12, 2018 Contents: I. Introduction II. P and NP III. NP-complete IV. How to prove a problem is NP-complete V. How to solve a NP-complete problem: approximate algorithms
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory The class NP Haniel Barbosa Readings for this lecture Chapter 7 of [Sipser 1996], 3rd edition. Section 7.3. Question Why are we unsuccessful
More informationComplexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler
Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard
More informationOutline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.
Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität
More informationIntroduction to Spring 2009 Artificial Intelligence Midterm Exam
S 188 Introduction to Spring 009 rtificial Intelligence Midterm Exam INSTRUTINS You have 3 hours. The exam is closed book, closed notes except a one-page crib sheet. Please use non-programmable calculators
More informationPreliminaries and Complexity Theory
Preliminaries and Complexity Theory Oleksandr Romanko CAS 746 - Advanced Topics in Combinatorial Optimization McMaster University, January 16, 2006 Introduction Book structure: 2 Part I Linear Algebra
More informationMore Dynamic Programming
CS 374: Algorithms & Models of Computation, Spring 2017 More Dynamic Programming Lecture 14 March 9, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 42 What is the running time of the following? Consider
More informationCombinatorial Optimization
Combinatorial Optimization Problem set 8: solutions 1. Fix constants a R and b > 1. For n N, let f(n) = n a and g(n) = b n. Prove that f(n) = o ( g(n) ). Solution. First we observe that g(n) 0 for all
More informationThere are two types of problems:
Np-complete Introduction: There are two types of problems: Two classes of algorithms: Problems whose time complexity is polynomial: O(logn), O(n), O(nlogn), O(n 2 ), O(n 3 ) Examples: searching, sorting,
More informationCS 350 Algorithms and Complexity
1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower
More informationTheory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death
Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer Science University of Virginia www.cs.virginia.edu/~njb2b/theory
More informationPolynomial-time reductions. We have seen several reductions:
Polynomial-time reductions We have seen several reductions: Polynomial-time reductions Informal explanation of reductions: We have two problems, X and Y. Suppose we have a black-box solving problem X in
More informationData Structures and Algorithms " Search Trees!!
Data Structures and Algorithms " Search Trees!! Outline" Binary Search Trees! AVL Trees! (2,4) Trees! 2 Binary Search Trees! "! < 6 2 > 1 4 = 8 9 Ordered Dictionaries" Keys are assumed to come from a total
More informationMore Dynamic Programming
Algorithms & Models of Computation CS/ECE 374, Fall 2017 More Dynamic Programming Lecture 14 Tuesday, October 17, 2017 Sariel Har-Peled (UIUC) CS374 1 Fall 2017 1 / 48 What is the running time of the following?
More information4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle
Directed Hamiltonian Cycle Chapter 8 NP and Computational Intractability Claim. G has a Hamiltonian cycle iff G' does. Pf. Suppose G has a directed Hamiltonian cycle Γ. Then G' has an undirected Hamiltonian
More informationNP-Complete Problems
NP-Complete Problems Max Bisection Is NP-Complete max cut becomes max bisection if we require that S = V S. We shall reduce the more general max cut to max bisection. Add V isolated nodes to G to yield
More informationLecture 13, Fall 04/05
Lecture 13, Fall 04/05 Short review of last class NP hardness conp and conp completeness Additional reductions and NP complete problems Decision, search, and optimization problems Coping with NP completeness
More information