From ruzankin at math.nsc.ru  Wed Oct 18 16:54:54 2017
From: ruzankin at math.nsc.ru (Pavel S. Ruzankin)
Date: Wed, 18 Oct 2017 21:54:54 +0700
Subject: [Rd] uniform sampling without replacement algorithm
In-Reply-To: <CAF8bMcbQzEQC368x4esGR+9MHvuuR-7dTgfsgiYkR+HkbtWFfg@mail.gmail.com>
References: <CAF8bMcbQzEQC368x4esGR+9MHvuuR-7dTgfsgiYkR+HkbtWFfg@mail.gmail.com>
Message-ID: <0256e96b-3610-0b05-0336-f7b103ebde40@math.nsc.ru>

The binary tree algorithm does not need additional scrambling. I have 
written the R code for the algorithm in the last answer at:
https://stackoverflow.com/questions/311703/algorithm-for-sampling-without-replacement/46807110#46807110

However, the algorithm will probably be outperformed by hash table 
algorithms for relatively large sample sizes.



[Rd] uniform sampling without replacement algorithm
Pavel S. Ruzankin