Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Efficiency of 'a list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Diego Olivier Fernandez Pons <Diego-Olivier.FERNANDEZ-PONS@c...>
Subject: Re: [Caml-list] Two types of efficiency (Was Efficiency of 'a list)
    Bonjour,

> Languages like PHP have more advanced built-in datastructures with
> language syntax to support them. In Ocaml, we can create the same
> program, however, there is no syntax support, and we have to add
> declarations like
>
> module StringSet = Set.Make(struct
>       type t = string
>       let compare = compare
>     end) ;;
>

You should not use a set of strings but a trie. There are of course a
lot of ways to implement tries :

- trees of lists
- trees of arrays (or an optimized version with strings)
- ternary trees (balanced or not)

You may even minimize your acyclic automaton using any of the
following algorithms :
- 2 phases algorithm (cf Dominique Revuz PhD thesis)
- Incremental minimization (Incremental construction of a minimal
acyclic finite state automata, Daciuk, Milhov, B. Watson, R. Watson,
Computer linguistics volume 26 number 1 mars 2000)
- minimization by Brzozowki's algorithm
- minimization by Hopcroft's algorithm

For which one of these versions should Caml provide build-in support ?

        Diego Olivier

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners