caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Berke Durak <berke@altern.org>
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?
Date: Mon, 2 Sep 2002 23:30:03 +0200	[thread overview]
Message-ID: <20020902213003.GC466@gogol> (raw)
In-Reply-To: <15731.25402.232987.3449@gargle.gargle.HOWL>

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


  parent reply	other threads:[~2002-09-02 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D70203F.1000106@ozemail.com.au>
2002-09-02  9:40 ` [Caml-list] Explaining bit sets Diego Olivier Fernandez Pons
2002-09-02 13:10   ` [Caml-list] Holding a set of random integers of very wide range? john.chu
2002-09-02 13:25     ` Noel Welsh
2002-09-02 17:18     ` Tim Freeman
2002-09-02 21:30     ` Berke Durak [this message]
2002-09-02 23:46   ` [Caml-list] Explaining bit sets Yamagata Yoriyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020902213003.GC466@gogol \
    --to=berke@altern.org \
    --cc=caml-list@inria.fr \
    --cc=john.chu@east.sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).