PDA

View Full Version : Research help


john_tom_mike
05-04-2009, 02:03 AM
I am a medical student at Drexel Medical College. I want to create a random number generator to help me with my medical research.

Basic idea: I have 60-70 patients, and I want to pick 6 random patients to make a set. I want the program to pick out several sets of patients.
The HARD part: I can't have the computer pick out three patients from an old set to make the new set.

For instance:

set 1: patients 1,2,3,4,5,6
set 2: patients
- so, the new set CANNOT contain the following patient combinations
1,2,3,x,x,x
2,3,4,x,x,x
1,3,4,x,x,x etc...
x = any number
- can be x,x,x,x,x,x
1,x,x,x,x,x
2,x,x,x,x,x
1,2,x,x,x,x
2,3,x,x,x,x
3,4,x,x,x,x etc...

I have a random number generator, but I need a script to prevent the program from picking 3 of the previous patients. I don't know if this can be done? If so, does anyone know how or can anyone give me some help?

Thanks so much. :D

hthought
05-04-2009, 02:09 AM
Surely this can be done, but you have to keep a history. The way you decide to do that is up to you. You can build a linked list or even keep those records at a file or database. But you certainly need such a way to know which numbers where picked.

john_tom_mike
05-04-2009, 02:22 AM
Does anyone know of or have a working linked list script that wouldn't mind sharing?

I talked to a friend, and he said that I could use dimensioning or array? I have no idea of what this is, but can anyone explain? Would it be easier for me to go with the linked list or should I go through the trouble of understanding dimensioning?