63demo-kmp - DFA Construction for KMP Search Pattern b a a...

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: DFA Construction for KMP Search Pattern b a a a j b b pattern[1..j] X next a a a b 0 DFA Construction for KMP Search Pattern b a a a j 0 pattern[1..j] X 0 next 0 a a b b a b 0 1 0 b 0 a 1 DFA Construction for KMP Search Pattern b a a a j 0 1 pattern[1..j] a X 0 1 next 0 0 a a b b a b 0 1 0 1 2 0 b 0 a b 1 a 2 DFA Construction for KMP Search Pattern b a a a j 0 1 2 pattern[1..j] a a X 0 1 0 next 0 0 2 a a b b a b 0 1 0 1 2 0 2 2 3 b b 0 a b 1 a a 2 b 3 DFA Construction for KMP Search Pattern b a a a j 0 1 2 3 pattern[1..j] a a a X 0 1 0 1 next 0 0 2 0 a a b b a b 0 1 0 1 2 0 2 2 3 3 4 0 b b a b 0 a b b 1 a a 2 b 3 a 4 DFA Construction for KMP Search Pattern b a a a j 0 1 2 3 4 pattern[1..j] a a a a X 0 1 0 1 2 next 0 0 2 0 0 a a b b a b 0 1 0 1 2 0 2 2 3 3 4 0 4 5 0 b b b a a a b b 0 a b b 1 a a 2 b 3 a 4 a 5 DFA Construction for KMP Search Pattern b a a a j 0 1 2 3 4 5 pattern[1..j] a a a a a X 0 1 0 1 2 2 next 0 0 2 0 0 3 a a b b a b 0 1 0 1 2 0 2 2 3 3 4 0 4 5 0 5 6 3 b b b b a a a a a a b b 0 a b b 1 a a 2 b 3 a 4 b a 5 a 6 DFA Construction for KMP Search Pattern b a a a j 0 1 2 3 4 5 6 pattern[1..j] a a a a a a X 0 1 0 1 2 2 3 next 0 0 2 0 0 3 2 a a b b a b 0 1 0 1 2 0 2 2 3 3 4 0 4 5 0 5 6 3 6 2 7 b b b b b a a a a a a a a a b b b 0 a b b 1 a a 2 b 3 a 4 b a a 5 a 6 b 7 DFA Construction for KMP Search Pattern b a a a j 0 1 2 3 4 5 6 7 pattern[1..j] a a a a a a a X 0 1 0 1 2 2 3 0 next 0 0 2 0 0 3 2 4 a a b b a b 0 1 0 1 2 0 2 2 3 3 4 0 4 5 0 5 6 3 6 2 7 7 4 8 b b b b b b a a a a a a a a a a a a b b b b b 0 a b b 1 a a 2 b 3 a 4 b a a 5 a a 6 b 7 b 8 ...
View Full Document

This note was uploaded on 06/25/2009 for the course MATH MAT 400 taught by Professor Jamespotvein during the Fall '08 term at University of Toronto.

Ask a homework question - tutors are online