Docsity

Quiz 4 with Problem - Computational Methods | CMSC 460, Quizzes of Computer Science

Toggle sidebar
bg1
AMSC/CMSC 460 Quiz 4 ,Fall 2007
Show all work. You may leave arithmetic expressions in any form that
a calculator could evaluate. By putting your name on this paper, you agree
to abide by the university’s code of academic integrity in completing the
quiz. Use no books, calculators, cellphones, communication with others,
scratchpaper, etc.
Name
1. Let x= [−3,−4,2]T.
1a. (3) kxk1= .
1b. (3) kxk∞= .
1c. (4) What vector has the same direction as xbut 2-norm equal to 1? (In
other words, we want the vector x/c that has 2-norm equal to 1, where cis
a constant that you should compute.)
1
pf2

Partial preview of the text

Download Quiz 4 with Problem - Computational Methods | CMSC 460 and more Quizzes Computer Science in PDF only on Docsity!

AMSC/CMSC 460 Quiz 4 , Fall 2007

Show all work. You may leave arithmetic expressions in any form that a calculator could evaluate. By putting your name on this paper, you agree to abide by the university’s code of academic integrity in completing the quiz. Use no books, calculators, cellphones, communication with others, scratchpaper, etc.

Name

  1. Let x = [− 3 , − 4 , 2]T^.

1a. (3) ‖x‖ 1 =.

1b. (3) ‖x‖∞ =.

1c. (4) What vector has the same direction as x but 2-norm equal to 1? (In other words, we want the vector x/c that has 2-norm equal to 1, where c is a constant that you should compute.)

  1. (10) Recall that if A is an n × n matrix then

‖A‖∞ = max i=1,...,n

∑n

j=

|aij |.

Suppose that all elements of A are nonnegative. Write Matlab code to com- pute ‖A‖∞ using a column oriented algorithm.

  • Your code should have only one for loop.
  • A correct row-oriented algorithm with one for loop is worth 5 points.
  • A correct column-oriented algorithm with two for loops is worth 8 points.