iImport java.util.Scanner;
ppublic class LettersAndPhoneNumbers cfw_
public static void main(String[] args) cfw_
Scanner input = new Scanner(System.in);
System.out.print("Enter an uppercase letter: ");
char ch = input.nextLine().charAt(0);
int number = 0;
18.335 Problem Set 3
Problem 1: SV
mations
compute R0 Q0 .repeat this process until the matrix converges. From what it converges to, suggest a procedure to compute the eigenvalues and
eigenvectors of a matrix (no need to prove that
it converges in general
18.335 Problem Set 2
(d) Suppose that the k values are
uniformly
randomly
distributed
in
Show that
[ machine , +machine ].
the mean error p
can be bounded by
Pn
|f x) f x)| = O nmachine i=1 |xi | .
(Hint: google random walk.you can
just quote standard sta
18.335 Problem Set 1
Problem 1: Gaussian elimination
Trefethen, problem 20.4.
Problem 2: Asymptotic notation
This problem asks a few simple questions to make sure that you understand the asymptotic notations
O, , and
as dened in the handout in class, and
18.335 Problem Set 4
Problem 2: Qs R us
(a) Trefethen, problem 27.5
Problem 1:
(b) Trefethen, problem 28.2
essenberg ahead!
Problem 3:
In class, we described an algorithm to nd the Hessenberg factorization = QHQ of an arbitrary matrix , where H is upper-t
18.085 Quiz 3
December 2, 2004
Your name is:
Professor Strang
SOLUTIONS
Grading
1.
2.
3.
Thank you for taking 18.085 ! I hope to see you in 18.086 !
1) (40 pts.)
This question is about 2-periodic functions.
(a) Suppose f (x) =
ck eikx and g(x) =
dl eilx .
um mieb
vtu¥L£H
-r- nr-nun-1-.-._.-.a.-.
Last time:
Prepesitien: Let m in s, m e- I. Then every seiutisn tn the Equation x*3 r
y*3 I N Is. y in 3} satisfies mastisl. IyI} i: EtreetimIEl.
Censider the integer selutisns er x + y3 = m. cDunting {x,yl and :y.
18.085 Quiz 3
December 8, 2006
Your PRINTED name is:
1) (30 pts.)
Professor Strang
SOLUTIONS
(a) Suppose f (x) is a periodic function:
0
for < x < 0
f (x) = ex
for 0 x
f (x + 2n) for every integer n
Grading
Find the coecients ck in the complex Fourier se
18.335 Problem Set 3 Solutions
Problem 1: SV and low-rank approximations (5+10+10+10 pts)
(a)
= QR, where the columns of Q are orthonormal and hence Q Q = I. Therefore, = QR) QR) =
Q Q)R = R R. But the singular values of and R are the square roots o
18.085 Quiz 2
November 3, 2006
Your PRINTED name is:
1) (25 pts.)
Professor Strang
SOLUTIONS
Grading
1
2
3
4
This network (square grid) has 12 edges and 9 nodes.
1
2
1/2
9
8
u2 = 1
3/4
6
5
4
7
3
1/4
1/2
u8 = 0
3/4
1/2
1/4
(a) Do not write the incidence ma
18.085 Quiz 2
November 3, 2004
Your name is:
1) (36 pts.)
Professor Strang
SOLUTIONS
Grading
1.
2.
3.
The 5 nodes in the network are at the corners of a square and the center.
Node 5 is grounded so x5 = 0. All 8 edges have conductances c = 1 so
C = I.
cur
18.335 Problem Set 1 Solutions
Problem 1: Gaussian elimination
The inner loop of LU, the loop over rows, subtracts from each row a dierent multiple of the pivot
row. But this is exactly a rank-1 update U ! U xy T , where x is the column-vector of multipli
FALL 2002 QUIZ2 SOLUTIONS
Problem 1 (40 points)
This question is ahoiit a fixed-free hanging har (made of 2 materials) with a point load at z = i :
i,
i,
a) (i) At x = u and w are continuous. Then 1 ~ , must have a jump (ii) At x = r~ is continuoils (as a
18.085 FALL 2002 QUIZ 3 SOLUTIONS
PROBLEM 1
x
a) The graph looks likc a symmctric buttcrfly. It is periodic with no discontinuitics (but has kinks at x
whcrc the slopc jumps).
=0
and
= k7r,
.
b) d f l d z : Thc right half of the graph becomes -ee": now it
18.335 Problem Set 2 Solutions
Problem 1: Floating-point
(a) The smallest integer that cannot be exactly represented is n = t + 1 (for base- with a t-digit mantissa). You might be tempted to think that t cannot be represented, since a t-digit number, at r