Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Thought, might be helpful to have a quick reference for some other readers...

Patrica Tree/Trie = "Practical Algorithm to Retrieve Info Coded In Alphanumeric," where Trie came from reTRIEval (pronounced either "tree" or "try")

Suppose you have data: good gal bad gag

How it looks like in a noncompact tree:

	         ^    ____ $ ___(NULL)
	     /  / \ \
	    b  g  g  g
	   /  /   |   \
	  a  a    a    o
	 /   |    |     \
	d    g    l      o
	|    |    |       \
	$    $    $       d
	|    |    |       |
         (bad)(gag)(gal)     $
                             |
                          (good)


How it looks like in a Patrica Tree

	       ^    ____ $ ___(NULL)
	     /    \ 
	    b     g 
	   /    /   \
	  a    a     o
	 /    |  \    \
	d     g   l    o
	|     |   |     \
	$     $   $     d
	|     |   |     |
         (bad)(gag) (gal)  $
                           |
                        (good)

I suppose most people know in this context DFA and NFA stand for "Deterministic Finite Automaton" and "Nondeterministic Finite Automaton" respectively, not "Dairy Farmers of America" and "National Farmers Association."


In reply to Re: Re: 3 Examples of Multiple-Word Search n Replace by chunlou
in thread 3 Examples of Multiple-Word Search n Replace by chunlou

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.