Relevant Textbook Sections:
2.4.4–2.4.5 (The theorems of Euler and Fermat; Using Euler’s function), 2.7 (Runtimes and Big-Oh notation), 2.8–2.9 (The Discrete Logarithm and the Discrete Logarithm Problem), 2.10 (Parity of discrete log), 2.10.1 (The Baby-Step Giant-Step Algorithm)
To Do:
- Reminder: the first test is in class on Wednesday, September 16th, 2026 (Module 1). See the Tests page for the syllabus.
- Solutions to the last daily post (the big-oh comparisons and the baby-step giant-step computation) are now posted: Solutions to Daily Due Sep 9. All daily post solutions are collected on the Archive page.
- A bit of math practice that shows that the parity (even or oddness) of the discrete log can be discovered easily. Let be an odd prime number.
- Show that if then or .
- Use part (1) on the expression to show that the only two solutions to are and .
- Let be a primitive root mod . Show that . (This uses the previous part.)
- Suppose is given to you (but is not known). Show how you can determine if is even or odd. Hint: Raise the equation to the power and see what you get using the previous part.
- Note that is a primitive root modulo . Use the test above to determine if so that is even or odd.
- Check whether you are correct by finding (by any method).
- Comment on the runtime of this test for the parity of .
- Comment on whether parity of a discrete log is well-defined modulo . Why is it ok for odd primes ?
- Review for Test 1. Use the Baby-Step-Giant-Step algorithm to solve the discrete logarithm problem . ( is a primitive root modulo .) Present both lists, labelled so it is clear where each entry comes from, identify the collision, and explain how it gives . Then check your answer. You may use the tools on the Baby-Step Giant-Step page or the Sage Sandbox to generate the lists. Or do some by hand, for practice!
- Review for Test 1. Compute “by hand” (calculator is ok for multiplications and reductions, but show all steps). Remember to check the coprimality conditions that Euler’s theorem needs, each time you use it.
- A runtime analysis. Here is a search problem: the input is two integers and . The goal is to decide whether appears in the list . Two algorithms: Linear search computes the list from the beginning, comparing each computed entry to , and stops when it finds or passes it. Binary search computes the middle entry, compares to that middle entry, discards the half of the list which cannot contain , and repeats on the half that remains, until it finds or runs out of list.
- Determine the size of the input to this problem (in bits), as a function of .
- Determine the runtime of each algorithm, in big-oh notation, as a function of the input size. Count a comparison of two integers as costing a number of bit operations proportional to their length in bits.
- Remember to upload to canvas!