Approx. 4 months

Assumes 6hrs/wk (work at your own pace)

Join thousands of students

Start Free Course

Start Free Course
You get
Instructor videos
Learn by doing exercises
view course trailer
Watch Video

Course Summary

Ever played the Kevin Bacon game? This class will show you how it works by giving you an introduction to the design and analysis of algorithms, enabling you to discover how individuals are connected.

Why Take This Course?

By the end of this class you will understand key concepts needed to devise new algorithms for graphs and other important data structures and to evaluate the efficiency of these algorithms.

Prerequisites and Requirements

This class assumes an understanding of programming at the level of CS101, including the ability to read and write short programs in Python; it also assumes a comfort level with mathematical notation at the level of high school Algebra II or the SATs.

See the Technology Requirements for using Udacity.


Lesson 1: A Social Network Magic Trick

Objective: Become familiar with Algorithm Analysis.

  • Eulerian Path
  • Correctness of Naïve
  • Russian Peasants Algorithm
  • Measuring Time
  • Steps for Naive, Steps for Russian
  • Divide and Conquer

Lesson 2: Growth Rates in Social Networks

Objective: Use mathematical tools to analyze how things are connected.

  • Chain, Ring and Grid Networks
  • Big Theta
  • Planar Graphs
  • Nodes, Edges, Regions
  • Growth Rate of Edges in Planar Graph
  • Hypercube
  • Randomly Generated Graphs
  • N Squared
  • Tangled Hypercube

Lesson 3: Basic Graph Algorithms

Objective: Find the quickest route to Kevin Bacon.

  • Properties of Social Networks
  • Clustering Coefficient
  • Connected Components
  • Running Time of Connected Components
  • Checking Pairwise Connectivity
  • Pairwise Shortest Path
  • Depth vs. Breadth First Search
  • Recursion Replacement
  • Marvel “Social” Network
  • Finding Bridge Edges

Lesson 4: It’s Who You Know

Objective: Learn to keep track of your Best Friends using heaps.

  • Degree Centrality
  • Top K Via Partitioning
  • Three Partitioning Cases
  • Properties of a Heap
  • Patch Up a Heap
  • Down Heapify
  • Heap Sort

Lesson 5: Strong and Weak Bonds

Objective: Work with Social Networks that have edge weights.

  • Make a Tree
  • Strength of Connections
  • Weighted Social Networks
  • How to Find the Shortest Path
  • Dijkstra’s Shortest Path Algorithm
  • Floyd-Warshall Intro
  • Randomizing Clustering Coefficient
  • Bounds on the Estimate

Lesson 6: Hardness of Network Problems

Objective: Explore what it means for a Social Network problem to be “harder” than other.

  • Tetristan
  • Exponential Running Time
  • Degrees of Hardness
  • Reduction: Long and Simple Path
  • Polynomial Time Decidable Problems
  • Non-deterministic Polynomial Time Decidable Problem
  • Clique Problem in NP
  • Find the Strangers
  • Graph Coloring is NP-Complete

Lesson 7: Review and Application

  • Interview with Peter Winker (Professor, Dartmouth College) on Names and Boxes Problem && Puzzles and Algorithms

  • Interview with Tina Eliassi-Rad (Professor, Rutgers University) on Statistical Measures in Network && Social Networks in Security and Protests

  • Interview with Andrew Goldberg (Principal Researcher, Microsoft Research) on Practical Algorithms

  • Interview with Vukosi Marivate (Graduate Student, Rutgers University) on Social Algorithms

  • Interview with Duncan Watts (Principal Researcher, Microsoft) on Pathway That Can Use Two Nodes

  • Intro to Graph Search Animation

Instructors & Partners

instructor photo

Michael Littman


Michael Littman is a Professor of Computer Science at Brown University. He also teaches Udacity’s Machine Learning courses: Supervised Learning, Unsupervised Learning and Reinforcement Learning.

Prior to joining Brown in 2012, he led the Rutgers Laboratory for Real-Life Reinforcement Learning (RL3) at Rutgers, where he served as the Computer Science Department Chair from 2009-2012. He is a Fellow of the Association for the Advancement of Artificial Intelligence (AAAI), served as program chair for AAAI’s 2013 conference and the International Conference on Machine Learning in 2009.

Michael has received university-level teaching awards at both Duke and Rutgers.

track icon

View more courses in Software Engineering

Frequently Asked Questions

When does the course begin?

This class is self paced. You can begin whenever you like and then follow your own pace. It’s a good idea to set goals for yourself to make sure you stick with the course.

How long will the course be available?

This class will always be available!

Can I skip individual videos? What about entire lessons?

Yes! The point is for you to learn what YOU need (or want) to learn. If you already know something, feel free to skip ahead. If you ever find that you’re confused, you can always go back and watch something that you skipped.

What are the rules on collaboration?

Collaboration is a great way to learn. You should do it! The key is to use collaboration as a way to enhance learning, not as a way of sharing answers without understanding them.

Why are there so many questions?

Udacity classes are a little different from traditional courses. We intersperse our video segments with interactive questions. There are many reasons for including these questions: to get you thinking, to check your understanding, for fun, etc… But really, they are there to help you learn. They are NOT there to evaluate your intelligence, so try not to let them stress you out.

What should I do while I’m watching the videos?

Learn actively! You will retain more of what you learn if you take notes, draw diagrams, make notecards, and actively try to make sense of the material.