• Oct. 26, 2017: webpage draft created.
  • Jan. 14, 2018: assignment 1 posted, due date Jan. 29, 2018, in class.
  • Jan. 25, 2018: project 1 posted, coding due date Feb. 25, 2018, report due date Feb. 28, 2018.
  • Jan. 28, 2018: assignment 2 posted, due date Feb. 12, 2018, in class.
  • Feb. 11, 2018: assignment 3 posted, due date Feb. 28, 2018, in class.
  • Mar. 7, 2018, mid-term, in class.
  • Mar. 8, 2018: project 2 posted, coding due date Apr. 15, 2018, report due date Apr. 18, 2018.
  • Mar. 19, 2018: assignment 4 posted, due date Mar. 28, 2018, in class.
  • Mar. 28, 2018: assignment 5 posted, due date Apr. 11, 2018, in class.
  • Apr. 11, 2018: assignment 6 posted, due date Apr. 25, 2018, in class.
  • May 2, 2018, final, 12:30pm-2:30pm, in BH 305.

Learning outcomes and competences

After attending this course, participants should be able to
  • Given an algorithm, analyze its correctness and running time.
  • Given a problem, design a correct and efficient algorithm for it, express it in a form that a programmer can easily convert into code.
  • Have an idea about what problems are intractable, and basic algorithms for those that are tractable.
  • Know the mathematical techniques that you will need to analyze your algorithms.

  • Course syllabus

    Course summary

    In this course we will discuss some basic techniques for algorithm design and analysis, including:
    - Sorting and searching
    - Divide-and-conquer
    - Dynamic programming
    - Greedy algorithms
    - Graph algorithms
    - NP-completeness
    Detailed list of topics is available in the course schedule below.


    Qin Zhang
    Office hour: Wednesday 3pm-4pm, Luddy 3128

    Associate Instructors
  • Erfan Sadeqi Azer
    Office hour: Tuesday 2pm-3pm, Luddy 3118A

  • Adithya Vadapalli
    Office hour: Friday 3pm-4pm, Luddy 3033E

  • You can also talk to
  • Haoyu Zhang
    Office hour: Thursday 4pm-5pm, Luddy 3139C

  • Time and place

    1:00pm-2:15pm Monday/Wednesday, Ballantine Hall 305


    Required Textbook: [KT] Algorithm Design, J. Kleinberg, E. Tardos. Pearson Education.
    Supplementary Textbook: [CLRS] Introduction to algorithms, T. Cormen, C.Leiserson, R. Rivest, C. Stein. 3rd edition. MIT

    Course schedule

    (subject to adjustments as we go along; [KT] denotes the textbook by Kleinberg and Tardos).

     Week   Date   Section   Content   Comments 
      1     Jan. 8     1. Introduction     Overview     intro
      1     Jan. 10       Big-O notations     [KT] Ch 2.2  
      2    Jan. 15       No class     MLK day
      2    Jan. 17       Common running times     [KT] Ch 2.4  
      3     Jan. 22     2. Graphs     Introduction to HackerRank  
      Graph basics  
      [KT] Ch 3.1  
      3     Jan. 24         BFS, implementation  
      Graph representation  
      [KT] Ch 3.2, 3.3  
      4     Jan. 29         DFS, implementation  
      Directed graph  
      [KT] Ch 3.2, 3.3, 3.5  
      4     Jan. 31         DAG, topological sorting     [KT] Ch 3.6
      5     Feb. 5     3. Greedy     Interval scheduling     [KT] Ch 4.1
      5     Feb. 7         Interval scheduling (cont.)     [KT] Ch 4.1
      6     Feb. 12         Shortest path (Dijkstra's algo)     [KT] Ch 4.4
      6     Feb. 14         Discussion of HW1&2    
      7     Feb. 19         Dijkstra's algo (cont.)     [KT] Ch 4.4
      7     Feb. 21         MST     [KT] Ch 4.5
      8     Feb. 26         MST (cont.)     [KT] Ch 4.5
      8     Feb. 28         MST (cont.)     [KT] Ch 4.6  
      9     Mar. 5     Mid-term Review     Discussion of HW3 & others      
      9     Mar. 7     Mid-term (in class)          
      10     Mar. 12         No class     Spring break  
      10     Mar. 14         No class     Spring break  
      11     Mar. 19     4. Divide & Conquer     Mergesort     [KT] Ch 5.1  
      11   Mar. 21         Counting inversions     [KT] Ch 5.3  
      12   Mar. 26       Closest pair     [KT] Ch 5.4  
      12     Mar. 28     5. Dynamic Programming     Weighted interval scheduling   [KT] Ch 6.1, 6.2 
      13     Apr. 2         Subset-sum     [KT] Ch 6.4
      13     Apr. 4         Sequence alignment     [KT] Ch 6.6
      14     Apr. 9         Sequence alignment (cont.)     [KT] Ch 6.7
      14     Apr. 11     6. NP and Intractability     Polynomial reduction     [KT] Ch 8.1
      15     Apr. 16         Polynomial reduction (cont.)     [KT] Ch 8.2
      15     Apr. 18         NP-completeness     [KT] Ch 8.3
      16     Apr. 23         NP-completeness (cont.)     [KT] Ch 8.4
      16   Apr. 25     Final Review          
      17       Final          


    • Assignments 15%

      About six written assignments. Assignments are posted in Canvas, and are due before class on the due date, in hard copy. If you can, typeset in your favorite software and bring printed hard copy to class. If you are handwriting, make sure it is legible.
      No extensions or late homeworks will be granted.

    • Projects 15%

      You will be asked to solve a question from HackerRank website. You will have the choice over which programming language to use. You will write a report for your experience. Details can be found in this instruction.

    • Exams 70%

      (1) Mid-term 30%
      (2) Final 40%
      There will be NO make-up exams. If students have to miss the in-class midterm exam due to family/medical emergencies (and/or other reasons which will be granted on a case by case basis), they need to contact the instructor before the exams for permission, and their other exam grades will be re-weighted. Internship and job application interviews and paper deadlines are NOT proper reasons to miss an exam.

    Course policies

    For assignments, students may discuss answers with anyone, including problem approaches and proofs. But all students must write their own proofs, and write-ups. The names of all people that you have talked to should be listed at the beginning of the first page. If a solution comes from existing papers/web/books, they must be properly cited, and you must write the solution in a way that demonstrates your understanding (simply copying the solution will be considered as plagiarism, and will result an "F" for the entire course). All deadlines are firm. No late assignments will be accepted unless there are legitimate circumstances.
    For more details, see Indiana University Code of Student Rights, Responsibilities, and Conduct.


      CSCI-C241 "Discrete Structures for Computer Science", CSCI-C343 "Data Structures", and MATH-M 216 "Analytic Geometry and Calculus II" (or MATH-M 212 CALCULUS II). The prerequisites are enforced.