3 Pages

Hw7Solution08f

Course: M 426, Fall 2009
School: Delaware
Rating:
 
 
 
 
 

Word Count: 881

Document Preview

426/CISC Math 410 08F, All Sections R.J. Braun Homework 7 Solutions, Hints and Answers Problem 3.2.1. Here we use the normal equation approach. AT A = 8 -6 -6 6 , AT b = -10 6 . Solving AT Ax = AT b gives x = [-2 - 1]T . 3.2.2. We can compute all the quantities we need to get the pseudoinverse, even if there is only one column in A. Here AT A = 12 + (-2)2 + 32 = 14. Then A+ = (AT A)-1 AT = 1 [1 - 2 3] . 14...

Register Now

Unformatted Document Excerpt

Coursehero >> Delaware >> Delaware >> M 426

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
426/CISC Math 410 08F, All Sections R.J. Braun Homework 7 Solutions, Hints and Answers Problem 3.2.1. Here we use the normal equation approach. AT A = 8 -6 -6 6 , AT b = -10 6 . Solving AT Ax = AT b gives x = [-2 - 1]T . 3.2.2. We can compute all the quantities we need to get the pseudoinverse, even if there is only one column in A. Here AT A = 12 + (-2)2 + 32 = 14. Then A+ = (AT A)-1 AT = 1 [1 - 2 3] . 14 3.2.9. Let P and Q be orthogonal matrices; then for either of them, the inverse is the same as the transpose. If the product P Q is orthogonal then (P Q)T (P Q) = (P Q)(P Q)T = I. Let's try it. (P Q)T (P Q) = QT P T P Q = QT IQ = QT Q = I; we can do this if both P and Q are orthogonal. Also (P Q)(P Q)T = P QQT P T = P IP T = P P T = I. Because the order of the products doesn't matter and we get the identity matrix as a result, the product P Q of orthogonal matrices is still an orthogonal matrix. 3.2.10. (a) For an orthogonal matrix, Q-1 = QT ; that is, QQT = QT Q = I. Let P = QT , and now try the same approach as in the last problem. P P T = QT (QT )T = QT Q = I, and P T P = (QT )T QT = QQT = I; thus, QT is also an orthogonal matrix. (b) Now 2 (Q) = ||Q-1 ||2 ||Q||2 = ||QT ||2 ||Q||2 . Recall that ||Q|| = max||x||2 =1 ||Qx||2 is the definition of the 2-norm of the matrix. Then for an orthogonal matrix, ||Qx||2 = (Qx)T (Qx) = xT QT Qx = xT Ix = xT x = ||x||2 . 2 2 Because in the definition of the norm we must have ||x||2 = 1, then ||Q||2 = 1. Now ||QT ||2 = 1 because QT is also an orthogonal matrix. Then 2 (Q) = (1)(1) = 1. 3.3.4. The QR factorization can be written as follows. ^ A = QR = Q Q0 ^ R 0 . 1 ^ ^ Note that A is m-by-n, Q is m-by-n and R0 is n-by-n; the others fill out the dimensions with Q0 being m-by-(m - n) and the zero matrix is (m - n)-by-n. Because of that zero matrix, ^^ we can reconstruct A with the compressed QR facorization: A = QR. Now use this in the formula for the pseudoinverse. A+ = (AT A)-1 AT ^^ ^^ ^^ = [(QR)T QR]-1 [QR]T , ^ ^ ^^ ^ ^ = [RT QT QR]-1 RT QT , ^ ^ ^ ^ = [RT R]-1 RT QT , ^ ^ ^ ^ = R-1 [RT ]-1 RT QT , ^ ^ ^ ^ = R-1 I QT = R-1 QT . 3.3.6. (b) Use the definition of the norm. ||A||2 = = = = ||x||2 =1 ||x||2 =1 ||x||2 =1 ||x||2 =1 max ||Ax||2 max ||QRx||2 max ||Q(Rx)||2 max ||Rx||2 = ||R||2 . (a) Count the number of flops in the qrfact function; use m = n. Note that there are no flops in lines 9 to 13, but there is important there: information the sizes of everything are established. For example, v and z are n - k + 1 long. Let s = n - k + 1 for convenience. Line 14: There are 3 flops before the semicolon and there are s - 1 flops (multiplication by -1 after it, for a total of s - 1 + 3 = s + 2. Line 15: This line is non-trivial to count! Start with the parentheses. The last term is v'*v, which is a dot product; the result is a scalar that takes 2s-1 flops. The other term in parentheses is v*v', which is an outer product giving an s-by-s matrix as output; this matrix takes s2 flops. (You have to write out the matrix to see this.) Now the division sign takes s2 flops, as does the multiplication by 2, and the substraction from the s-by-s identity matrix. Thus the total flops count is 4s2 + 2s - 1 for this line. Line 16: This is multiplication of two matrices of size s-by-s; there are s2 locations and each one takes a dot product requiring 2s - 1 flops, so there are s2 (2s - 1) flops required here. Line 17: Same as line 16, so s2 (2s - 1) flops here too. That's it for the flops. Now we need to total them up, for each k we have (s + 2) + (4s2 + 2s - 1) + [s2 (2s - 1)] + [s2 (2s - 1)] = 4s3 - 2s2 + 3s + 1, s = n - k + 1. 2 Now summing over the loop gives n n 4s3 - 2s2 + 3s - 3 = k=1 k=1 n 4(n - k + 1)3 - 2(n - k + 1)2 + 3(n - k + 1) + 1, 4n3 - 4k 3 + O(n2 ) + O(k 2 ), k=1 n n = 4 n3 - k=1 k=1 k3 , 4(n4 - n4 /4), = 3n4 . Thus,...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Delaware - M - 426
Math 426/CISC 410 08F, All Sections R.J. Braun Homework 5 Solutions, Hints and AnswersProblem 2.4.1(d). Take limits. 1 n+ n = lim 1 + = 1; lim n n n n this implies that n + n n. Likewise, n+2 n 2 lim = lim 1 + = 1; n n n n this implies that n
Delaware - M - 426
Math 426/CISC 410 08F, All sections R.J. Braun Homework 4 Solutions, Hints and AnswersProblem 1.6.2. Note that log is denoting the natural log here. Here is one way to solve this problem. See the web page for a published version of this problem. % S
Delaware - M - 428
UNIVERSITY OF DELAWARE Mathematical Sciences Department Math 428/Cisc 411 Algorithmic & Numerical Solution of Differential Equations Spring 2008 Honors Sections Instructor: Dr. Richard J. Braun, Ewing 509, (302) 831-1869, braun@math.udel.edu. Text:
Delaware - M - 426
Beginning Matlab ExercisesR. J. Braun Department of Mathematical Sciences University of Delaware Version of September 5, 20081IntroductionThis collection of exercises is intended to help you start learning Matlab. Matlab is a huge package with
Delaware - M - 426
University of Delaware Department of Mathematical Sciences Math 426/CISC 410 Intro to Numerical Analysis and Algorithmic Computing 08F R. J. Braun Your name: Project 3: SVD Image Compression In class, we used the SVD to compress an image. We treated
Delaware - M - 428
University of Delaware Department of Mathematical Sciences Math 428 Algorithmic and Numerical Solution of Differential Equations 08S R. J. Braun Project 2: FitzHugh-Nagumo Equations Due date: 5/1/08, 3:30 pm. YOUR NAME: In this project you will use M
Delaware - M - 426
Foundations of Numerical AnalysisAn Introduction using MATLABTobin A. Driscoll and Richard J. Braun September 3, 2008Copyright c 2008 by T.A. Driscoll and R.J. Braun. All rights reserved. Please do not redistribute for free or for prot.iiCon
Delaware - M - 428
Math 428 Numerical and Algorithmic Solution of Dierential Equations 08S R. J. Braun Department of Mathematical Sciences University of Delaware Honors Project 1. Due 4/17/08, 3:30pm. In this project you will reproduce some of the eorts to compute 10 d
Delaware - M - 428
UNIVERSITY OF DELAWARE Mathematical Sciences Department Math 428/Cisc 411 Algorithmic & Numerical Solution of Differential Equations Spring 2008 Instructor: Dr. Richard J. Braun, Ewing 509, (302) 831-1869, braun@math.udel.edu. Text: "Numerical Analys
Delaware - M - 426
Math 426/CISC 410 08F, All Sections R.J. Braun Homework 9 Solutions, Hints and AnswersProblem 4.3.1. The ratios below lead one to the hypothesis that = |1 /2 | where 1 is the smallest eigenvalue and 2 is the next largest. I used the absolute value
Delaware - M - 426
Math 426/CISC 410 08F, All Sections R.J. Braun Homework 6 Solutions, Hints and AnswersProblem 2.7.1. We assume that the relative change in b is eps; that is, |b|/|b| =eps. This script will do the job. % Script: Prob2_7_1.m % Problem 2.7.1: verify re
Delaware - M - 426
Math 426/CISC 410 08F, All Sections R.J. Braun Homework 10 Solutions, Hints and AnswersProblem 4.6.2. (a) Assume that A is n-by-n and nonsingular. The SVD is A = U SV ; here S is a diagonal matrix with the singular values on the diagonal, and U and
Delaware - M - 353
University of Delaware Department of Mathematical Sciences Math 353 Engineering Mathematics III 05F R. J. Braun Homework 12: Due Wednesday, 11/16/05, 2:30pm1. Read 9.1,9.2,9.3,9.5. 2. 9.2, Problems 9.2.2(ab). Do h = 0.2 by hand; you may (and are en
Delaware - M - 428
Math 428 Numerical and Algorithmic Solution of Dierential Equations 08S Project 4. Due Friday, 5/16/05, 4:30pm. R. J. Braun Your name: In this project you will examine the numerical solution of the boundary value problem u + eu = 0, u(0) = u(1) = 0,
Delaware - M - 353
University of Delaware Department of Mathematical Sciences Math 353 Engineering Mathematics III 05F R. J. Braun Your name: Due date: 11/30/05, 5pm. Project 2: Solving a Nonlinear ODE IVP In this project you will study the solution of a nonlinear seco
Delaware - M - 353
University of Delaware Department of Mathematical Sciences Math 353 Engineering Mathematics III 05F R. J. Braun Homework 8: Due Tuesday, 10/11/05, 4:00pm1. Read 3.3-5. Reading 3.1,2 is optional; do so if you're not sure about all this matrix-vector
Delaware - M - 353
University of Delaware Department of Mathematical Sciences Math 353 Engineering Mathematics III 05F R. J. Braun Homework 7: Due Monday, 10/3/05, 5:00pm 1. Read 2.2, 2.3, 2.4. 2. 2.2, Problems 2.2.3(a,d), 2.2.11. 3. Apply the method of bisection 3 tim
Delaware - M - 426
qriter_testThe approximation to the smallest eigenvalue:ans = -0.059675578871905 1.564191203698703 1.987691412628296 2.349297531449158 3.409078620563635 -1.263166795003825 0.386479838574264 0.760280531365414 0.8920698056836
Delaware - M - 426
type Hw1_07f.m% Script for Hw 1, 07f. % Problem 3; display the output for second part of 11.2 of the Beginning% Matlab Problemsg = [1 2 3 4; 5 6 7 8; 9 10 11 12]h = [3 3 4 4; 5 5 6 6; 7 7 8 8]h >= gg = hbigger = (g >= h)g(bigger)g([0 0 0
Delaware - M - 426
type TestESeq% Script TestESeq.m% try approximation for exp(1) approx = zeros(1,15);format short e;for k = 1:15 approx(k) = (1+10^(-k)^(10^k);endabserror = abs(exp(1)-approx)%% make a nice table, like that from the basic matlab problem
Delaware - MATH - 611
A=[2 1 1 0; 4 3 3 1; 8 7 9 5; 6 7 9 8 ][L,U] = lufact(A);LUL*U - Ab = [1;2;3;4]y = L\bx = U\yA\bA = [ 1e-12 1; 1 1A = [ 1e-12 1; 1 1 ]norm(A)cond(A)
Delaware - MATH - 611
t = linspace(0,2*pi,200);A=[1 3;4 2]/4;for i=1:200, v=A*[cos(t(i);sin(t(i)]; plot(v(1),v(2),'o'), hold on, endginput(1)norm(ans)norm(A)
Delaware - MATH - 611
A = magic(8)A=A+A';eig(A)lam = poweriter(A);plot(lam,'-o')plot(520-lam,'-o')shgsemilogy(abs(520-lam),'-o')shg[x,y]=ginput(2)diff(log(y) / diff(x)exp(ans)eigeig(A)(ans(end-1)/ans(end)^2eig(A)lam=inviter(A,160);plot(lam,'-o')shglam=i
Delaware - MATH - 611
edit lufactA=[2 1 1 0; 4 3 3 1; 8 7 9 5; 6 7 9 8 ]A([1 3],:) = A([3 1],:)L1=eye(4); L1(2:4,1) = -A(2:4,1)/A(1,1)format ratL1A = L1*AP1=eye(4); P1([1 3],:)=P1([3 1],:);P2=eye(4); P2([2 4],:)=P1([2 4],:);P2*AP2=eye(4); P2([2 4],:)=P1([4 2],:)
Delaware - MATH - 611
m=5;A = toeplitz([1;-ones(m-1,1)],[1 zeros(1,m-1)]); A(:,m)=1[L,U]=lu(A)m=50;A=[2 1 1 0; 4 3 3 1; 8 7 9 5; 6 7 9 8 ];A = toeplitz([1;-ones(m-1,1)],[1 zeros(1,m-1)]); A(:,m)=1;x = rand(50,1);b = A*x;[L,U]=lu(A);x1 = U\(L\b);norm(x-x1)/norm(x
Delaware - MATH - 611
A = magic(5)A = A(:,1:3)[Q,R] = gs(A)Q'*Qans-eye(3)Q*R - A[Q,R]=qr(A,0)[Q,R]=qr(A)N = 40;N = 400;x = linspace(-1,1,N+1)';A = [ x.^0 x.^1 x.^2 x.^3 x.^4 ];[Q,R]=qr(A,0);plot(x,Q)
Delaware - MATH - 611
% MATLAB introduction2+23^4exp(1)log(1)sin(pi/2)exp(1i*pi)sqrt(-4)xpiformat longpiepseps=1e-100pix = 2sin(x)x = x+1v = [ 1, 2, 3, 4 ]v = [ 1; 2; 3; 4 ]v'A = [ 1, 2, 3; 10, 20, 30 ]vB = [ v, v, v ]-3*v-v - 2*v4*BA = [ 1, 2,
Delaware - MATH - 611
image(adam)axis equalshgsize(adam)Z = mean(double(adam),3);image(Z),axis equalshgcolormap(gray(256)shgZ = Z(101:700,201:700);image(Z),axis equalshgsize(Z)Z(1:10,1:10)A = blur(8,1.5)A = blur(12,2.5)A(5,:)'A = blur(12,.5)A(5,:)'A = b
Delaware - CIS - 361
The need for File SystemsNeed to store data and programs in files Must be able to store lots of data Must be nonvolatile and survive crashes and power outages Must allow multiple processes concurrent access Store on disks OS manages files in a file
Delaware - CIS - 361
Solaris Management Facility (SMF) - WorkshopGanesh Hiregoudar Renaud Manus OP/N1 RPE ApproachabilitySun MicrosystemsThanks! We would like to thanks the following engineers who participated in writing and delivering this SMF workshop. > Jarod Nas
Delaware - CIS - 361
Memory ManagementOne of the most important OS jobs.Review memory hierarchy sizes, speed, costGrowing memories -> growing programs need for swapping and paging The simplest way to use memory is to have one program in memory sharing it with the OS
Delaware - CIS - 361
ZFSNew filesystem and volume manager from Sun Open source after 5 years development First appeared in OpenSolaris, later in Solaris 10 6/06 (u2). Has been ported to FreeBSD. Also being including on Macs (Leopard*) Linux FUSE port Jeff Bonwick is a U
Delaware - CIS - 361
Process SynchronizationConsider two threads using and modifying a shared global variable. What problems could occur? Example: a bank account balance (a shared global variable) Balance $200 A: Deposit $10 B: Deposit $10,000Process SynchronizationA
Delaware - CIS - 361
ThreadsTraditional processes have one thread of control sequential program. Multiple threads of control are possible to get parallelism. Processes - own resources (resource grouping) - are scheduled for running (have states (Running, Ready, Blocked
Delaware - CIS - 361
CPU SchedulingScheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource so utilize it well. May have more than 1. With multiprogramming will have many processes (threads)
Delaware - CIS - 361
Solaris Zones: Operating System Support for Consolidating Commercial WorkloadsDaniel Price and Andrew Tucker Sun Microsystems, Inc. ABSTRACTServer consolidation, which allows multiple workloads to run on the same system, has become increasingly im
Delaware - CIS - 361
DeadlocksLots of resources can only be used by one process at a time. Exclusive access is needed. Suppose process A needs R1 + R2 and B needs R1 + R2. A gets R1, B gets R2 A waits for R2, B waits for R1 A and B can't continue without second resource
Delaware - CIS - 361
Zones - ContainersServer Consolidation Run multiple workloads on system Improve utilization of resources Reduce costs Run workloads in isolation Cannot observe others Security Isolation Running apps as different user not enough - privilege escalatio
Delaware - CIS - 361
Dining PhilosophersFive philosophers sit around a table with five forks and spaghetti to eat. Philosophers think for a while and they want to eat, only spaghetti, for a while. To eat a philosopher requires two forks, one from the left and one from r
Delaware - CIS - 361
The ShellWhat does a shell do? - execute commands, programs - but how? For built in commands run some code to do the command For other commands find program executable and . run it. Other features: wildcards, pipes, redirection.ProcessesThe shell
Delaware - CIS - 361
Architecture BackgroundVon Neumann architecture - cpu = ALU + control unit - memory - devices Above connected with buses ALU carry out instruction, may have more than one execution unit Program counter memory address of next instruction to fetch.
Delaware - CIS - 361
Chapter 2 Process, Thread and Scheduling Soloris IPC1Outline Generic System V IPC Support Shared Memory System V Semaphores System V Message Queues POSIX IPC Signal Door2Generic System V IPC SupportModule TheCreationSystem V IPC
Delaware - CIS - 361
Chapter 2 Process, Thread and Scheduling - Scheduler Class and PriorityXIANG Yong xyong@tsinghua.edu.cnOutline Scheduling Class and Priority Dispatch Queues & Dispatch Tables Thread Priorities & Scheduling Turnstiles & Priority Inheritance2
Delaware - CIS - 361
Operating Systems Update: Solaris, OpenSolaris, LinuxHarry J Foxwell, PhD OS AmbassadorSun Microsystems Federal, IncSolaris 10 Introduced in Jan 05, included:> Containers: OS virtualization for isolation > > > > >consolidation/utilization Obs
Delaware - CIS - 361
Name:UDel CISC361-010 Midterm, March 24, 2005Be sure that you read each question and understand what it is asking. No calculators permitted. 1. (10 pts) True/False (circle T for True, F for False) (a) T F - The C shell (csh) is derived from the Bo
Delaware - CIS - 361
Chapter 2 Process, thread, and scheduling - Solaris Multithreaded ProcessZhao Xia zhaoxia@os.pku.edu.cnOutline Introduction to Solaris Processes Multithreaded Process Model Proc tools2The Process ModelSolarisKernel is Multi-threadedK
Delaware - CIS - 361
Name:Show your work! Partial credit will be given, but only if you show your work!. Be sure that you read each question and understand what it is asking.UDel CISC361-010 Final, December 13, 20011. 10 pts True False a T F - Segmentation is just a
Delaware - CIS - 361
ZFSNew filesystem and volume manager from Sun Open source after 5 years development First appeared in OpenSolaris, later in Solaris 10 6/06 (u2). Has been ported to FreeBSD. Also being including on Macs in the works (Leopard*) Linux FUSE port Jeff B
Delaware - CIS - 361
UDel CISC361Study Operating System principles - processes, threads - scheduling - mutual exclusion - synchronization - deadlocks - memory management - file systems - security - networking (if time allows)Operating SystemsUse of Solaris - advanced
Delaware - CIS - 361
Zones - ContainersServer Consolidation Run multiple workloads on system Improve utilization of resources Reduce costs Run workloads in isolation Cannot observe others Security Isolation Running apps as different user not enough - privilege escalatio
Delaware - CIS - 361
Architecture BackgroundVon Neumann architecture - cpu = ALU + control unit - memory - devices Above connected with buses ALU carry out instruction, may have more than one execution unit Program counter memory address of next instruction to fetch.
Delaware - CIS - 361
UDel CISC361-010 Midterm, October 24, 2001Show your work. Partial credit will be given, but only if you show your work. Be sure that you read each question and understand what it is asking.Name:1.10 ptsa b c d e f g h i j 2.True False T F
Delaware - CIS - 105
CISC 105 Fall 2005Name Circle section: 18 19 20 21Midterm 110/07/05TAGeneral Instructions DO NOT PUT YOUR SSN ON ANYTHING! DO NOT WRITE YOUR NAME ON ANY PAGE EXCEPT THIS ONE! Turn off any noise making device, especially CELL PHONES. You m
Delaware - CIS - 105
CISC105 Spring 2007 Lab11 This lab is designed to help with your project. Youll write small programs that demonstrate things you are supposed to do in the project. In general, writing small test programs that demonstrate the concepts you want to emp
Delaware - CIS - 105
CISC105 Spring 2007 Lab06 CODE! If you are having difficulty writing programs, consider programming more often. Working on C every day makes a big difference, and leaving it alone, even just for a weekend, can result in backsliding. You are learning
Delaware - CIS - 181
CISC181 Spring 2008 Lab02 If you did not use the SunRays in CISC105 or 106, then see Lab00 from this directory. Lab00 also reviews compiling and running C+ programs on Unix. This lab should be a review of programming concepts you have seen before.
Delaware - CIS - 181
Project 2, CISC181 Spring 08Domain choice due by email (see below) April 14th Testing and makefile due Thursday April 24th midnight, paper Friday in class Due Sunday April 27th midnight, paper Monday in class AssignmentPlease read the online FAQ fo
Delaware - CIS - 181
CISC181 Fall 2008 Lab01 See Lab00 if you would like to review compiling and running C+ programs on Unix. Be sure to change your disk quota as I described in an email to you last week. Remember, never delete an email from your professor or TA. Thi
Delaware - CIS - 181
Every problem starts with the same picture. Given the code, modify the picture to show what happens. Be sure to struct Node { 1) cross out pointers that go away; int data; 2) add any new pointers, structs, or data; Node * next; 3) follow the code, no
Delaware - CIS - 181
CISC181 Fall 2006 Lab02 Write a program for each of the following problems. Be sure to save every separate program. All programs must be properly commented and indented (see Assignment Standards on the class website). Ask your TA for guidance. Read
Delaware - CIS - 181
CISC181 Fall 2006 Lab09 Write a program for each of the following problems. Be sure to save every separate program. All programs must be properly commented and indented (see Assignment Standards on the class website). Ask your TA for guidance. Feel