Lets call picking a character - probing.įrom the four rules below it's possible to build different tries depending on the order of picking characters from the strings. Thanks to this ability we can minimize the built trie. g., we are free to start constructing the trie from character position 2 as opposed to starting from 1). We are free to pick an arbitrary character position on each step of constructing the trie (e. The leaves of the resulting trie (each leaf represents a string) have to be in the same exact order as the given collection of strings. The goal is to construct the trie with the minimum possible number of edges. The strings are indexed starting from 1 (not 0) Given n ordered strings (lets call them rules) of m characters. I'm asking if someone can explain it.īelow I rewrote the task in a shorter form than in the book: That step doesn't contain enough details for me so I don't understand it. The book gives an example task and then explains how to solve it step by step.īut I don't follow one step from the solution. I am reading The Algorithm Design Manual, 2nd Edition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |