Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Explaining bit sets
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-02 (21:27)
From: Berke Durak <berke@a...>
Subject: Re: [Caml-list] Holding a set of random integers of very wide range?
On Mon, Sep 02, 2002 at 09:10:18AM -0400, wrote:
> For reasons I tried to explain in a previous draft of this e-mail and
> has been cut due to the amount of space it took, I need to generate
> multiple permuted lists of integers ranging from 0 to approximately
> 2^100 (or more, it's a bit open-ended unfortunately).

You can solve that problem in constant space by encrypting a counter
using a convenient block cipher (such as RC6 or idea).  Since
encryption is bijective, you are assured of not hitting the same
integer twice. You have to somehow encode and decode integers, but in
runs in constant space and time.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: