Due Friday, September 13th, 2024

  1. Info:  the material from today’s class is in written form in the course text (link upper left), Sections 3.1-3.3.
  2. If you didn’t have time on the last daily post, catch up on these exercises:
    1. Watch my video explaining the Euclidean Algorithm (14 minutes).
    2. Compute the gcd of 135 and 170.  Show all the steps of the algorithm, as in the video.
    3. Consider the equation $7x + 15y = 1$.  Find an integer solution to this equation using inspection or trial and error.
    4. Using the previous problem, tell me the inverse of $7$ modulo $15 and the inverse of $15$ modulo $7$.  (This should require no computation, just look at the previous problem and have an aha moment!)
  3. Compute the gcd of 183 and 105.  Show all the steps of the algorithm, as in the video.  Verify using the Sage Sandbox (link at left for whenever you need it).
  4. Solve $183x + 105y = 3$ by expanding your work above into “recipe cards” as shown in class.  Here’s another video which explains this (~11 mins) in case you need a refresher.  Verify your answer using Sage’s command xgcd (Sage Sandbox).
  5. Find the inverse of 35 modulo 61.  Use the extended Euclidean algorithm.  Verify your answer by multiplying out.
  6. What if we want to solve 3x + 5y = 0?  The zero is the weird part.  Then we don’t use the Euclidean algorithm.
    1. Give one solution by inspection (just find a clever one).
    2. Now give another one different from the first.
    3. Now give infinitely many.
  7. Find a solution to 3x + 5y = 1 (using the algorithm from class, or by guessing one).
  8. Now find infinitely many different solutions to 3x+5y = 1.  (Hint:  use questions 2 and 3 above)
  9. If time remains:  The goal of this exercise is to work out the runtime of the Euclidean algorithm (you may have seen this already, but do this without looking anything up):
    1. Think of the Euclidean algorithm as replacing one pair $(a,b)$ with a new pair $(a’,b’)=(b,a-qb)$ at each step.   For example, if we start with $(a,b)=(183,105)$ as on the last daily post, then we get $(a’,b’)=(b,a-b)=(105,78)$ at the next step.
    2. Show that, if $b < a/2$, then $b’ < a/2$.
    3. Show that, if $b \ge a/2$, then $b’ \le a/2$.
    4. Conclude that after two steps $(a,b) \rightarrow (a’,b’) \rightarrow (a^{”},b^{”})$, the size of the first entry has decreased by at least half (so, it may have decreased more than that).
    5. What is the runtime of the Euclidean algorithm?