From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA10570; Mon, 2 Sep 2002 23:27:45 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA11119 for ; Mon, 2 Sep 2002 23:27:44 +0200 (MET DST) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g82LRhr21650 for ; Mon, 2 Sep 2002 23:27:44 +0200 (MET DST) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto2.wanadoo.fr (6.5.007) id 3D5392B600A50DE5; Mon, 2 Sep 2002 23:27:42 +0200 Received: from gogol (193.248.191.208) by mel-rta9.wanadoo.fr (6.5.007) id 3D6EE83C001E334F; Mon, 2 Sep 2002 23:27:42 +0200 Received: from berke by gogol with local (Exim 3.35 #1 (Debian)) id 17lyln-0000G5-00; Mon, 02 Sep 2002 23:30:03 +0200 Date: Mon, 2 Sep 2002 23:30:03 +0200 From: Berke Durak To: john.chu@east.sun.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] Holding a set of random integers of very wide range? Message-ID: <20020902213003.GC466@gogol> References: <3D70203F.1000106@ozemail.com.au> <15731.25402.232987.3449@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15731.25402.232987.3449@gargle.gargle.HOWL> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Sep 02, 2002 at 09:10:18AM -0400, john.chu@east.sun.com 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. -- Berke ------------------- 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