Department of Mathematics University of San Francisco

Mathematics 202-01
Linear Algebra and Probability

Spring 2016

MWF 3:30-4:35, LS G12

Professor: Peter Pacheco
Office: Harney 540
Phone: 422-6630
Email: domain: cs.usfca.edu, user: peter
Office Hours: MW 4:45-5:45, F 2:15-3:15, and by appointment

TA: Bryan Relampagos
Email: domain: dons.usfca.edu, user: barelampagos
Office Hours: W 12-1, Th 4:30-5:30 in HR 530 or HR 535

Class mailing list: You will be automatically subscribed to the class mailing list. Please note that this list uses your USF email address. If you ordinarily read your email using another account, be sure to forward your USF email to the other account.

Homework Assignments and Quizzes

Beware of the answers in the back of the book. There are mistakes.

• Quiz 1 Material.
• p. 8: 1 (The answer to 1c is incorrect in older printings: it should be a plane. In newer printings the answer is correct.), 4, 9 (There are three possible fourth points, not four.), 16, 11, 17
• p. 19: 3, 4, 6, 12
• p. 29: 1, 2
Here's a key to one version of quiz 1, and here's a key to the other version.

• Quiz 2 Material.
• p. 29: 4 (find a solution that's not all zeroes), 6, 10
• p. 40: 9, 10, 11, 15, 16, 18, 26, 27
• p. 51: 1, 2, 3, 11, 12
Here are some solutions to the problems that don't have answers in the back of the book.

Here's a key to one version of quiz 2, and here's a key to the other version.

• Quiz 3 Material.
• This version of elimination uses a single n x (n+1) "augmented" matrix to store both the coefficients of the variables and the right-hand side. Rewrite the pseudo-code so that it uses an n x n matrix to store the coefficients of the variables and an n-dimensional column vector to store the right-hand side. Here's a solution.
• This version of back substitution uses an n x (n+1) augmented matrix to store the matrix of coefficients and the right-hand side. Rewrite the pseudo-code so that it uses an n x n matrix of coefficients and an n-dimensional column vector to store both the right-hand side. Here's a solution.
• p. 51: 6 (a singular system has no solution or infinitely many solutions), 8, 14

Here's a key to one version of quiz 3, and here's a key to the other version.

• Additional Material for the first midterm

• Quiz 4 Material
• p. 63: 1, 3, 5, 9, 12, 14, 18
• p. 75: 2 (the order of the matrices is in number 1), 7ab, 9, 11, 15, 19, 32
• p. 89: 1

Here's a key to one version of quiz 4, and here's a key to the other version.

• Quiz 5 Material
• p. 89: 2 (how do you "undo" a swap? how do you undo a sequence of swaps?), 14, 22, 27, 29

Here's a key to quiz 5.

• Quiz 6 Material. Note that quiz 6 will be on Wednesday, March 23.
• In an earlier quiz, we developed an algorithm for forward substitution. Determine the exact number of floating point operations carried out by this algorithm. How does this compare the result we stated in class for backward substitution? How many floating point operations are required in the forward substitution used in solving a linear system using LU-factorization? Here's a solution.
• p. 102: 4, 6, 10, 15.

Here's a key to one version of quiz 6, and here's a key to the other version.

• Quiz 7 Material.
• p. 115: 22, 24 (just PA = LU)
• p. 127: 1, 5 (M is the vector space of 2 x 2 matrices), 9a, 11, 15ab, 20, 23, 25.

Here's a key to one version of quiz 7, and here's a key to the other version.

• Additional Material for the Second Midterm
• p. 140: 4 (what are the free variables? what are the pivot variables? find the special solutions and the complete solution); 6 and 8 (the matrices are in number 5); 10, 14, 16, 24
• p. 151: 7 (just Rx = 0)

• Quiz 8 Material.
• p. 151: 1, 13, 21 (a: just the nullspace)
• p. 163: 2, 4, 8, 12, 13abd, 14, 16, 18a (A^T is the matrix obtained from A by interchanging the rows and columns of A), 30
• p. 178: 2, 3, 11, 15, 18, 22

Here's a key. Note: There are corrections to the originally posted solutions to parts 1b and 1c.

• Quiz 9 Material.
• Here's a question on PageRank. Here's a solution.
• p. 35 (in the probability text): 1 (m(a) denotes the probability of the simple event a), 2cde, 3cde, 7 (A with a tilde above denotes the complement of the event A in the sample space), 8, 9. Here are some solutions.
• p.35: 21, 22, 23, 25, 31a (assume the students did not have a flat tire). Here are some solutions.

Here's a key to one version of quiz 9, and here's a key to the other version.

• Quiz 10 Material.
• p.71: 1ab, 2abc, 4abcd, 7acd, 8a. Here are some solutions.
• p. 71: 17, 20. To generate random real numbers between 0 and 1, you can use the following code
```                In C:
#include <stdlib.h>
double rand_val = random()/((double) RAND_MAX);

In Java:
double rand_val = Math.random();

In Python:
import random
rand_val = random.random()
```
Here's a solution to problem 17, and here's a solution to problem 20.
• p. 88: 1, 2, 3 (how many 4-bit "words" are possible? how many 8-bit words?), 5. Here are some solutions.

Here's a key to quiz 10.

• Quiz 11 Material.
• p. 113: 1acdfg, 2, 3, 12 (find the probability of getting 3-of-a-kind; find the probability of getting two pair), 16. Here are some solutions.
• p. 113: 1beh, 5 (here's a link to the Dartmouth applets and some info on their use), 8, 10, 15, 18. Here are some solutions.

Here's a key to one version of quiz 11, and here's a key to the other version.

• Quiz 12 Material.

Here's a key to one version of quiz 12, and here's a key to the other version.

• Additional material for the final exam:
• p. 150: 35, 39 (X and Y are independent if P(X=x and Y=y) = P(X=x)P(Y=y), for all possible values of x and y.)
• p. 172: 1cd, 4abc, 7 (In number 7, suppose x is chosen at random from the interval [0, 1]. Show that the events x > 1/3 and x < 2/3 are not independent.)
• p. 219: 25, 27
Here are some solutions.

Code and Pseudo-Code

1. Matrix operations
2. Solving systems of linear equations
3. Probability
-

Other Information

1. A list of posssible topics for the first midterm
2. Solutions to one version of Midterm 1. Solutions to the other version of Midterm 1.
3. A list of posssible topics for the second midterm
4. Solutions to one version of Midterm 2. Solutions to the other version of Midterm 2.
5. This program will draw histograms of numerical data.
6. This program will draw histograms of the binomial distribution.
7. A list of additional topics for the final exam.

Peter Pacheco 2016-05-12