Post Reply 
Shuffling arrays question
02-28-2015, 10:42 PM
Post: #1
Shuffling arrays question
Does anyone know of an algorithm to shuffle an array of integers WITHOUT USING RANDOM NUMBER FUNCTIONS? I discovered a good (not the best) method for generating random numbers is that you start with an array of n elements (with values from 1 to n), shuffle the elements of that array and then divide each array element by n+1. You get a good set of random numbers. I can do the shuffling using random number functions, like randperm in Matlab. I am looking for a way to shuffle the array (initially in ascending or descending order) using clever swaps of elements. I am basically looking to transform perfect order into as perfect chaos as possible!

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Shuffling arrays question - Namir - 02-28-2015 10:42 PM
RE: Shuffling arrays question - Paul Dale - 03-01-2015, 12:42 AM
RE: Shuffling arrays question - Namir - 03-01-2015, 01:10 PM
RE: Shuffling arrays question - Namir - 03-01-2015, 06:48 PM
RE: Shuffling arrays question - BruceH - 03-07-2015, 05:56 AM



User(s) browsing this thread: 1 Guest(s)