Intro to CS16 CS16: Introduction to Algorithms & Data Structures - - PowerPoint PPT Presentation

intro to cs16
SMART_READER_LITE
LIVE PREVIEW

Intro to CS16 CS16: Introduction to Algorithms & Data Structures - - PowerPoint PPT Presentation

Intro to CS16 CS16: Introduction to Algorithms & Data Structures Spring 2020 Welcome to CS16! Seny Kamara Doug Woos Meet your TAs What is 16 about? Algorithms sequence of computer instructions for a given task Web Search in


slide-1
SLIDE 1

Intro to CS16

CS16: Introduction to Algorithms & Data Structures Spring 2020

slide-2
SLIDE 2

Welcome to CS16!

slide-3
SLIDE 3

Seny Kamara Doug Woos

slide-4
SLIDE 4

Meet your TA’s

slide-5
SLIDE 5

What is 16 about?

Algorithms

“sequence of computer instructions for a given task”

slide-6
SLIDE 6

Web Search in the 90’s

6

slide-7
SLIDE 7
  • Jeremy tells me about a new search engine
  • “it’s awesome you should try it out!”
  • After 10 minutes it’s obvious that
  • Google results were better
  • But why?
  • What was Google’s secret?

7

slide-8
SLIDE 8
slide-9
SLIDE 9
  • Before Google
  • search engines ranked pages using keyword frequency
  • well-known and worked OK
  • Larry Page & Sergey Brin (PhD students @ Stanford)
  • noticed that links were important too!
  • links convey information about importance
  • But what exactly? and how can you make use of it?
  • This lead them to design PageRank

9

PageRank

slide-10
SLIDE 10

Google

  • How does PageRank work?
  • Why does it work?
  • How do you implement it efficiently?
  • Google indexes hundreds of billions of pages
  • answers and ranks in 0.5 seconds
  • processes 40,000 queries p/s & 3.5 billion queries per day
  • using clever algorithms and data structures!

10

slide-11
SLIDE 11

A Personal Example

  • Searching on encrypted data (2001)
  • How is this even possible?
  • Security & privacy by default, secure cloud computing, no more data breaches
  • Really cool idea but very slow
  • We thought about this a lot
  • new approach that was very fast (2006)
  • as fast as searching on unencrypted data!
  • 15 years later & after a lot more research
  • startups, apps, real-world products
  • What was the secret?
  • clever use of algorithms & data structures

11

slide-12
SLIDE 12

CS is diverse

Algorithms OS Networking

  • Soft. Eng.

AI Crypto & Security Graphics & Vision PL

slide-13
SLIDE 13

Goals

  • You will learn
  • How to design algorithms
  • How to analyze algorithms
  • How to implement algorithms
  • You will be asked to
  • Reflect on the impact of your algorithms

13

slide-14
SLIDE 14

Content of CS16

  • Analysis of algorithms: big-Oh, worst-case analysis, amortized analysis,

expected running time

  • Design paradigms: dynamic programming, divide and conquer, greedy algorithms
  • Recursive algorithms: recurrence relations, induction
  • Elementary data structures: stacks, queues, trees, hash tables, binary search

trees, heaps, graphs

  • Sorting algorithms: insertion sort, selection sort, heap sort, merge sort,

quicksort, radix sort

  • Machine learning algorithms: decision trees
  • Graph algorithms: depth-first search, breadth-first search, shortest path,

minimum spanning tree, topological sort

  • Advanced topics: ML, functional programming, complexity theory
  • Responsible computing: impact of your algorithms, energy efficiency, bias &

discrimination, fairness

14

slide-15
SLIDE 15

Lectures

  • Cover various algorithms & data structures
  • How they work
  • Why they work
  • Analyze them
  • Activities & discussions
  • You are responsible for content in lecture

(whether on slides or not)

15

slide-16
SLIDE 16

Textbook

  • No required textbook
  • Helpful
  • Algorithms by Dasgupta, Papadimtriou and Vazirani
  • Algorithms Illuminated 1, 2 & 3 by Roughgarden

16

Free pdf! $16.68 $17.09 $11.99

slide-17
SLIDE 17

Course Page

  • Missive & Policies,
  • Slides
  • Notes
  • Announcements
  • Helpful Documents
  • Java, Latex & Python tips
  • Guides for testing, readmes, working from home, …

17

slide-18
SLIDE 18

Piazza

  • Announcements
  • Questions and answers
  • Links to helpful material (blogs,

Youtube videos)

18

slide-19
SLIDE 19

Office Hours

  • TA office hours are very helpful
  • Try to get unstuck on your own first
  • TAs will ask you what you tried…
  • … and send you back if you didn’ t try anything
  • Office hours
  • Seny: Mondays 3-5 in CIT 507
  • Doug: Wednesdays 10-12 in CIT 317
  • Questions about HW or projects:
  • Post on Piazza
  • Ask in Section
  • Office hours

19

slide-20
SLIDE 20

Homeworks (30%)

  • 10 HWs
  • Due every week
  • Python code, proofs, analysis, …

20

slide-21
SLIDE 21

Projects (30%)

  • 4 projects in Java
  • Seamcarve
  • Heap
  • Decision Trees (Machine Learning)
  • Graph (including PageRank)

21

slide-22
SLIDE 22

Sections (10%)

  • 1 hour/week with 2 TAs
  • 6-10 students
  • Required!
  • If you miss 3 you NC the course
  • Lose points for every missed section
  • Mini assignments
  • Mentor

22

slide-23
SLIDE 23

Exams (25%)

  • Midterm
  • Date: March 18th
  • Final
  • Date: May 8th

23

slide-24
SLIDE 24

Collaboration Policy

  • No collaboration on Projects
  • Encouraged to collaborate on HWs but
  • Write up HWs by yourself
  • Code by yourself
  • No sharing of code, pseudocode, tests
  • You will sign the collaboration policy
  • We will test all your code against
  • everyone else
  • previous CS16 iterations
  • changing variable names and moving things around won’t work…
  • Caught 18 people in 2019 (many had multiple violations)

24

slide-25
SLIDE 25

Collaboration Policy

  • Random live audits
  • might ask you “what would happen if we did X to your code?”
  • Regret clause
  • if you let Doug & I know you violated policy within 24h
  • case will be handled internally to CS department
  • When you are caught violating policy & don’t use regret clause
  • We file an academic code case
  • NC course & parent notification
  • Suspended, dismissed or expulsed

25

slide-26
SLIDE 26

Override Policy

  • Email HTAs if
  • You are a graduate student
  • You are RISD student and need a signature

26

slide-27
SLIDE 27

Email Policy

  • Unless matter is private always email HTAs!
  • Your email can get lost in my inbox
  • It may take me a while to get to your email
  • HTAs may get to it faster & will remind me

27

slide-28
SLIDE 28

References

  • Slide #2
  • A statue of Muhammad ibn Musa al-Khwarizmi; a persian scholar from the 9th

century

  • “Algorithms” is derived from “Algoritmi” which is the Latin translation of his

name

  • Worked in mathematics, astronomy and geometry
  • Founded the field of Algebra
  • Slide #10
  • Lionel Messi is a soccer player that plays for Barcelona and Argentina
  • He is considered one of the best soccer players of all time
  • Won 5 Ballon D’ Ors, 8 La Liga titles, 4 Champions League titles
  • Scored the most goals and made the most assists in La Liga history

28