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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 . 6.006 Recitation Build 2008.12 PS1 Solutions Posted on homework page Password-protected Please write down username/password 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: fngerprint, message digest Idea (hashing repeated): given an object, compute a summary thats easier to work with Very versatile concept! Dont orget it!! Hashing human beings Hashing human beings Want something easy to handle Hashing human beings Want something easy to handle fngerprints (doh) DNA samples iris scans Face picture Naive String Matching Want to fnd pattern in text Slide pattern over text one by one character IF pattern matches overlapping characters oF text, report match Rabin-Karp Want to fnd pattern in text Slide pattern over text one by one character IF hash(pattern) matches hash(overlapping characters oF text) IF pattern matches overlapping characters oF text report match...
View Full Document

Page1 / 25

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

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online