Question: Write a Python program that performs certain common vector operations, using Python lists as the vectors. A function that computes the L k norm of
Write a Python program that performs certain common vector operations, using Python lists as the vectors. A function that computes the Lk norm of a list. This function takes a list, V and a positive integer k as its arguments. If k
1000, the function should return the Lk norm of V. If
, the function should return the L-infinity norm of V. See the discussion of Lk ( you function does not need to try to avoid underflow or overflow errors in its calculation of norms)
Background info:

Part of this exercise asks you to write a Python function that computes the L* norm for a vector. If you haven't encountered this term before, the Lk norm of vector (V1, V2, ..., Vn), sometimes written k, is defined as lk = |01|k+|v2|k+...+|un|k or, in English (which isn't necessarily any more understandable than the symbolic form), the kth root of the sum of the kth the absolute values of the elements of . powers of Norms are in some sense a measure of the magnitude of a vector. In particular, notice that the L? norm is just the usual length of the vector, or the Euclidean distance from its tail to its head. The L norm is the so-called Manhattan distance from the tail to the head, i.e., the distance you would travel going from tail to head if you could only move parallel to the coordinate axes (as if you were driving on city streets parallel to the axes). As a limiting case, the L-infinity norm l|00, is defined to be the maximum absolute value of any element in the vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
