Design and Analysis of Algorithms (COMPSCI 308)
Spring 2024-2025 / Session 4 (7 weeks, 35 hours)
Course Period: March 17 - May 2, 2025
- Lectures: Monday / Wednesday @ 16:15-17:30 (Classroom: TBA + Zoom)
Instructor: Mustafa MISIR (Office: WDR 2106), mustafa.misir [at] dukekunshan.edu.cn / mm940 [at] duke.edu
An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output. An algorithm can also be viewed as a tool for solving a well-specified computational problem. The statement of the problem specifies in general terms the desired input/output relationship. The algorithm describes a specific computational procedure for achieving that input/output relationship.
After having a target problem, the next step is to design an algorithm that can address the target problem. Algorithm design is a coherent discipline-one needs a specific set of concepts to define, a computational problem and a specific set of tools to design an optimal algorithm to solve it. Designing the right algorithm for a given application is a major creative act-that of taking a problem and pulling a solution out of the ether. The space of choices you can make in algorithm design is enormous, leaving you plenty of freedom.
Solely designing algorithms may not be a proper approach to solve a specific problem. Understanding their behavioral characteristics together with their strengths and weaknesses is critical. Algorithm analysis is investigated for this purpose, in particular, for determining how much of a resource, such as time or memory, an algorithm uses as a function of some characteristic of the input to the algorithm, usually the size of the input.
This course will touch all the major algorithm design and analysis steps while taking data structures into account. All the relevant concepts will be exemplified through existing algorithms and problems besides implementing algorithms in Python. To be specific, the design and analysis of efficient algorithms including sorting, searching, dynamic programming, graph algorithms, nondeterministic algorithms and computationally hard problems and other related topics will be studied.
This course will be carried out in line with the DKU's animating principles. In particular, Collaborative Problem Solving, Research and Practice and Lucid Communication will be directly involved with this course while touching the Independence and Creativity aspect. The course will be primarily executed through in-class quick quizzes, in-class individual / group discussions and weekly assignments.
By the end of this course, you will be able to:
- design efficient and effective algorithms of varying types
- implement algorithms in consideration of the problem requirements and computational resources
- utilize appropriate data structures while developing algorithms
- introduce new algorithmic solutions for new problems
- evaluate the theoretical boundaries of given algorithms
- analyze the behaviour and performance of given algorithms, referring to their strengths and weaknesses
- identify the resemblance between different problems, leading to problem hardness analysis
Follow Canvas and Ed Discussions for announcements and discussions.
Pre-requisites
- COMPSCI 201: Introduction to Programming and Data Structures
- COMPSCI 203: Discrete Math for Computer Science or MATH 205 / 206: Probability and Statistics
The following chart shows how COMPSCI 308 fits to the DKU curriculum, where the abbreviations indicate the course types, i.e. D: Divisional, DF: Divisional Foundation, ID: Interdisciplinary and E: Elective. Refer to the DKU Undergraduate Bulletin (2024-2025) for more details.
Reference Books
Introduction to Algorithms, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein (3rd Edition), 2009, MIT Press (Free Book: ProQuest - Duke U.) [ Lecture Slides ]
Supplementary Books:
- Algorithm Design, John Kleinberg, Eva Tardos (1st Edition), 2005, Pearson - Addison Wesley [ Lecture Slides & Examples ]
- Algorithms, Sanjoy Dasgupta, Christos Papadimitriou, Umesh Vazirani (1st Edition), 2006, McGraw-Hill
- Algorithms, Robert Sedgewick, Kevin Wayne (4th Edition), 2011, Addison-Wesley
- Introduction to the Analysis of Algorithms, Robert Sedgewick, Philippe Flajolet (2nd Edition), 2013, Addison-Wesley [ Lecture Slides & Videos ]
- The Algorithm Design Manual, Steven Skiena (3rd Edition), 2020, Springer [ Old: Lecture Slides & Videos - New: Lecture Slides & Videos ]
- Foundations of Algorithms, Richard Neapolitan (5th Edition), 2014, Jones & Bartlett Learning
- Data Structures and Algorithm Analysis in C++, Mark A. Weiss (4th Edition), 2014, Pearson [ Source Code in C++ ]
- Algorithm Design and Applications, Michael T. Goodrich, Roberto Tamassia (1st Edition), 2015, Wiley
- Algorithms Illuminated (Part 1): The Basics, Tim Roughgarden (1st Edition), 2017, Soundlikeyourself Publishing [ Lecture Slides & Videos ]
- Algorithms Illuminated (Part 2): Graph Algorithms and Data Structures, Tim Roughgarden (1st Edition), 2018, Soundlikeyourself Publishing [ Lecture Slides & Videos ]
- Algorithms Illuminated (Part 3): Greedy Algorithms and Dynamic Programming, Tim Roughgarden (1st Edition), 2019, Soundlikeyourself Publishing [ Lecture Slides & Videos ]
- Algorithms Illuminated (Part 4): Algorithms for NP-Hard Problems, Tim Roughgarden (1st Edition), 2020, Soundlikeyourself Publishing [ Lecture Slides & Videos ]
- Introduction to the Design and Analysis of Algorithms, Anany Levitin (3rd Edition), 2011, Addison-Wesley
- Design and Analysis of Computer Algorithms, Alfred Aho, John Hopcroft, Jeffrey Ullman (1st Edition), 1974, Addison-Wesley
- Data Structures and Algorithms, Alfred Aho, Jeffrey Ullman (1st Edition), 1983, Pearson
- Fundamentals of Computer Algorithms, Ellis Horowitz, Sartaj Sahni (1st Edition), 1984, CS Press
- A Guide to Algorithm Design: Paradigms, Methods, and Complexity Analysis, Anne Benoit, Yves Robert, Frederic Vivien (1st Edition), 2014, CRC
- Algorithms: Sequential, Parallel, and Distributed, Kenneth A. Berman, Jerome L. Paul (1st Edition), 2004, Course Technology
- The Design and Analysis of Algorithms, Dexter C. Kozen (1st Edition), 1992, Springer
- Algorithms, Jeff Erickson (1st Edition), 2019 (Free Book)
- Algorithmic Thinking: Learn Algorithms to Level Up Your Coding Skills, Daniel Zingaro (2nd Edition), 2023
- The Design of Approximation Algorithms, David P. Williamson, David B. Shmoys (1st Edition), 2011, Cambridge University (Free Book)
- Approximation Algorithms, Vijay V. Vazirani (1st Edition), 2003, Springer
- Introduction to the Theory of Computation, Michael Sipser (3rd Edition), 2013, Cengage
- What Can Be Computed?: A Practical Guide to the Theory of Computation, John MacCormick (1st Edition), 2018, Princeton University
- Computational Complexity: A Modern Approach, Sanjeev Arora, Boaz Barak (1st Edition), 2009, Cambridge University (Free Draft)
- Mathematics and Computation: A Theory Revolutionizing Technology and Science, Avi Wigderson (1st Edition), 2019, Princeton University (Free Draft)
- Algorithms and Complexity, Herbert S. Wilf (2nd Edition), 2002, CRC
- Complexity Theory: Exploring the Limits of Efficient Algorithms, Ingo Wegener (1st Edition), 2005, Springer
- Automata, Computability and Complexity: Theory and Applications, Elaine A. Rich (1st Edition), 2007, Pearson (Free Book)
Algorithms + Python:
- Data Structures and Algorithms in Python, Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser (1st Edition), 2013, Wiley
- Problem Solving with Algorithms and Data Structures using Python, Brad Miller and David Ranum, Franklin (2nd Edition), 2011, Beedle & Associates (Free Book)
- Think Complexity, Allen B. Downey (2nd Edition), 2016 / 2018, Green Tea Press / O'Reilly Press (Free Book) [ Source Code in Python ]
- Dive Into Algorithms: A Pythonic Adventure for the Intrepid Beginner, Bradford Tuckfield (1st Edition), 2021, No Starch Press
- Algorithms in a Nutshell: A Practical Guide, George T. Heineman, Gary Pollice, Stanley Selkow (2nd Edition), 2016, O'Reilly Press (Partially Python)
- A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills, Jay Wengrow (2nd Edition), 2020, Pragmatic Bookshelf [ Source Code in Python, Ruby and JavaScript ]
Lecture Notes / Slides
- Week 0 (Reviews)
- Python Programming
- Data Structures
- Discrete Mathematics
- Week 1 [17/03 - 20/03] (Keywords: History, Terminology and Basics; Algorithms; Computation; Asymptotic Notations)
- About COMPSCI 308
- Introduction to Algorithms
- Asymptotic Notations
REMINDER [23/03, Thursday]: Drop/add ends for second 7-week undergraduate session.
{ Source: Academic Calendar }
- Week 2 [24/03 - 27/03] (Keywords: Divide and Conquer; Dynamic Programming)
- Divide and Conquer
- Dynamic Programming
HOLIDAY [04/04, Friday - 06/04, Sunday]: Qing Ming - Tomb Sweeping Day
- Week 3 [31/03 - 03/04] (Keywords: Greedy Algorithms; Graphs; Graph Algorithms)
- Greedy Algorithms
- Graph Algorithms
- Week 4 [07/04 - 10/04] (Keywords: Minimum Spanning Trees; Shortest Path Algorithms)
- Minimum Spanning Trees
- Shortest Path Algorithms
MIDTERM EXAM [TBA, (TBA Hours)]
- Week 5 [14/04 - 17/04] (Keywords: Optimization; Mathematical Modelling; Linear Programming; Duality; Maximum Flow)
- Linear Programming
- Duality
- Maximum Flow
REMINDER [17/04, Thursday]: Last day to withdraw with a W grade of second 7-week classes; Last day to change grading basis of second 7-week classes.
{ Source: Academic Calendar }
- Week 6 [21/04 - 24/04] (Keywords: Randomized Algorithms, Hash Tables)
- Randomized Algorithms
- Hash Tables
HOLIDAY [01/05, Thursday]: International Labor Day (NO CLASSES) - Continue on [02/04, Friday]
- Week 7 [28/04 - 02/05] (Keywords: P; NP; NP-Completeness; Approximation Algorithms)
- P and NP
- NP-Completeness
- Approximation Algorithms
FINAL EXAM [TBA, (TBA Hours)]
Grading
- Homework Assignments: 20%
- Mathematical, Conceptual, or Programming related
- Submit on Sakai; 7 in total
- Quizzes: 10%
- Weekly Journals: 10%
- Each week, write a page or so about what you have learned
- Submit on Sakai; 2 points off for each missing journal, capped at 10
- Midterm: 25%
- Final: 35%
Reference Courses
Other Books
Quick / Easy Reads:
- Grokking Algorithms, Aditya Bhargava (2nd Edition), 2024, Manning
- Algorithms Unlocked, Thomas H. Cormen (1st Edition), 2013, MIT Press
- Algorithms to Live By: The Computer Science of Human Decisions, Brian Christian, Tom Griffiths (1st Edition), 2016, Henry Holt and Co. [ Video Lecture ]
- Algorithms, Panos Louridas (1st Edition), 2020, MIT Press
- Real-World Algorithms: A Beginner's Guide, Panos Louridas (1st Edition), 2017, MIT Press
- Nine Algorithms that Changed the Future: the Ingenious Ideas that Drive Today's Computers, John MacCormick (1st Edition), 2012, Princeton University Press
- What Algorithms Want: Imagination in the Age of Computing, Ed Finn (1st Edition), 2017, MIT Press
Python Programming:
- Introducing Python for Computer Science and Data Scientists, Paul Deitel, Harvey Deitel (1st Edition), 2020, Pearson
- Introduction to Computation and Programming Using Python: With Application to Computational Modeling and Understanding Data, John V. Guttag (3rd Edition), 2021, MIT Press
- Think Python: How to Think Like a Computer Scientist, Allen B. Downey (2nd Edition), 2016, O'Reilly Press (Free Book)
- How to Think Like a Computer Scientist: Learning with Python 3, Peter Wentworth, Jeffrey Elkner, Allen B. Downey, Chris Meyers (3rd Edition), 2012 (Free Book)
- A Programmer's Guide to Computer Science (Vol. 1), William M. Springer II (1st Edition), 2019, Jaxson Media
- A Programmer's Guide to Computer Science (Vol. 2), William M. Springer II (1st Edition), 2020, Jaxson Media
- A Byte of Python, Swaroop C. H. (4th Edition), 2016 (Free Book)
- Project Python, Devin Balkcom, 2011 (Free Book)
- Python for Everybody: Exploring Data in Python 3, Charles Severance, 2016 (Free Book)
- Automate The Boring Stuff With Python, Al Sweigart (2nd Edition), 2019, No Starch Press (Free Book)
- Beyond the Basic Stuff with Python, Al Sweigart (1st Edition), 2020, No Starch Press (Free Book)
- Python Programming in Context, Bradley N. Miller, David L. Ranum, Julie Anderson (3rd Edition), 2019, Jones & Bartlett Learning
- Python Programming: An Introduction to Computer Science, John Zelle (3rd Edition), 2016, Franklin, Beedle & Associates
- A Hands-On, Project-Based Introduction to Programming, Eric Matthes (2nd Edition), 2016, No Starch Press (Free Book)
- Learn Python 3 the Hard Way, Zed A. Shaw (1st Edition), 2017, Addison-Wesley
- Introducing Python: Modern Computing in Simple Packages, Bill Lubanovic (2nd Edition), 2019, O'Reilly Press
- Clean Code in Python: Develop Maintainable and Efficient Code, Mariano Anaya (2nd Edition), 2021, Packt
- The Self-Taught Computer Scientist: The Beginner's Guide to Data Structures & Algorithms, Cory Althoff (1st Edition), 2021, Wiley
- The Big Book of Small Python Projects: 81 Easy Practice Programs, Al Sweigart (1st Edition), 2021, No Starch Press (Free Book)
- Invent Your Own Computer Games with Python, Al Sweigart (4th Edition), 2016, No Starch Press (Free Book)
- Cracking Codes with Python: An Introduction to Building and Breaking Ciphers, Al Sweigart (1st Edition), 2018, No Starch Press (Free Book)
Foundations of Computer Science:
-
Concrete Mathematics: A Foundation for Computer Science, Ronald L. Graham, Donald E. Knuth, Oren Patashnik (2nd Edition), 1994, Addison-Wesley
-
Mathematics for Computer Science, Eric Lehman, F. Thomson Leighton, Albert R. Meyer (1st Edition), 2017 (2018R), Samurai Media (Free Book) [ 6.042: Mathematics for Computer Science (MIT) - Materials ]
-
Mathematics: A Discrete Introduction, Edward A. Scheinerman (3rd Edition), 2012, Cengage Learning
-
Discrete Mathematics and Its Applications, Kenneth H. Rosen (8th Edition), 2019, McGraw-Hill
-
Discrete Mathematics: An Open Introduction, Oscar Levin (3rd Edition), 2021 (Free Book)
-
Essential Discrete Mathematics for Computer Science, Harry Lewis, Rachel Zax (1st Edition), 2019, Princeton University
-
Connecting Discrete Mathematics and Computer Science, David Liben-Nowell (1st Edition), 2022, Cambridge University Press
-
Book of Proof, Richard H. Hammack (3rd Edition), 2018 (Free Book)
-
Applied Combinatorics, Mitchel T. Keller, William T. Trotter (3rd Edition), 2021 (Free Book)
-
A Decade of the Berkeley Math Circle: The American Experience (Volume 1, Volume 2), Zvezdelina Stankova, Tom Rike (Eds), 2008, American Mathematical Society
-
How to Think Like a Mathematician: A Companion to Undergraduate Mathematics, Kevin Houston (1st Edition), 2009, Cambridge University Press
-
The Art of Problem Solving (Vol. 2): And Beyond, Richard Rusczyk, Sandor Lehoczky (7th Edition), 2006, AoPS Incorporated
-
The Art of Problem Solving (Vol. 1), Sandor Lehoczky, Richard Rusczyk (7th Edition), 2006, AoPS Incorporated
-
What Is Mathematics? An Elementary Approach to Ideas and Methods, Richard Courant, Herbert Robbins (2nd Edition), 1996, Oxford University Press
Other Materials / Resources
Cheat Sheets:
Algorithm Visualization / Animation:
Miscellaneous:
General:
|