14 Aug 2002 02:17:31 -0400

Related articles |
---|

determining which bin contains which string partha@berkeley.innomedia.com (Partha Saha) (2002-08-04) |

Re: determining which bin contains which string vbdis@aol.com (VBDis) (2002-08-10) |

Re: determining which bin contains which string ralph@inputplus.co.uk (Ralph Corderoy) (2002-08-14) |

Re: determining which bin contains which string jakacki@hotmail.com (Grzegorz Jakacki) (2002-08-23) |

From: | "Ralph Corderoy" <ralph@inputplus.co.uk> |

Newsgroups: | comp.compilers |

Date: | 14 Aug 2002 02:17:31 -0400 |

Organization: | InputPlus Ltd. |

References: | 02-08-014 |

Keywords: | lex |

Posted-Date: | 14 Aug 2002 02:17:31 EDT |

Hi Partha,

*> I have strings of length 12, the alphabets are 0-9,a,b,c,d,e,f (i.e.,*

*> they are "hexadecimal" strings). Clearly the number of strings*

*> possible is huge = 16^12*

So you want to map the numbers 0..2^48-1 onto bin number 1..n.

*> Instead of keeping a table of N rows where each row has a mapping of*

*> string to bin number, I am wondering if I could design a finite state*

*> machine*

Out of interest, does it *have* to be a FSM?

Have you considered a Trie or a PATRICIA tree?

http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Tree/Trie.html

Cheers,

Ralph.

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.