{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

recitation06

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

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

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 .

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

View Full Document
6.006 Recitation Build 2008.12

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

View Full Document
Coming Up Next... More hashing! Rabin-Karp (String Matching) vs the dumb naive algorithm Rolling Hashes Black Magic: why it works
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!!

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

View Full Document
Hashing human beings
Hashing human beings Want something easy to handle

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

View Full Document
Hashing human beings Want something easy to handle fingerprints (doh) DNA samples iris scans face picture
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}