Random combination of letter generator

  • Thread starter rppearso
  • Start date
  • #1
204
3
Does anyone know where I can go to figure out how to generate a random 3-4 letter sequence BUT with every click that sequence is stored in an array and can not come up again?
 

Answers and Replies

  • #2
Erland
Science Advisor
738
136
Do you have access to a programming language (Java, C, Pascal, etc...) with a prefined random function? Then, it should be no problem to translate a random number between 0 and 1 to a 3 or 4-letter sequence. Then, save all your sequences in a vector, and for every newly generated sequence, check if it is already in the vector, and generate a new one if it is so.
 
  • #3
204
3
Do you have access to a programming language (Java, C, Pascal, etc...) with a prefined random function? Then, it should be no problem to translate a random number between 0 and 1 to a 3 or 4-letter sequence. Then, save all your sequences in a vector, and for every newly generated sequence, check if it is already in the vector, and generate a new one if it is so.

Hello Erland,

Thank you so much, I have access to matlab and visual basic. I have a moderate amount of experience with both but I am a little shakey on forming a vector and having the loop read from that vector. I know visual basic has a "randomize timer" function. Not sure about matlab. With Visual basic I can create buttons to display a new combination each time. So actually it would not even be a loop because I would want it initiated from a button click rather than automaticly. Of course another method might be to display all the possible combinations at one time and I could just scour through them.

It might be better to produce an exhuastive list of all possible letter combinations for 3 or 4 charachters.
 

Related Threads on Random combination of letter generator

  • Last Post
Replies
12
Views
5K
  • Last Post
Replies
4
Views
2K
Replies
2
Views
3K
Replies
0
Views
1K
  • Last Post
Replies
2
Views
7K
  • Last Post
Replies
6
Views
22K
  • Last Post
Replies
11
Views
9K
Top