1 of 6 Math 1600 Lecture 5, Section 2, 15 Sep 2014 Announcements: Continue reading Section 1.3 and aso the Exporation on cross products for next cass. Work through recommended homework questions. Quiz 1 this week in tutorias. Quiz 1 wi cover Sections 1.1, 1.2 and the code vectors part of 1.4. It does not cover the Exporation after Section 1.2. See ast ecture for how they run. Office hours: Monday, 3:00-3:30 and Wednesday, 11:30-noon, MC103B. Hep Centers: Monday-Friday 2:30-6:30 in MC 106 starting Wednesday, September 17. Extra Hep Centers: Today and tomorrow (Sept 15 and 16), 4-5pm, MC106. Review: Section 1.4: Appications: Code Vectors Exampe 1.37: A code for rover commands: forward = [0, 0, 0], back = [0, 1, 1], eft = [1, 0, 1], right = [1, 1, 0]. If any singe bit (binary digit, a 0 or a 1) is fipped during transmission, the Mars rover wi notice the error, since a of the code vectors have an even number of 1s. It coud then ask for retransmission of the command. This is caed an error-detecting code. In vector notation, we repace a vector b = [ v 1, v 2,, v n ] v = [ v 1, v 2,, v n, d] 1 v = 0 (mod 2) 1 = [1, 1,, 1]. with the vector such that, where
2 of 6 Exacty the same idea works for vectors in Z n 3 ; see Exampe 1.39 in the text. Note: One probem with the above scheme is that transposition errors are not detected: if we want to send [0, 1, 1] but the first two bits are exchanged, the rover receives [1, 0, 1], which is aso a vaid command. We' see codes that can detect transpositions. New materia Exampe 1.40 (UPC Codes): The Univera Product Code (bar code) on a product is a vector in Z 12 10, such as Instead of using u = [6, 7, 1, 8, 6, 0, 0, 1, 3, 6, 2, 4]. 1 as the check vector, UPC uses c = [3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1]. c u = 0 (mod 10) The ast digit is chosen so that. For exampe, if we didn't know the ast digit of u, we coud compute c [6, 7, 1, 8, 6, 0, 0, 1, 3, 6, 2, d] = = 6 + d (mod 10) and so we woud find that we need to take. 6 + 4 = 0 (mod 10) d = 4, since This detects any singe error. The pattern in was chosen so that it detects many transpositions, but it doesn't detect when digits whose difference is 5 are transposed. For exampe, 3 5 + 1 0 = 15 and, and these are the same moduo. 3 0 + 1 5 = 5 10 Exampe 1.41 (ISBN Codes): ISBN codes use vectors in Z 10 11. The check vector is c = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]. Because 11 is a prime number, this code detects a singe errors and a singe transposition c
3 of 6 errors. See text for a worked exampe. Summary: To create a code, you choose (which determines the aowed digits), n (the number of digits in a code word), and a check vector c Z n m. Then the vaid words v are those with c v = 0. If ends in a 1, then you can aways choose the ast digit of v to make it vaid. Note: This kind of code can ony reiaby detect one error, but more sophisticated codes can detect mutipe errors. There are even errorcorrecting codes, which can correct mutipe errors in a transmission without needing it to be resent. In fact, you can dri sma hoes in a CD, and it wi sti pay the entire content perfecty. Question: The Dan code uses vectors in Z 3 4 with check vector. Find the check digit in the code word. c = [3, 2, 1] d v = [2, 2, d] Soution: We compute c v = [3, 2, 1] [2, 2, d] = 3 2 + 2 2 + 1 d To make, we choose. This is the end of the materia for quiz 1. (We aren't covering force vectors.) m = 10 + d = 2 + d (mod 4) c v = 0 (mod 4) d = 2 c Section 1.3: Lines and panes in R 2 and R 3 [These notes are a summary of the materia, which wi be suppemented by some diagrams on the board.] We study ines and panes because they come up directy in appications, but aso because the soutions to many other types of probems can be expressed using the anguage of ines and panes.
Lines in R 2 and R 3 4 of 6 Given a ine, we want to find equations that te us whether a point (x, y) or (x, y, z) is on the ine. We' write = [x, y] or x for the position vector of the point, so we can use vector notation. x = [x, y, z] The vector form of the equation for is: where p d x = p + td is the position vector of a point on the ine, is a vector parae to the ine, and. R 2 R 3 This is concise and works in and. t R p d x If we expand the vector form into components, we get the parametric form of the equations for : x y (z = p 1 + td 1 = p 2 + td 2 = p 3 + td 3 if we are in R 3 ) Lines in R 2 There are additiona ways to describe a ine in R 2. The norma form of the equation for is: n n ( x p ) = 0 or n x = n p, where is a vector that is norma = perpendicuar to. n p x-p x If we write this out in components, with form of the equation for : n = [a, b], we get the genera
ax + by = c, c = n p b 0 y = mx + k m = a/b k = c/b where. When, this can be rewritten as, where and. 5 of 6 Note: A of these simpify when the ine goes through the origin, as p = 0 then you can take. Exampe: Find a four forms of the equations for the ine in R 2 through and. A = [1, 1] B = [3, 2] p d going Note: None of these equations is unique, as, and can a change. The genera form is cosest to being unique: it is unique up to an overa scae factor. n Lines in R 3 Most of the time, one uses the vector and parametric forms above. But there is aso a version of the norma and genera forms. To specify the direction of a ine in R 3, it is necessary to specify two non-parae norma vectors and. Then the norma form is n 1 n 2 n 1 n 2 x x = n 1 p typo in book in Tabe 1.3: = n 2 p there shoud be no subscripts on p When expanded into components, this gives the genera form: a 1 x + b 1 y + c 1 z = d 1, a 2 x + b 2 y + c 2 z =. d 2 Since both equations must be satisfied, this can be interpreted as the intersection of two panes. (We' discuss panes in a second.) Question: What are the pros and cons of the different ways of describing a ine?
6 of 6 Panes in R 3 Norma form: n ( x p ) = 0 or n x = n p. This is exacty ike the norma form for the equation for a ine in R 2. When expanded into components, it gives the genera form: ax + by + cz = d, n = [a, b, c] d = n p where and.