代写F24 ECE 551 HW04代写R编程

F24 ECE 551

HW04, Due 11PM Thu. Oct. 03

Pr. 1.

(a) Prove the vec trick , i.e., for A ∈ F P ×M, X ∈ FM×N , B ∈ F N×Q. :

vec(AXB) = (B⊤ ⊗ A)vec(X),                           (1)

where vec(.) is the operator that stacks the columns of the input matrix into a vector, and ⊗ denotes the Kronecker product. Here we really mean transpose B⊤ even if B is complex valued!

(b) Suppose A, X, and B are all N × N dense matrices. Determine how many scalar-scalar multiplications are needed for the LHS vec(AXB) and compare to the number for the RHS (B⊤ ⊗ A)vec(X). Which version uses fewer?

One use of (1) is analyzing the 2D discrete Fourier transform. (DFT), which may be explored in later HW.

Pr. 2.

(Projection onto orthogonal complement of a 1D subspace)

(a) Determine an orthonormal basis for the orthogonal complement of the span of the vector 

(b) Determine an orthonormal basis for the orthogonal complement of the span of the vector 

(c) Determine (by hand, no Julia) the projection of the vector  onto the orthogonal complement of span({z}) without using the orthonormal basis you found in the previous part.

Hint. You may want to derive the general mathematical expression needed in the next part first, and then use that expression to solve this problem by hand.

(d) Write a function called orthcomp1 that projects an input vector y onto the orthogonal complement of span({x}) for an (nonzero) input vector x of the same length as y.

For full credit, your final version of the code must be computationally efficient, and it should be able to handle input vectors of length 10 million without running out of memory. Your code must not call svd or eig or I and the like. This problem can be solved in one line with elementary vector operations.

In Julia, your file should be named orthcomp1.jl and should contain the following function:

"""

z = orthcomp1(y, x)

Project `y` onto the orthogonal complement of `Span({x})`

# In:

* `y` vector

* `x` nonzero vector of same length, both possibly very long

# Out:

* `z` vector of same length

For full credit, your solution should be computationally efficient.

"""

function orthcomp1(y, x)

Email your solution as an attachment to [email protected].

Test your code yourself using the example above (and others) before submitting to the autograder. Be sure to test it for very long input vectors.

(e) Submit your code (a screen capture is fine) to gradescope so that the grader can verify that your code is computa-tionally efficient. (The autograder checks only correctness, not efficiency.)

Pr. 3.

Let A be a diagonal matrix with real entries that are distinct and nonzero. Let x be a vector with all nonzero entries.

(a) Determine how the eigenvalues of the rank-1 update B = A + xx′ are related to the eigenvalues of A and the vector x. Your final expression must not have any matrices in it.

Hint. They will be implicitly related (not in a closed form. expression) as the solution of an equation involving the eigenvalues of A and the elements of x. Hint: G + H = G(I + G−1H) if G is invertible, and see HW1.

(b) Use your solution to the previous part to determine the eigenvalues of B when 

Hint: Julia’s Polynomials.jl package can be useful here.

Pr. 4.

(a) Show that f(x) = ∥Ax − b∥2 is a convex function on R N when matrix A has N columns.

Hint. Use the triangle inequality: ∥x + y∥2 ≤ ∥x∥2 + ∥y∥2 and the equality 1 = α + (1 − α).

(b) Show that the largest singular value of a matrix, i.e., the function σ1(X) : FM×N 7→ R, is a convex function of the elements of the M × N matrix X. Hint. Use the fact that σ1(X) = max∥u∥2=1 ∥Xu∥2. Also use these two basic properties of maxima / suprema: f(t) ≤ g(t) ⇒ maxt f(t) ≤ maxt g(t) and maxt (f(t) + g(t)) ≤ (maxt f(t)) + (maxt g(t)).

(c) (Optional.) Prove or disprove that the second singular value of a matrix, i.e., the function σ2(X) : FM×N 7→ R, is a convex function of the elements of the M × N matrix X when min(M, N) ≥ 2.

Pr. 5.

For A ∈ FM×N , b ∈ FM and x ∈ F N , show that (I − A+A)x and A+b are orthogonal vectors.

Hint. Use a compact SVD.

Non-graded problem(s) below

(Solutions will be provided for self check; do not submit to gradescope.)

Pr. 6.

Spherical manifold optimization problems

(a) Suppose A ∈ FM×N has rank 0 < r ≤ min(M, N) and SVD 

(1) xopt = arg max∥x∥2=1 ∥Ax∥2 = ?

(2) yopt = arg max∥y∥2=1 ∥A′y∥2 = ?

(3) When are xopt and yopt unique (to within a sign ambiguity)?

(4) Do answers change if you replace A with −A in the optimization problems? Explain why or why not.

(5) What constraints could you add to above manifold optimization problem (with the same objective function) so you get ur and vr?

(b) Suppose A ∈ F N×N is Hermitian, and has eigendecomposition  with descending eigenvalue ordering λ1 ≥ . . . ≥ λN ∈ R. Define: xopt = arg max∥x∥2=1 x ′Ax.

(1) Prove that xopt = zv1 where |z| = 1.

(2) What is x ′ optAxopt?

(3) When is xopt unique (aside from the sign ambiguity)?

(c) Same A as in previous part. For some 1 < K ≤ r, define:

(1) Prove that xopt = zvK where |z| = 1, via an equivalent formulation involving projections.

(2) What is x ′ optAxopt?

(3) When is xopt unique (aside from the sign ambiguity)?

Pr. 7.

Suppose A ∈ FM×N with M ≥ N has full column rank, i.e., rank(A) = N.

Show, using an SVD of A, that A+ = (A′A) −1A′ . When A is known to be full column rank, one could use this direct formula to compute the pseudoinverse instead of employing an SVD.

Pr. 8.

Consider the following set of three measurements (xi , yi): (1, 2), (2, 1), (3, 3).

(a) Find the line of the form. y = αx + β that best fits (in the 2-norm sense) this data.

(b) Find the line of the form. x = γy + δ that best fits (in the 2-norm sense) this data.

Hint. Re-use your answer from part (a).




热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图