Question: Pls answer in python and include numpy library (20 points) Write a program to roughly carry out the optimization problem inherent in A2, namely maxx=Onx2Ax2.
(20 points) Write a program to roughly carry out the optimization problem inherent in A2, namely maxx=Onx2Ax2. The program should take an arbitrary mn matrix A and sample over 100000 random vectors xRn (and use Gaussian random numbers) to approximately pick the maximum. Compute and empirically show that the analytic solution is an upper bound for the search. For demonstration purposes, use m=9 and n=6. The matrix entries can also be randomly chosen. Your program should contrast the empirical maximum with the analytically derived maximum to the optimization
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
