{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

recitation06

recitation06 - MIT OpenCourseWare http/ocw.mit.edu 6.006...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
MIT OpenCourseWare http://ocw.mit.edu 6.006 Introduction to Algorithms Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6.006 Recitation Build 2008.12
Background image of page 2
PS1 Solutions Posted on homework page Password-protected Please write down username/password
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Coming Up Next... More hashing! Rabin-Karp (String Matching) vs the dumb naive algorithm Rolling Hashes Black Magic: why it works
Background image of page 4
Hashing without tables Fancy names: fingerprint, message digest Idea (hashing repeated): given an object, compute a summary that’s easier to work with Very versatile concept! Don’t forget it!!
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Hashing human beings
Background image of page 6
Hashing human beings Want something easy to handle
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Hashing human beings Want something easy to handle fingerprints (doh) DNA samples iris scans face picture
Background image of page 8
Naive String Matching Want to find pattern in text Slide pattern over text one by one character If pattern matches overlapping characters of text, report match
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Rabin-Karp Want to find pattern in text Slide pattern over text one by one character If hash(pattern) matches hash(overlapping characters of text) If pattern matches overlapping
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}