Cody

Problem 44846. Just another norm problem (JANP)

Task:

Implement a function that takes a square matrix A and returns

a nonzero vector yc which minimizes

                   abs(norm(A*y,1)-norm(A,1)*norm(y,1))

and a nonzero vector yr which minimizes

                 abs(norm(A*y,inf)-norm(A,inf)*norm(y,inf))

Example

if A=eye(3), a possible solution:

yc=[1 0 0]' 
yr=[1 -1 1]'

Solution Stats

66.67% Correct | 33.33% Incorrect
Last Solution submitted on Apr 02, 2019