Another technique would be to use a rng with a range of say a billion numbers 
and assign them in order to each of the 10,000 numbers (the same as most 
previous suggestions) and then sort.  The advantage would fewer duplicates (if 
you think that might affect randomness).

I've needed similar techniques to generate data to test binary search algorithm 
performance against hash search algorithm performance.  The randomness of the 
order of the input data caused some cache line thrashing in the binary search 
which we felt was more realistic than just feeding the data in order.  For hash 
searches of course the order makes no difference.  But duplicates were not a 
problem for this problem.

In another way of looking at it, you are testing how well you shuffled a deck 
of 10,000 (instead of 52) cards.  According to theory, for a 52-card deck 7 cut 
and riffle shuffles have been considered sufficient for most card games.  But 
since you aren't simulating cut and riffle shuffles, proving that your order of 
numbers is random really relies on proving that your rng actually produces 
random numbers.  This is a very non-trivial task.   In my prior research I 
learned that some commonly used rng algorithms have serious flaws that were 
only discovered years after they'd made it into common usage.

Gary Weinhold
Senior Application Architect

DATAKINETICS | Data Performance & Optimization

Phone:  +1.613.523.5500 x216<tel:+1.613.523.5500%20x216>
Email:  weinh...@dkl.com<mailto:weinh...@dkl.com>

[http://www.dkl.com/wp-content/uploads/2015/07/dkl_logo.png]<http://www.dkl.com/>

Visit us online at www.DKL.com<http://www.dkl.com/>

[http://www.dkl.com/wp-content/uploads/2015/08/banner.png]<http://www.dkl.com/mailsig>

E-mail Notification: The information contained in this email and any 
attachments is confidential and may be subject to copyright or other 
intellectual property protection. If you are not the intended recipient, you 
are not authorized to use or disclose this information, and we request that you 
notify us by reply mail or telephone and delete the original message from your 
mail system.



__________
On 2017-05-16 18:46, Richard Kuebbing wrote:

Fantastic.  This looks to be the level of brilliance I was looking for - 
simplicity plus 100% solution.

So follow-up question.  I have a lot of advanced math in grad school, all inapplicable to 
this.  Is there any kind of measure of how "random" a set of numbers is?  
Someone internal is bound to ask.  I am thinking of graphing the difference 
[=n(i+1)-n(i)] and looking at distribution.  The client(s) are business persons and are 
unlikely to ask.

Question 2:  I have a passion for documenting things.  Do you wish to have your 
name attached to this idea?

Tomorrow when I have time I will peruse all the answers.

Profound thanks

Peace be w/y'all

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Farley, Peter x23353
Sent: Tuesday, May 16, 2017 4:51 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU<mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Subject: Re: random quest

1.      Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2.      Add a second column using SORT with sequential numbers from 1 to 99999 
(use the SEQNUM option).
3.      SORT by the first column only and DO NOT specify the EQUALS option.
4.      Use the numbers in column 2 after sorting as your 99,999 randomly 
ordered numbers

You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.

HTH

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU<mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you

Reply via email to