Lecture 1 - Introduction and Syllabus
Lecture 1 - Introduction and Syllabus
Lecture 1:
Logistics and General Introduction
Who are we?
• Instructor:
• Fatima Abu Salem
• TAs:
• TBA
Algorithms are
fundamental
Compilers
Networking Computational Biology
Algorithms are useful
Does it work?
Is it fast?
Can I do better?
What do we mean by
better
• Theoretically, at scale?
• Experimentally, in terms of the constants hidden
under the big Oh notation.
• What is resourceful computing?
• Time
• Space
• Caching
• Parallelism
• Green Computing
• And a lot more..
Course Learning Outcomes
• Categorize time functions according to their order of growth.
• Solve recurrence relations to determine the running time of
algorithms.
• Write pseudo-code for iterative and recursive algorithms of varying
asymptotic performance.
• Rigorously and formally analyze algorithms, prove their correctness,
and discover their complexity.
• Implement, analyze, and prove correctness of various graph
algorithms.
• Implement abstract data structures and evaluate the suitability of a
given abstract data structure in a specific context.
• Design and analyze the performance of divide-and-conquer
algorithms, greedy algorithms, and multi-threaded algorithms.
Outline of the Course
• Sorting and Order Statistics: Insertion sort, selection sort, bubble sort, loop
invariants, worst case, average-case, best-case performance, merge sort, quick
sort, randomized quick sort, median and order statistics, sorting lower bound,
and sorting in linear time.
• Divide and Conquer and Multithreaded Algorithms: Solving recurrences,
parallelism and span, multithreaded algorithms for array sum, for matrix
multiplication, and for Strassen’s algorithm for matrix multiplication.
• Dynamic Programming: Rod cutting, longest common subsequence, matrix chain
multiplication, and others.
• Greedy Algorithms: Activity-selection problem, Huffman codes, and the task-
scheduling problem.
• Advanced Data Structures: Hashing, red-black trees, amortized analysis,
binomial heaps, and Fibonacci heaps
• Graph Algorithms: Minimum spanning tree, Prim’s and Kruskal’s minimum
spanning tree algorithms, shortest path algorithms, Dijkstra’s algorithm,
Bellman-Ford algorithm, SSP in DAGS, Floyd-Warshall algorithm.
Course elements and
resources
• Lectures
• References
• Handouts with deeper mathematical exposition
• IPython Notebooks occasionally showing details
that algorithms omit.
• Homework with solution key
• Drop Quizzes, Two term exams and a final exam.
• Office hours and problem-solving sessions
How to get the most out of
lectures
During lecture:
•
• Participate, ask questions.
• Before lecture:
• Do pre-lecture exercises on the website when assigned.
• After lecture:
• Go through the slides.
• Read relevant chapters in the book.
• Try to solve as many exercises/problems as you can from the book. All
those exercises have their solutions found somewhere online.
• Attend the recitation session assigned for the week.
• Try to solve the assignments we post on Moodle for the week.
• Attend the clinic session to go through the challenging questions
found in the assignments.
• Most importantly, what will make or break it:
• Do not wait to “catch up” the week before the exam.
• Your individual effort, on a timely basis. Consistency is key.
• Seeking feedback during recitation sessions and clinic.
Our main textbook
”CLRS”: Introduction to
Algorithms by Cormen,
Leiserson, Rivest, and Stein.
Available FOR FREE ONLINE
through the Stanford library.
Optional References
“Algorithm Design” by
Kleinberg and Tardos
Online resources
• MIT-Introduction to Algorithms, Fall 2005
• MIT-Introduction to Algorithms, Fall 2011
• MIT-Design and Analysis of Algorithms, Spring 2015
IPython Notebooks
• Lectures will occasionally use IPython notebooks
(but not homeworks)
Week 14 (April 11 – April April 12: Dynamic Programming Cont’d (LCS and Knapsack)
15)
April 14: Greedy Algorithms
Week 15 (April 18 – April April 19: Greedy Algorithms + Minimum Spanning Trees
22)
April 21: Minimum Spanning Trees Cont’d
Week 16 (April 25 – April April 26: Max-Flows, Min-Cuts, and Ford Fulkerson
29)
April 28: Max-Flows, Min-Cuts, and Ford Fulkerson