CS 321
Algorithm Analysis & Design
Welcome to
Logistics
[Optional] Extra Sessions.
Office Hours: 2PM to 3PM on class days.
TAs: Shivdutt and Supratim.
Course Webpage: http://cs321.xyz
Reference material: http://algorithms.wtf
Graded Work
Google Code Jam Qualifiers (20%)
Self-assessment quizzes via MCQs online (25%)
Assignments on the Hacker Rank Platform (25%)
Mid-sem and End-sem Exams (30%)
Starred Problems
Class participation
Ungraded Work
Discussion Policy
Collaboration is encouraged,
but copying is forbidden.
Do the right thing!
Course Overview
Design Techniques
Greedy,
Dynamic Programming,
Recursion,
Divide-and-Conquer,
etc.
Complexity Issues
Why are we stuck?Can we do better?
NP-completeness
Notion of Hardness
Models of computation
etc.
Key Tool
Reductions
Too lazy to write findMin when sort is available.
A.sort; min(A) = A[0]
Design Techniques
Reduce to a solved problem.
Complexity Issues
Reduce from an un solved problem.
Key Tool
Story for another day
Algorithms meant for “big data”
Learning algorithms
Issues of space complexity
Coding contests and
programming interview “puzzles”
Pre-Requisites
Why bother?
Algorithms: A common language for
nature, human and computer.
Avi Wigderson
Why bother?
If you find that you're spending almost all your time on theory,
start turning some attention to practical things; it will improve
your theories. If you find that you're spending almost all your
time on practice, start turning some attention to theoretical
things; it will improve your practice.
Donald Knuth
What will I learn?
Understand the algorithms jokes at
Compare different approaches to the same problem.
Ask the right questions.
Use math to justify why you’re stuck.
Specification
A function from a space of inputs
to a space of outputs.
Can the function be
implemented by a computer?
There is no algorithm.
There exists an algorithm.
Here’s the code.
Here’s a problem (X)
that nobody has
solved in polynomial time.
If A is an algorithm that solves
problem Y in polynomial time,
then here’s B, an algorithm using A as a blackbox,
that solves X in polynomial time.
The theory of NP-completeness makes
this a very powerful statement, because
for some problems X,
solving X has serious implications.
What will I learn?
Understand the algorithms jokes at
Compare different approaches to the same problem.
Ask the right questions.
Use math to justify why you’re stuck.

00 - 30 Dec - Introduction

  • 1.
    CS 321 Algorithm Analysis& Design Welcome to
  • 2.
    Logistics [Optional] Extra Sessions. OfficeHours: 2PM to 3PM on class days. TAs: Shivdutt and Supratim. Course Webpage: http://cs321.xyz Reference material: http://algorithms.wtf
  • 3.
    Graded Work Google CodeJam Qualifiers (20%) Self-assessment quizzes via MCQs online (25%) Assignments on the Hacker Rank Platform (25%) Mid-sem and End-sem Exams (30%)
  • 4.
  • 5.
    Discussion Policy Collaboration isencouraged, but copying is forbidden. Do the right thing!
  • 6.
    Course Overview Design Techniques Greedy, DynamicProgramming, Recursion, Divide-and-Conquer, etc. Complexity Issues Why are we stuck?Can we do better? NP-completeness Notion of Hardness Models of computation etc.
  • 7.
    Key Tool Reductions Too lazyto write findMin when sort is available. A.sort; min(A) = A[0]
  • 8.
    Design Techniques Reduce toa solved problem. Complexity Issues Reduce from an un solved problem. Key Tool
  • 9.
    Story for anotherday Algorithms meant for “big data” Learning algorithms Issues of space complexity Coding contests and programming interview “puzzles”
  • 10.
  • 11.
    Why bother? Algorithms: Acommon language for nature, human and computer. Avi Wigderson
  • 12.
    Why bother? If youfind that you're spending almost all your time on theory, start turning some attention to practical things; it will improve your theories. If you find that you're spending almost all your time on practice, start turning some attention to theoretical things; it will improve your practice. Donald Knuth
  • 13.
    What will Ilearn? Understand the algorithms jokes at Compare different approaches to the same problem. Ask the right questions. Use math to justify why you’re stuck.
  • 14.
    Specification A function froma space of inputs to a space of outputs.
  • 15.
    Can the functionbe implemented by a computer? There is no algorithm. There exists an algorithm. Here’s the code.
  • 16.
    Here’s a problem(X) that nobody has solved in polynomial time. If A is an algorithm that solves problem Y in polynomial time, then here’s B, an algorithm using A as a blackbox, that solves X in polynomial time.
  • 17.
    The theory ofNP-completeness makes this a very powerful statement, because for some problems X, solving X has serious implications.
  • 18.
    What will Ilearn? Understand the algorithms jokes at Compare different approaches to the same problem. Ask the right questions. Use math to justify why you’re stuck.