CS 415, Section 001 Sonoma State University Spring, 2023
 
Algorithm Analysis
Instructor: Henry M. Walker

Lecturer, Sonoma State University
Professor Emeritus of Computer Science and Mathematics, Grinnell College

Although much of this course is well developed, some details can be expected to evolve as the semester progresses.
Any changes in course details will be announced promptly during class.

Assignment on the RSA Algorithm (with an Extra Credit Option)

This assignment contains two regular problems plus an additional option for extra credit. Completion of the extra credit option may yield up to 20 extra credit points (credited toward assignments).

Assignment, Part 1: RSA Encryption

For this exercise, you are to view a film online and answer several questions. Each question asks you to state a conclusion. In each case, be sure to explain your reasoning behind the result, as well as stating the conclusion itself. Also, be sure that each of your responses is written in complete sentences, using careful English. In grading, expect consistent point deductions for sentence fragments–sequences of words without subjects or without verbs, or constructions with other grammatical errors.

Film: Public Key Cryptography: RSA Encryption Algorithm, by the Khan Academy, July 30, 1012.

The RSA Encryption Algorithm depends upon mathematical properties of prime numbers and their products. This video outlines some of the history and motivation for this encryption algorithm and gives some simple examples about how it works in practice.

  1. This film provides a moderate level of detail for RSA Encryption. Based on this background, answer the following questions.

    1. If Barbara wants to receive encrypted messages from Donna or others that will be difficult for others to decrypt, what steps must Barbara take? That is, what preliminary work/computations must Barbara do to create both public and private keys—making encrypted communication possible?
    2. What should Barbara communicate to Donna, so that Donna can send encrypted messages, and how will Donna encrypt messages? Also, how will Barbara decrypt messages received? That is, how are the public and private keys used to encrypt and decrypt messages?
    3. Why is it reasonably easy for Barbara to construct the public and private keys, while it is difficult for others to break the code? (You must cite one or more specific references for this answer. A possible starting point might be the textbook.)

Assignment, Part 2: Miscellaneous Required Problems

  1. These exercises encourage you to take a high-level view of several algorithms discussed in this course.

    1. Many computing applications require the addition of a long sequence of numbers: a1, a2, a3, . . . an, where these numbers get smaller as the index increases. That is,

      a1 > a2 > a3> . . . > an > 0

      To obtain the best accuracy in the final sum, which of the following approaches should be followed (and why)?

      • Add terms in increasing order of the subscript: a1, a2, a3, . . . an
      • Add terms in increasing order of the values themselves: an, an-1, an-2, . . . a1
      • Add in any order, as order does not matter.
    2. To what extent, if any, do the following algorithms fit within the category of greedy algorithms?

      • branch-and-bound
      • twice-around-the-tree
      • topological sorting
      • finding the kth largest element in an array, using a partition funciton
    3. The only known solutions to the Traveling Salesperson Problem (TSP) have a run time that is worse than any polynomial—that is, their run time is exponential or factorial or worse, or they do not solve a complete version of TSP. In particular, neither the branch-and-bound algorithm nor the twice-around-the-tree algorithm always run in polynomial-time to fully solve TSP.

      • Why might branch-and-bound be considered a useful algorithm, if it still might take a dramatically long time to run?
      • What motivates use of the twice-around-the-tree algorithm, since it does not completely solve TSP in polynomial time either?

Extra Credit Option: Some Possible Issues with Big Data

Film: The era of blind faith in big data must end" by Cathy O'Neil, September 7, 2017. (Ted Talk)

This talk considers algorithms that arise from the collection of massive data sets—a field often called "Big Data". Behind the scenes, the algorithms largely involve extensive use of statistical methods. In practice, much of the mathematics is not made public, under the protection of corporate secrets as well as arguments related to the complexity of the mathematics. After viewing this film, answer the following questions/statements.

  1. What factors/causes does the speaker claim can cause an algorithm to display bias?
  2. What are at least two examples that the speaker presents to illustrate algorithmic bias? (Describe each in 3-5 sentences, and indicate what time(s) in the film these examples are discussed.)
  3. What does the speaker suggest can and should be done by developers, the people using an algorithm, those directly impacted by the algorithm, and the general public?
  4. What is your reaction to this film? That is, to what extent do you think this type of issue might arise within computer science algorithms (where computer science may overlap but also may be different from Big Data)?
created December 30, 2022
revised December 30, 2022—January 3, 2023
substantially reworked Summer 2023
revised January 15, 2024
revised April 29, 2024
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.