Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33936
| From | Andreas Leitgeb <avl@logic.at> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Random permutations [was Re: Libraries for sysadmins?] |
| Date | 2016-03-05 19:40 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnndmdna.456.avl@login.logic.tuwien.ac.at> (permalink) |
| References | (5 earlier) <nbd7c3$3jp$1@news.albasani.net> <djvt76Fs5qfU2@mid.individual.net> <nbeunm$drn$1@news.albasani.net> <slrnndm9jm.456.avl@login.logic.tuwien.ac.at> <nbf9c2$9d4$1@dont-email.me> |
Eric Sosman <esosman@comcast-dot-net.invalid> wrote: > On 3/5/2016 1:30 PM, Andreas Leitgeb wrote: >> Sebastian <news@seyweiler.dyndns.org> wrote: >>> Am 05.03.2016 12:11, schrieb Robert Klemme: >>>> On 05.03.2016 00:56, Sebastian wrote: >>>>> new Random().ints(1, 50).distinct().limit(6) >>>> Are you sure this has the same probability characteristics as picking >>>> six random items from a list of 49? >>> I think yes, because Random#ints() is evenly distributed. >> Maybe similar enough for almost all practical purposes, but >> strictly speaking, the distinct() might pass through a set >> of less than 6 different ints. >> Anyone care to calculate the probability of that happening? >> I'm too lazy (and my skill too rusty by now), to do it myself. > Zero. > However, the running time is (in principle) unbounded. Sorry, you're right. My mistake was that I thought the stream of random ints would be somehow limited in the number of ints generated. Seems not to be.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Libraries for sysadmins? Elena <egarrulo@gmail.com> - 2016-03-04 03:33 -0800
Re: Libraries for sysadmins? Martin Gregorie <martin@address-in-sig.invalid> - 2016-03-04 11:44 +0000
Re: Libraries for sysadmins? egarrulo <egarrulo@gmail.com> - 2016-03-04 12:56 +0100
Re: Libraries for sysadmins? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-04 07:43 -0500
Re: Libraries for sysadmins? Robert Klemme <shortcutter@googlemail.com> - 2016-03-04 18:06 +0100
Re: Libraries for sysadmins? egarrulo <egarrulo@gmail.com> - 2016-03-04 20:30 +0100
Random permutations [was Re: Libraries for sysadmins?] Sebastian <news@seyweiler.dyndns.org> - 2016-03-05 00:56 +0100
Re: Random permutations [was Re: Libraries for sysadmins?] Robert Klemme <shortcutter@googlemail.com> - 2016-03-05 12:11 +0100
Re: Random permutations [was Re: Libraries for sysadmins?] Sebastian <news@seyweiler.dyndns.org> - 2016-03-05 16:41 +0100
Re: Random permutations [was Re: Libraries for sysadmins?] Brixomatic <brixomatic@yahoo.com> - 2016-03-05 19:20 +0100
Re: Random permutations [was Re: Libraries for sysadmins?] Andreas Leitgeb <avl@logic.at> - 2016-03-05 18:46 +0000
Re: Random permutations [was Re: Libraries for sysadmins?] Brixomatic <brixomatic@yahoo.com> - 2016-03-15 19:22 +0100
Re: Random permutations [was Re: Libraries for sysadmins?] Andreas Leitgeb <avl@logic.at> - 2016-03-15 22:30 +0000
Re: Random permutations [was Re: Libraries for sysadmins?] Andreas Leitgeb <avl@logic.at> - 2016-03-05 18:30 +0000
Re: Random permutations [was Re: Libraries for sysadmins?] Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-05 13:46 -0500
Re: Random permutations [was Re: Libraries for sysadmins?] Andreas Leitgeb <avl@logic.at> - 2016-03-05 19:40 +0000
Re: Libraries for sysadmins? Robert Klemme <shortcutter@googlemail.com> - 2016-03-05 12:10 +0100
Re: Libraries for sysadmins? Arne Vajhøj <arne@vajhoej.dk> - 2016-03-04 21:42 -0500
Re: Libraries for sysadmins? Arne Vajhøj <arne@vajhoej.dk> - 2016-03-04 21:48 -0500
csiph-web