Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13214

Re: Needing a Random List of Non-repeating Values whose Range and Length

From Szabolcs Horvát <szhorvat@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Needing a Random List of Non-repeating Values whose Range and Length
Date 2013-01-19 06:13 +0000
Message-ID <kdddiu$a1j$1@smc.vnet.net> (permalink)
References <kdanrk$3ec$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On 2013-01-18 05:50:44 +0000, brtubb090530@cox.net said:

> Consider the following:
> 
> ril[range_Integer]:= RandomInteger[{1,range},range]
> 
> This function is almost what I want; but I need one which doesn't 
> include any repeated values. This is intended for use, for example, for 
> a card deck, or dice, etc.

The subject line is cut off.  Please do not put the question in the 
subject *only*.

>From the body of your message it looks like you want a random 
permutation of Range[range] which can be computed using 
RandomSample@Range[range]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Needing a Random List of Non-repeating Values whose Range and Length brtubb090530@cox.net - 2013-01-18 05:50 +0000
  Re: Needing a Random List of Non-repeating Values whose Range and Length buxi@gmx.at - 2013-01-19 06:13 +0000
  Re: Needing a Random List of Non-repeating Values whose Range and Length svkeeley@aol.com - 2013-01-19 06:14 +0000
  Re: Needing a Random List of Non-repeating Values whose Range and Length Szabolcs Horvát <szhorvat@gmail.com> - 2013-01-19 06:13 +0000
  Re: Needing a Random List of Non-repeating Values whose Range and Length svkeeley@aol.com - 2013-01-19 06:14 +0000

csiph-web