EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 18

Similar documents
8. Geometric problems

8. Geometric problems

9. Geometric problems

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 17

Convex Optimization M2

Geometric problems. Chapter Projection on a set. The distance of a point x 0 R n to a closed set C R n, in the norm, is defined as

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machine (continued)

4. Convex optimization problems

Lecture: Convex Optimization Problems

Convex Optimization in Classification Problems

A Brief Review on Convex Optimization

Machine Learning. Support Vector Machines. Manfred Huber

Convex Optimization and Support Vector Machine

Mark your answers ON THE EXAM ITSELF. If you are not sure of your answer you may wish to provide a brief explanation.

Nonlinear Programming Models

Linear & nonlinear classifiers

Convex optimization problems. Optimization problem in standard form

Non-Bayesian Classifiers Part II: Linear Discriminants and Support Vector Machines

Support Vector Machine (SVM) and Kernel Methods

Linear & nonlinear classifiers

ICS-E4030 Kernel Methods in Machine Learning

Support Vector Machines: Maximum Margin Classifiers

Statistical Pattern Recognition

Support Vector Machines

CS675: Convex and Combinatorial Optimization Fall 2016 Convex Optimization Problems. Instructor: Shaddin Dughmi

Jeff Howbert Introduction to Machine Learning Winter

Support Vector Machines for Classification and Regression. 1 Linearly Separable Data: Hard Margin SVMs

CS295: Convex Optimization. Xiaohui Xie Department of Computer Science University of California, Irvine

LECTURE 7 Support vector machines

Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012

Support Vector Machines for Classification and Regression

CS-E4830 Kernel Methods in Machine Learning

Machine Learning Support Vector Machines. Prof. Matteo Matteucci

ML (cont.): SUPPORT VECTOR MACHINES

4. Convex optimization problems

Semidefinite Programming Basics and Applications

Lecture 2: Convex Sets and Functions

Support Vector Machines for Classification: A Statistical Portrait

Support Vector Machines

L5 Support Vector Classification

Data Mining. Linear & nonlinear classifiers. Hamid Beigy. Sharif University of Technology. Fall 1396

Problems in VLSI design

CS6375: Machine Learning Gautam Kunapuli. Support Vector Machines

Statistical Methods for SVM

Support Vector Machines

HW1 solutions. 1. α Ef(x) β, where Ef(x) is the expected value of f(x), i.e., Ef(x) = n. i=1 p if(a i ). (The function f : R R is given.

Support Vector Machines (SVM) in bioinformatics. Day 1: Introduction to SVM

Convex Optimization and Modeling

Lecture Notes on Support Vector Machine

Lecture 1 Introduction

Machine Learning. Lecture 6: Support Vector Machine. Feng Li.

Support Vector Machines

EE364 Review Session 4

Lecture 8. Strong Duality Results. September 22, 2008

ELE539A: Optimization of Communication Systems Lecture 16: Pareto Optimization and Nonconvex Optimization

LMI Methods in Optimal and Robust Control

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Linear vs Non-linear classifier. CS789: Machine Learning and Neural Network. Introduction

LP Duality: outline. Duality theory for Linear Programming. alternatives. optimization I Idea: polyhedra

Convex envelopes, cardinality constrained optimization and LASSO. An application in supervised learning: support vector machines (SVMs)

Lecture Note 5: Semidefinite Programming for Stability Analysis

Constrained Optimization and Lagrangian Duality

Support Vector Machines. Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar

The Lagrangian L : R d R m R r R is an (easier to optimize) lower bound on the original problem:

Support Vector Machines. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

Support Vector Machines Explained

Multi-class SVMs. Lecture 17: Aykut Erdem April 2016 Hacettepe University

MIT Algebraic techniques and semidefinite optimization February 14, Lecture 3

Solving the MWT. Recall the ILP for the MWT. We can obtain a solution to the MWT problem by solving the following ILP:

Lecture 10: Support Vector Machine and Large Margin Classifier

Short Course Robust Optimization and Machine Learning. 3. Optimization in Supervised Learning

CSCI5654 (Linear Programming, Fall 2013) Lectures Lectures 10,11 Slide# 1

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Support Vector Machines, Kernel SVM

Support Vector Machines

Convex Optimization: Applications

Nonlinear Programming (Hillier, Lieberman Chapter 13) CHEM-E7155 Production Planning and Control

EE613 Machine Learning for Engineers. Kernel methods Support Vector Machines. jean-marc odobez 2015

Lecture 16: Modern Classification (I) - Separating Hyperplanes

Lecture Support Vector Machine (SVM) Classifiers

Lecture: Examples of LP, SOCP and SDP

Convex Optimization M2

Constrained optimization

12. Interior-point methods

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 2

Kernel Methods. Machine Learning A W VO

ELE539A: Optimization of Communication Systems Lecture 6: Quadratic Programming, Geometric Programming, and Applications

CSCI : Optimization and Control of Networks. Review on Convex Optimization

Outline. Relaxation. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING. 1. Lagrangian Relaxation. Lecture 12 Single Machine Models, Column Generation

Lecture 9: Large Margin Classifiers. Linear Support Vector Machines

Convex Optimization Boyd & Vandenberghe. 5. Duality

Modelli Lineari (Generalizzati) e SVM

Sequential Convex Programming

Kernel Machines. Pradeep Ravikumar Co-instructor: Manuela Veloso. Machine Learning

5. Duality. Lagrangian

Support Vector Machines and Kernel Methods

Perceptron Revisited: Linear Separators. Support Vector Machines

Extreme Abridgment of Boyd and Vandenberghe s Convex Optimization

Transcription:

EE/ACM 150 - Applications of Convex Optimization in Signal Processing and Communications Lecture 18 Andre Tkacenko Signal Processing Research Group Jet Propulsion Laboratory May 31, 2012 Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 1 / 26

Outline 1 Classification Introduction Linear Discrimination Nonlinear Discrimination 2 Placement and Location Introduction Linear Facility Location Problems Placement Constraints Nonlinear Facility Location Problems Location Problems with Path Constraints 3 Floor Planning Introduction Relative Positioning Constraints Floor Planning Via Convex Optimization Floor Planning Via Geometric Programming Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 2 / 26

Classification Introduction Introduction to Classification In pattern recognition and classification problems, we are given two sets of points in R n, say {x 1,..., x M } and {y 1,..., y N }, and we wish to find a function f : R n R (say, within a given family of functions), such that we have the following. f(x i) > 0, i = 1,..., M, f(y i) < 0, i = 1,..., N. If these inequalities hold, we say that f (or specifically its 0-level set {x : f(x) = 0}) separates, classifies, or discriminates the two sets of points. If only weak versions of the inequalities hold (i.e., and, respectively), then we refer to this as weak separation. This classification problem (including the weak relaxation) need not be feasible. {x 1,..., x M } {x : f(x) = 0} {y 1,..., y N } Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 3 / 26

Classification Linear Discrimination Linear Discrimination and Interpretations In linear discrimination, we seek an affine function f(x) = a T x b that classifies the points, i.e., a T x i b > 0, i = 1,..., M, a T y i b < 0, i = 1,..., N. Geometrically, we seek a hyperplane which separates the points. As the strict inequalities are homogeneous in a and b, they are feasible if and only if the following nonstrict inequalities a T x i b 1, i = 1,..., N, a T y i b 1, i = 1,..., N, are feasible in a R n and b R. Note that such constraints are affine and, as such, convex. Linear discrimination alternative interpretation: The strong alternative of the set of strict inequalities is the existence of λ and µ such that λ 0, µ 0, (λ, µ) 0, M i=1 λ ix i = N i=1 µ iy i, 1 T λ = 1 T µ. Here, λ R M and µ R N. Equivalently, this alternative can be expressed as follows. λ 0, 1 T λ = 1, µ 0, 1 T µ = 1, M i=1 λ ix i = N i=1 µ iy i. This means there is a point in the convex hull of both {x 1,..., x M } and {y 1,..., y N }. So, two sets of points can be linearly discriminated if and only if their convex hulls do not intersect. {x1,..., xm } {x : f(x) = 0} {x1,..., xm } {x : f(x) = 0} {y1,..., yn } {y1,..., yn } Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 4 / 26

Classification Robust Linear Discrimination Linear Discrimination In robust linear discrimination, we seek to separate the two sets of points by the maximum possible margin hyperplane (or, equivalently, the thickest slab). As the Euclidean distance between the hyperplanes H 1 = { z : a T z b = 1 } and H 2 = { z : a T z b = 1 } is given by dist(h 1, H 2 ) = 2/ a 2, the maximum margin hyperplane can be found by solving the problem, minimize (1/2) a 2 subject to a T x i b 1, i = 1,..., M a T y i b 1, i = 1,..., N, which (after squaring the objective) becomes a QP in a R n and b R. Lagrange dual of maximum margin separation problem: maximize 1 T λ + 1 T µ subject to 2 M i=1 λ ix i N i=1 µ 2 iy i 1. 1 T λ = 1 T µ, λ 0, µ 0 From duality, the optimal value of the dual is the inverse of the maximum margin of separation. Interpretation: Change variables to θ i = λ i /1 T λ, γ i = µ i /1 T µ, and t = 1/ ( 1 T λ + 1 T µ ). Invert the objective to minimize 1/ ( 1 T λ + 1 T µ ) = t, yielding the following problem. minimize t subject to M i=1 θ ix i N i=1 γ 2 iy i t. θ 0, 1 T θ = 1, γ 0, 1 T γ = 1 The optimal value of this problem is the distance between the convex hulls of the sets of points. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 5 / 26

Classification Linear Discrimination Approximate Linear Separation of Non-Separable Sets The two sets of points {x 1,..., x M } and {y 1,..., y N } need not be separable by a hyperplane, which occurs if their convex hulls intersect. In this case, we can relax the classification requirements a T x i b 1 for i = 1,..., M and a T y i b 1 for i = 1,..., N by introducing nonnegative variables u R M and v R N and forming the approximate separation conditions, a T x i b 1 u i, i = 1,..., M, a T y i b (1 v i ), i = 1,..., N. These new conditions can always be made feasible by making u and v large enough. Our goal is to find a, b, and sparse nonnegative u and v that satisfy these inequalities. As a heuristic for this, we can minimize the sum of the components of u and v, which leads to the following problem. minimize subject to 1 T u + 1 T v a T x i b 1 u i, i = 1,..., M a T y i b (1 v i ), i = 1,..., N u 0, v 0. This problem is an LP in a R n, b R, u R M, and v R N. At an optimum, u i = max { 0, 1 a T x i + b } and v i = max { 0, 1 + a T y i b }. It can be interpreted as a heuristic for minimizing the number of misclassified points. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 6 / 26

Classification Support Vector Machine Linear Discrimination A support vector machine (SVM) (sometimes called a support vector classifier) represents a trade-off between the width of the slab { z : 1 a T z b 1 } (given by 2/ a 2 ) and the number of misclassified points. Specifically, an SVM combines robust linear discrimination with the approximate linear separation heuristic described above. Support Vector Machine (SVM) Problem: ( ) minimize a 2 + γ 1 T u + 1 T v subject to a T x i b 1 u i, i = 1,..., M a T y i b (1 v i ), i = 1,..., N u 0, v 0 Here, γ > 0 is the trade-off parameter between slab width and # of misclassified points. The solution produces a point on the optimal trade-off curve between inverse of margin 2/ a 2 and classification error, measured by the total slack 1 T u + 1 T v.. Same example data as in previous slide, with γ = 0.1: Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 7 / 26

Classification Linear Discrimination Linear Discrimination and Logistic Modeling Another approach to approximately classify the two sets of points when they cannot be linearly separated is based on the logistic model. Specifically, we fit the sets of points to a logistic model. Let z {0, 1} be a random variable with ( ( )) Pr{z = 0} = 1/ 1 + exp a T u b, ( ( )) ( ( )) Pr{z = 1} = exp a T u b / 1 + exp a T u b, where u R n is the explanatory variable of the logistic model. Then, {x 1,..., x M } and {y 1,..., y N } are the respective values of u for the M and N samples for which z = 0 and z = 1. We can then determine a and b using ML estimation, by solving the convex optimization problem minimize l(a, b), with variables a R n and b R, where l is the log-likelihood function M ( ( )) N ( ) N ( ( )) l(a, b) = log 1 + exp a T x i b + a T y i b log 1 + exp a T y i b. i=1 i=1 If the data points truly come from a logistic model, then the affine classifier f(z) = (a ) T z b has the smallest probability of misclassification among all affine classifiers. The hyperplane a T u = b corresponds to the points where Pr{z = 0} = Pr{z = 1} = 1/2, i.e, the two outcomes are equally likely. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 8 / 26 i=1

Classification Nonlinear Discrimination Introduction to Nonlinear Discrimination In many cases, we can separate two sets of points {x 1,..., x M } and {y 1,..., y N } by a nonlinear function f : R n R as follows. f(x i ) > 0, i = 1,..., M, f(y i ) < 0, i = 1,..., N. Linearly parameterized family of functions: One way to do this is to choose a linearly parametrized family of functions f(z) = θ T f(z), where θ R k is a parameter vector and f(z) (f 1 (z),..., f k (z)) : R n R k is a vector of basis functions. With this linearly parametrized construction, the above inequalities can be solved in the exactly the same way as in linear discrimination. Specifically, as f is homogeneous in θ, we solve a set of affine inequalities in θ: θ T f(x i ) 1, i = 1,..., M, θ T f(y i ) 1, i = 1,..., N. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 9 / 26

Classification Nonlinear Discrimination Quadratic Discrimination Suppose that f(z) = z T Pz + q T z + r, where the parameters to be chosen are P S n, q R n, and r R. Here, we must satisfy the affine inequalities x T i Px i + q T x i + r 1, i = 1,..., M, y T i Py i + q T y i + r 1, i = 1,..., N. We can also pose additional constraints. For example, we can require P 0, which means that the separating surface is ellipsoidal. In other words, we seek an ellipsoid containing all the points {x 1,..., x M }, but none of the points {y 1,..., y N }. This quadratic discrimination problem can then be solved as an SDP feasibility problem: find subject to P, q, r x T i Px i + q T x i + r 1, i = 1,..., M y T i Py i + q T y i + r 1, i = 1,..., N P I with variables P S n, q R n, and r R. (Here, we use homogeneity in P, q, and r to express the constraint P 0 as P I.), Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 10 / 26

Classification Polynomial Discrimination Nonlinear Discrimination Consider the set of polynomials on R n with degree less than or equal to d: f(z) = a i1,...,i d z i 1 1 zn in. i 1 + +i n d Note that this can be expressed as f(z) = θ T f(z), where θ is a vector of all the coefficients a i1,...,i d and f(z) consists of all monomials up to the given degree of d. By solving the discrimination feasibility problem find subject to θ θ T f(x i ) 1, i = 1,..., M θ T f(y i ) 1, i = 1,..., N we check, geometrically, whether the two sets can be separated by an algebraic surface. As the degree is a quasiconvex function of the coefficients, we can find the minimum degree polynomial on R n that separates two sets of points via quasiconvex programming., No cubic polynomial can separate the points (left), whereas a quartic polynomial can do so (right). Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 11 / 26

Placement and Location Introduction Introduction to Placement and Location Problems We are given N points with coordinates x i R k, where k = 2 or k = 3. Some of the locations x i are given, while the other positions x i are variables. For each pair of points, we associate a cost function f i,j(x i, x j). Placement Problem: minimize (i,j) A f i,j(x i, x j). Here, A is the set of all links in the graph described by the N points or nodes. Alternatively, the objective can be expressed as a sum over all arcs (i, j) if we set f i,j = 0 when links i and j are not connected. The variables are the positions of the free points. Interpretations: The points may represent plants or warehouses; f i,j could be the transportation cost between facilities i and j. The points may represent cells on an integrated circuit (IC); f i,j could then represent the wirelength. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 12 / 26

Placement and Location Linear Facility Location Problems Linear Facility Location Problems The simplest version of the placement problem occurs when the cost function f i,j is a linear function of the distance between nodes i and j. In other words, we have f i,j(x i, x j) = w i,j x i x j, where w i,j 0 is a weight parameter. By proper choice of the weights w i,j, the placement problem objective can be expressed in the following two ways. (i,j) A wi,j xi xj = i<j wi,j xi xj. For this choice of cost function, the placement problem is always convex. Examples: One free point (u, v) R 2 with fixed points (u 1, v 1),..., (u K, v K). l 1-norm: When w i,j = 1 for all i, j, the objective is K i=1 ( u ui + v vi ). An optimal point is any median of the fixed points. That is, u and v can be taken to be any median of the points {u 1,..., u K} and {v 1,..., v K}, respectively. Euclidean norm: When w i,j = 1 for all i, j, the objective is K ( i=1 (u ui) 2 + (v v i) 2) 1/2. The point (u, v) that minimizes this is called the geometric median or the Fermat-Weber point of the given fixed points. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 13 / 26

Placement and Location Types of Placement Constraints Placement Constraints There are several interesting constraints that can be included in the placement problem which preserve convexity. We can require some positions x i to lie in a specified convex set, e.g., a particular line, interval, square, or ellipsoid. The relative position of one point with respect to one or more other points can be constrained. For example, we can limit the distance between a pair of points. We can impose relative position constraints, e.g., that one point must lie to the left of another point. Several bounding box constraints can be included. The bounding box of a group of points is the smallest rectangle that contains the points. For example, we can constrain the points x 1,..., x p to lie in a bounding box with perimeter not exceeding P max by adding the constraints u x i v, i = 1,..., p, 21 T (v u) P max, where u R k and v R k are additional variables. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 14 / 26

Placement and Location Nonlinear Facility Location Problems Nonlinear Facility Location Problems A generalization of the linear facility location problem occurs when we take the cost function to be f i,j (x i, x j ) = w i,j h( x i x j ), where w i,j 0 is a weight parameter and h is a nondecreasing (on R + ) and convex function. In this case, we call the associated problem a nonlinear placement or facility location problem. Examples: Quadratic placement problem: When the Euclidean norm is used with h(z) = z 2, we obtain the quadratic placement problem. As an example, when there is one free point x and fixed points x 1,..., x K, and w i,j = 1 for all i, j, the placement problem becomes minimize x x 1 2 2 + + x x K 2 2. This has the optimal solution x = (x 1 + + x K ) /K, which is the average or centroid of the fixed points. Power function: (with power p 1) h(z) = z p. Deadzone-linear function: (with deadzone width 2γ) { 0, z γ h(z) = z γ, z > γ Quadratic-linear function: (with quadratic width 2γ) { z 2, z γ h(z) = 2γ z γ 2, z > γ Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 15 / 26..

Placement and Location Nonlinear Facility Location Problems Comparison Between Linear and Nonlinear Placement Example: Minimize (i,j) A h( x i x j 2 ), with 6 free points (red dots), 8 fixed points (blue squares), and 27 links (black dotted lines). Optimal placement for h(z) = z, h(z) = z 2, and h(z) = z 4 (from left to right, respectively). 1 1 1 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0 0 0 0.2 0.2 0.2 0.4 0.4 0.4 0.6 0.6 0.6 0.8 0.8 0.8 1 1 1 1 0.5 0 0.5 1 1 0.5 0 0.5 1 1 0.5 0 0.5 1 Histograms of respective connection lengths x i x j 2 for h(z) = z, h(z) = z 2, and h(z) = z 4. 4.5 4.5 4 4 6 3.5 3.5 5 3 2.5 3 2.5 4 2 2 3 1.5 1.5 2 1 0.5 1 0.5 1 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 0 0.5 1 1.5 0 0 0.5 1 1.5 Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 16 / 26

Placement and Location Location Problems with Path Constraints Path Constraints A p-link path along the points x 1,..., x N is described by a sequence of nodes, i 0,..., i p {1,..., N}. The length of the path is given by x i1 x i0 + x i2 x i1 + + xip x ip 1. The path length is a convex function of x 1,..., x N. As a result of the convexity of the path length, imposing an upper bound on the length of a path is a convex constraint. Several interesting placement problems involve path constraints, or have an objective based on path lengths. One typical example is the minimax delay placement problem, in which the objective is based on a maximum path length over a set of paths. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 17 / 26

Placement and Location Minimax Delay Placement Problem Location Problems with Path Constraints To introduce the minimax delay placement problem, we first describe the topology characterizing the problem. We consider a directed, acyclic graph with nodes 1,..., N, and arcs or links represented by a set A of ordered pairs: (i, j) A if and only if an arc points from i to j. Node i is a source node if no arc A points to it; it is a sink node or destination node if no arc in A leaves from it. The arcs model a kind of flow, say of goods or information, in a network with nodes at positions x 1,..., x N. The flow starts at a source node, moves along a path from node to node, and ends up at a sink or destination node. We use the distance between successive nodes to model propagation time, or shipment time, of goods between nodes; the total delay or propagation time of a path is then proportional to the sum of the distances between successive nodes. Some node locations are fixed, while others are free. The goal is to choose the free node locations to minimize the maximum total delay, for any path from a source node to a sink node. This leads to a convex problem, since the objective T max max { x i1 x i0 + + xip x ip 1 : i0,..., i p is a source-sink path }, is a convex function of the locations x 1,..., x N. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 18 / 26

Placement and Location Location Problems with Path Constraints Minimax Delay Placement Problem (Continued) While the minimax delay placement problem is convex, the number of source-sink paths is exponential in the number of nodes or arcs, which can become quite large. However, the problem can be reformulated to avoid enumerating all sink-source paths. To show this, let τ k denote the maximum total delay of any path from node k to a sink node. Suppose node k has outgoing arcs to nodes j 1,..., j p. Then, based on a simple dynamic programming argument, we can show that τ k = max { x j1 x k + τ j1,..., x jp x k + τ jp }. The above equation gives a recursion for finding the maximum delay from any node. Specifically, we start at the sink nodes, and work backward until we reach all source nodes. The number of arithmetic operations required for this is approximately the number of links. With this recursion, the minimax delay placement problem can be expressed as minimize subject to max{τ k : k is a source node} τ k = 0, k is a sink node. τ k = max{ x j x k + τ j : there is an arc from k to j} This form of the problem, however, is not convex. By replacing the equality constraints with inequalities, we obtain an equivalent form of the problem that is convex. Introducing new variables T 1,..., T N as upper bounds on τ 1,..., τ N, the minimax delay placement problem can be expressed as the convex problem, minimize subject to max{t k : k is a source node} T k = 0, k is a sink node. T k max{ x j x k + T j : there is an arc from k to j} Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 19 / 26

Floor Planning Introduction Introduction to Floor Planning A floor planning problem is an extension of a placement problem in the following ways: The objects to be placed are rectangles or boxes aligned with the axes (as opposed to points), and must not overlap. Each rectangle or box to be placed can be reconfigured, within some limits. Typically, the objective is to minimize the size (e.g., area, volume, or perimeter) of the bounding box, i.e., the smallest box containing the boxes to be configured and placed. The non-overlap constraints make the general floor planning problem a complicated combinatorial optimization problem or rectangular packing problem. However, if the relative positioning of the boxes is specified, then several types of floor planning problems can be formulated as convex optimization problems. w i (x i, y i ) C i h i H W Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 20 / 26

Floor Planning Introduction Introduction to Floor Planning (Continued) We will focus on the two-dimensional case of floor planning here. Assumptions and required constraints: We have N cells or modules C 1,..., C N that are to be configured and placed in a rectangle with width W and height H, and lower left corner at the origin (0, 0). The geometry and position of the i-th cell is specified by its width w i and height h i, and the coordinates (x i, y i) of its lower left corner. The variables of the problem are x i, y i, h i, w i for i = 1,..., N, and the width W and height H of the bounding rectangle. We require the cells to lie inside the bounding rectangle, i.e., x i 0, y i 0, x i + w i W, y i + h i H, i = 1,..., N. We also require that the cells do not overlap, expect possibly on their boundaries: int(c i C j) = for i j. (A minimum clearance can be included as well.) This holds if and only if, for i j, C i is left of C j, or C i is right of C j, or C i is below C j, or C i is above C j. These geometric conditions correspond to the following inequalities, for i j. x i + w i x j, or x j + w j x i, or y i + h i y j, or y j + h j y i. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 21 / 26

Floor Planning Relative Positioning Constraints Relative Positioning Constraints To specify relative positioning constraints, we define relations L and B on pairs of nodes which specify whether cells are to the left of or below each other, respectively. We have that C i is to the left of C j if (i, j) L, and similarly C i is below C j if (i, j) B. This yields the following constraints for i, j = 1,..., N. x i + w i x j for (i, j) L, y i + h i y j for (i, j) B. We require that for each (i, j) with i j, one of the following must hold: (i, j) L, (j, i) L, (i, j) B, (j, i) B. In addition, (i, i) L and (i, i) B. This leads to a set of N (N 1) /2 affine inequalities. The relations L and B are anti-symmetric (i.e., (i, j) L (j, i) L) and transitive (i.e., (i, j) L, (j, k) L (i, k) L). Transitivity leads to removing redundant constraints. A minimal set of relative positioning constraints can be described using two directed acyclic graphs H (for horizontal) and V (for vertical). We have (i, j) L (similarly (i, j) B) if and only if there is a directed path in H (similarly V) from i to j. To ensure a relative positioning constraint for every pair of cells, we require that for every pair, there must be a directed path from one cell to the other in one of the graphs. H 1 2 3 5 4 2 4 1 1 3 5 V 3 5 4 2 Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 22 / 26

Floor Planning Relative Positioning Constraints Relative Positioning Constraints (Continued) We only need to impose the inequalities corresponding to the edges of the graphs H and V; the others follow from transitivity. So, for relative positioning, we need only enforce the following set of inequalities. x i + w i x j for (i, j) H, y i + h i y j for (i, j) V. In a similar way, the 4N bounding box inequalities, x i 0, y i 0, x i + w i W, y i + h i H, i = 1,..., N, can be reduced to a minimal equivalent set. For example, the constraint x i 0 need only be imposed on the left-most cells. Similarly, the inequalities x i + w i W need only be enforced for the right-most cells. Analogous results hold for the vertical bounding box inequalities. This leads to the following minimal equivalent set of bounding box inequalities. x i 0 for i L minimal, y i 0 for i B minimal, x i + w i W for i L maximal, y i + h i H for i B maximal. For the example above, a minimal set of horizontal relative positioning inequalities is given by x 1 0, x 2 0, x 4 0, x 5 + w 5 W, x 1 + w 1 x 3, x 2 + w 2 x 3, x 3 + w 3 x 5, x 4 + w 4 x 5. Similarly, a minimal set of vertical relative positioning inequalities is given by y 2 0, y 3 0, y 5 0, y 4 + h 4 H, y 5 + h 5 H, y 2 + h 2 y 1, y 1 + h 1 y 4, y 3 + h 3 y 4. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 23 / 26

Floor Planning Floor Planning Via Convex Optimization Floor Planning Convex Constraints For all floor planning problems considered here, we will take the objective to be the perimeter of the bounding box, i.e., 2 (W + H), which is a linear function of the variables. A list of several convex constraints that can be added to the floor planning problem in addition to the convex relative positioning and bounding box constraints is as follows. Minimum spacing: (ρ h i,j 0, ρv i,j 0) x i + w i + ρ h i,j x j for (i, j) H, and/or y i + h i + ρ v i,j y j for (i, j) V. Minimum cell area: (A i 0) w i h i A i w i A i /h i (w i h i ) 1/2 A 1/2 i log w i + log h i log A i. Aspect ratio constraints: (u i l i 0) l i w i /h i u i. 4 4 4 4 1 3 5 1 5 1 3 5 1 5 2 2 3 2 2 3 Examples using above ordering constraints, with the same minimum required spacing of ρ = 1, and the same aspect ratio constraint 1/5 w i /h i 5, but different minimum required cell areas A i. Here, the values of A i are chosen such that 5 i=1 A i is the same for each case. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 24 / 26

Floor Planning Floor Planning Via Convex Optimization Floor Planning Convex Constraints (Continued) Alignment constraints: We can impose that a cell is aligned with another cell or the boundary box in a certain way. All such conditions are affine equality constraints. Symmetry constraints: We can require pairs of cells to be symmetric about a vertical or horizontal axis, that can be fixed or floating. This leads to affine equality constraints. Similarity constraints: We can impose the width and/or height of cell i to be a scale factor, say a, of cell j, by imposing the linear equality constraints w i = aw j and/or h i = ah j. Containment constraints: We can require that a particular cell contains a given point or lies inside a given polyhedron, by imposing affine inequality constraints. Distance constraints: Several convex distance constraints can be imposed. For example, to limit the distance between the centers of cells i and j, we use the convex inequality (x i + w i /2, y i + h i /2) (x j + w j /2, y j + h j /2) D i,j. We can also require dist(c i, C j ) D i,j, by introducing four new variables u i, v i, u j, v j, and imposing the affine inequalities along with the convex inequality x i u i x i + w i, y i v i y i + h i, (u i, v i ) (u j, v j ) D i,j. l -norm: We have dist(c i, C j ) D i,j if and only if x j (x i + w i ) D i,j, y j (y i + h i ) D i,j, and y i (y j + h j ) D i,j. l 1 -norm or l 2 -norm: We have dist(c i, C j ) D i,j if and only if y j (y i + h i ) d v, y i (y j + h j ) d v, d v 0, and x j (x i + w i ) + d v D i,j for the l 1 -norm or (x j (x i + w i )) 2 + d 2 v D 2 i,j for the l 2-norm. Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 25 / 26

Floor Planning Floor Planning Via Geometric Programming Floor Planning Via Geometric Programming The floor planning problem can also be formulated as a GP in the variables x i, y i, w i, h i, W, H. Relative positioning and bounding box constraints: The relative positioning constraints can be expressed in the posynomial form, x ix 1 j + w ix 1 j 1 for (i, j) H, y iy 1 j + h iy 1 j 1 for (i, j) V. The bounding box constraints have the following posynomial form. x iw 1 + w iw 1 1 for i L maximal, y ih 1 + h ih 1 1 for i B maximal. Note that here, the constraints that x i 0 for i L minimal and y i 0 for i B minimal are implicit as a result of the domain of the GP problem formulation. Nuances of GP formulation of floor planning problem: We can minimize the bounding box area W H, since it is a posynomial. We can exactly specify the area of any cell, since w ih i = A i is a monomial equality constraint. Alignment, symmetry, and distance constraints cannot be handled with the GP formulation. Similarity can be handled with the GP formulation, where the scaling ratio can either be given or unspecified (in which case it can be treated as another variable). Andre Tkacenko (JPL) EE/ACM 150 - Lecture 18 May 31, 2012 26 / 26