0 Up votes0 Down votes

43 views6 pagesIt is homework 1 of convex optimization.

Jan 04, 2017

© © All Rights Reserved

PDF, TXT or read online from Scribd

It is homework 1 of convex optimization.

© All Rights Reserved

43 views

It is homework 1 of convex optimization.

© All Rights Reserved

- Steve Jobs
- Wheel of Time
- NIV, Holy Bible, eBook
- NIV, Holy Bible, eBook, Red Letter Edition
- Cryptonomicon
- The Woman Who Smashed Codes: A True Story of Love, Spies, and the Unlikely Heroine who Outwitted America's Enemies
- Contagious: Why Things Catch On
- Crossing the Chasm: Marketing and Selling Technology Project
- Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are
- Zero to One: Notes on Start-ups, or How to Build the Future
- Console Wars: Sega, Nintendo, and the Battle that Defined a Generation
- Dust: Scarpetta (Book 21)
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Crushing It!: How Great Entrepreneurs Build Their Business and Influence—and How You Can, Too
- Make Time: How to Focus on What Matters Every Day
- Algorithms to Live By: The Computer Science of Human Decisions
- Wild Cards

You are on page 1of 6

Vandenberghe

Homework assignment #1

1. Least-squares fit of a circle to points. In this problem we use least-squares to fit a circle

to given points (ui , vi ) in a plane, as shown in the figure.

We use (uc , vc ) to denote the center of the circle and R for its radius. A point (u, v) is

on the circle if (u uc )2 + (v vc )2 = R2 . The fitting problem can be formulated as

an optimization problem

minimize

m

P

i=1

((ui uc )2 + (vi vc )2 R2 )

(a) Show that this optimization problem can be written as a linear least-squares

minimize kAx bk22

(1)

x 1 = uc ,

x2 = v c ,

x3 = u2c + vc2 R2 .

(b) Use the normal equations AT Ax = AT b of the least-squares problem to show that

the optimal solution x of the least-squares problem satisfies

x21 + x22 x3 0.

This is necessary to compute R =

(c) Test your formulation on the problem data in the file circlefit.m on the course

website. The commands

circlefit;

plot(u, v, o);

axis equal

will create a plot of the m = 50 points (ui , vi ) in the figure.

Use the MATLAB command x = A \ b to solve the least squares problem (1).

2. This problem is an introduction to the MATLAB software package CVX that will be

used in the course. CVX can be downloaded from www.cvxr.com.

Python users are welcome to use CVXPY (cvxpy.org) instead of CVX and MATLAB.

Although the problem assignment is written for MATLAB and CVX, the modifications

should be straightforward if you are familiar with Python.

We consider the illumination problem of lecture 1. We take Ides = 1 and pmax = 1, so

the problem is

minimize f0 (p) = max | log(aTk p)|

k=1,...,n

(2)

subject to 0 pj 1, j = 1, . . . , m,

with variable p Rm . As mentioned in the lecture, the problem is equivalent to

max h(aTk p)

minimize

(3)

k=1,...,n

subject to 0 pj 1,

j = 1, . . . , m,

where h(u) = max{u, 1/u} for u > 0. The function h, shown in the figure below, is

nonlinear, nondifferentiable, and convex.

5

h(u)

0

0

f0 (p) =

=

k=1,...,n

k=1,...,n

k=1,...,n

k=1,...,n

and since the logarithm is a monotonically increasing function, minimizing f0 is equivalent to minimizing maxk=1,...,n h(aTk p).

The specific problem data are given in the file illum_data.m posted on the course

website. Executing this file in MATLAB creates the n m-matrix A (which has rows

aTk ). There are 10 lamps (m = 10) and 20 patches (n = 20).

Use the following methods to compute five approximate solutions and the exact solution, and compare the answers (the vectors p and the corresponding values of f0 (p)).

(a) Equal lamp powers. Take pj = for j = 1, . . . , m. Plot f0 (p) versus over the

interval [0, 1]. Graphically determine the optimal value of , and the associated

objective value. The objective function f0 (p) can be evaluated in MATLAB as

max(abs(log(A*p))).

(b) Least-squares with saturation. Solve the least-squares problem

minimize

n

X

k=1

If the solution has negative coefficients, set them to zero; if some coefficients are

greater than 1, set them to 1. Use the MATLAB command x = A \ b to solve a

least-squares problem (minimize kAx bk22 ).

(c) Regularized least-squares. Solve the regularized least-squares problem

minimize

n

X

(aTk p 1)2 +

m

X

j=1

k=1

where > 0 is a parameter. Increase until all coefficients of p are in the interval

[0, 1].

(d) Chebyshev approximation. Solve the problem

minimize

k=1,...,n

subject to 0 pj 1,

j = 1, . . . , m.

h(u) by a piecewise-linear function |u 1| + 1. As shown in the figure below, this

is a good approximation around u = 1.

3

4

3.5

|u 1| + 1

3

2.5

2

1.5

1

0.5

0

0

0.5

1.5

This problem can be converted to a linear program and solved using the MATLAB

function linprog. It can also be solved directly in CVX, using the expression

norm(A*p - 1, inf) to specify the cost function.

(e) Piecewise-linear approximation. We can improve the accuracy of the previous

method by using a piecewise-linear approximation of h with more than two segments. To construct a piecewise-linear approximation of 1/u, we take the pointwise maximum of the first-order approximations

h(u) 1/

u (1/

u2 )(u u) = 2/

u u/

u2 ,

at a number of different points u. This is shown below, for u = 0.5, 0.8, 1. In

other words,

hpwl (u) = max{u,

1

2

1

2

u,

u, 2 u}.

2

0.5 0.5

0.8 0.82

4

3.5

hpwl (u)

3

2.5

2

1.5

1

0.5

0

0

0.5

1.5

minimize

subject to

k=1,...,n

0 pj 1,

j = 1, . . . , m

(f) Exact solution. Finally, use CVX to solve

minimize

k=1,...,n

subject to 0 pj 1,

j = 1, . . . , m.

Use the CVX function inv_pos() to expresss the function f (x) = 1/x with

domain R++ .

3. Let X be a symmetric matrix partitioned as

X=

"

A B

BT C

(4)

A in X. It can be shown that if A is positive definite, then X 0 (X is positive

semidefinite) if and only if S 0 (see page 650 of the textbook). In this exercise we

prove the extension of this result to singular A mentioned on page 651 of the textbook.

(a) Suppose A = 0 in (4). Show that X 0 if and only if B = 0 and C 0.

(b) Let A be a symmetric n n matrix with eigenvalue decomposition

A = QQT ,

where Q is orthogonal (QT Q = QQT = I) and = diag(1 , 2 , . . . , n ). Assume

the first r eigenvalues i are nonzero and r+1 = = n = 0. Partition Q and

as

#

"

h

i

1 0

Q = Q1 Q2 ,

=

0 0

with Q1 of size n r, Q2 of size n (n r), and 1 = diag(1 , . . . , r ). The

matrix

T

A = Q1 1

1 Q1

is called the pseudo-inverse of A. Verify that

AA = A A = Q1 QT1 ,

I AA = I A A = Q2 QT2 .

vector x on the range of A. The matrix-vector product (I AA )x = Q2 QT2 x is

the projection on the nullspace.

5

(c) Show that the block matrix X in (4) is positive semidefinite if and only if

A 0,

(I AA )B = 0,

C B T A B 0.

(The second condition means that the columns of B are in the range of A.)

Hint. Let A = QQT be the eigenvalue decomposition of A. The matrix X in (4)

is positive semidefinite if and only if the matrix

"

QT 0

0 I

#"

A B

BT C

#"

Q 0

0 I

"

QT B

BT Q

C

is positive semidefinite. Use the observation in part (a) and the Schur complement

characterization for positive definite 2 2 block matrices to show the result.

- Vibrations Tutorial2Uploaded byThanakit Rattanasintaweesuk
- vol13_pp153-156Uploaded bybasiya2008
- On Conjugate EP Matrices in Indefinite Inner Product SpacesUploaded byIOSRjournal
- Exponential Image Filter Design for Uncertain Takagi–Sugeno Fuzzy Systems With Time DelayUploaded byAnonymous DgWkoyXPA
- Notes on MATLABUploaded bySVR07
- 1-s2.0-002437959190239S-mainUploaded byVanessa Garcez
- Nonlinear Regression PerrinUploaded byErnest Guiller Suganob Pineda
- Visual Numerics - IMSL C Numerical LibrariesUploaded bykouddane2000
- Math103!4!4 MxOperationsUploaded byaloove66
- project 3 fixingUploaded byapi-403978095
- Step for Peak Picking MethodUploaded byanon_321205807
- Adjustment Computation Notes by UotilaUploaded bytangdc99
- 5099-1-8857-1-10-20130718.pdfUploaded byRahul Bansal
- Introduction to Physical System ModellingUploaded byhroark1
- Intro_GGUploaded byKhairul Fajri
- 20131004_Comel_II_Intro_MatlabUploaded bySoroush_Blaster
- Yearly Plan Math Form5Uploaded bysyarel
- Operations on Matrices.docxUploaded byAngelinaGupta
- LAUploaded byHassaan Ahmad
- 13-ParallelAlgorithmsUnderlyingMPIImplementationsUploaded byapi-27351105
- Intro to Matrices.pptxUploaded bynando
- 1 matricni operaciiUploaded byReal Mci
- Bioucas Figueiredo Whispers v2Uploaded byM.D. Iordache
- PracticalUploaded byRahul_Khanna_910
- MFEMD.Ch16.pdfUploaded byZaryan Ijaz
- Statistics Toolbox in MatlabUploaded byVarsha Sarava
- Format of the Stiffness Matrix and Load Vector Output in Nastran Pch FileUploaded bykspetsnaz
- (Methods in Experimental Physics 2) E. Bleuler and R.O. Haxby (Eds.)-Electronic Methods-Academic Press, Elsevier (1964)Uploaded byNarongrit Maneejiraprakarn
- 00606498.pdfUploaded byyunierv
- Vectors and MatricesUploaded byrahul_reddy01

- Ee263 Ps1 SolUploaded byMorokot Angela
- hw2Uploaded byMorokot Angela
- hw3.pdfUploaded byMorokot Angela
- hw5Uploaded byMorokot Angela
- hw6Uploaded byMorokot Angela
- hw1Uploaded byMorokot Angela
- Convex OptmizationUploaded byKarrthik Sharma
- Bv Cvxbook Extra Exercises2Uploaded byMorokot Angela
- Bv Cvxbook Extra ExercisesUploaded byMorokot Angela
- hw6_2011_05_16_01_solutionsUploaded byMorokot Angela
- Class Supplement 1Uploaded byMorokot Angela
- final_sol_06.pdfUploaded byMorokot Angela

- Problem SheetUploaded byTim_Gns
- SPM Add Maths Paper 1 Practice QuestionsUploaded byManisha Sekaran Muniandy
- Dunman High School, Senior High Promotional ExaminationUploaded byMathathlete
- Course Outline Dbm 2013 Dis 2015Uploaded byilchwan
- A Detailed Lesson PlanUploaded bypreiquency
- Math 53 Samplex FinalsUploaded bykate_acama
- Form 2 Mathematics Yearly Teaching Scheme 2012Uploaded byiazs3028
- Basic Arithmetic Operations Short CutsUploaded bykarupu31081991
- Exponential Handout AlgebUploaded byKeilah Mizraim
- Analytic Geometry - Lecture fineUploaded byJosephbraken Balderama Labacanacruz
- SSC Mathematics Guide by DISHAUploaded byshoeflower
- Teoria Electromagnetica - Hayt - Solucionario CAPITULO 7 7ma EdicionUploaded byWilson Francisco Brito
- Set TheoryUploaded byVeerendra Nath
- Solving Linear InequalitiesUploaded bySha Mercs
- Simply Supported Rectangular PlateUploaded byJoshua Magat
- An Elementary Course in the Integral CalculusUploaded byHariharan Subramaniyan
- Multinominal logit regression Bohning.pdfUploaded byDao Phuong Anh
- 3-2SolvSysElimAddSubUploaded byAlexjohn2009
- Gradient Divergence and Curl in Spherical CoordinatesUploaded byEddie
- 2015+NZMO+Olympiad+SolutionsUploaded byHoàng Long
- Suslina_SobolevraeumeUploaded bysmaliraissian
- Presentation a NuUploaded byRoopa Shree
- Model of a Heat Exchanger ( Hyperbolic PDE)Uploaded byDionysios Zelios
- Pais & Kausel, Approx Stiff SDE (Corrected)Uploaded bystraulle
- LCM & HCFUploaded byRaghu
- Tips for Math CalculationUploaded byMayur Sharma
- bsc1_maths3-1Uploaded byPrakash Narayan Singh
- 52083902-MITUploaded byCostanza_David
- Tutorial SAGEUploaded byWilliam Perez
- ConverseUploaded byAimee Adaya Hernandez

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.