Random combination of letter generator

In summary, to generate a random 3-4 letter sequence and store it in an array without repetition, you will need to use a programming language with a predefined random function. Translate the random number to a 3 or 4-letter sequence and save all sequences in a vector. Then, check if the newly generated sequence is already in the vector and generate a new one if it is. You can use MATLAB or visual basic for this task by creating buttons to display the combinations. Another option is to produce an exhaustive list of all possible combinations and select from it.
  • #1
rppearso
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?
 
Physics news on Phys.org
  • #2
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
Erland said:
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 to Random combination of letter generator

1. How does a random combination of letter generator work?

A random combination of letter generator uses an algorithm to select letters from a given set of characters and creates a string of random letters. The algorithm ensures that each letter has an equal chance of being selected, resulting in a truly random combination.

2. Can I customize the length and format of the generated letters?

Yes, some random combination of letter generators allows you to choose the length of the string and the format of the letters, such as uppercase or lowercase. This can be useful for specific applications or purposes.

3. How many letters can be generated at once?

The number of letters that can be generated at once depends on the specific random combination of letter generator being used. Some may have a limit, while others may allow for an unlimited number of letters to be generated.

4. Are the letters truly random or is there a pattern?

The letters generated by a random combination of letter generator are truly random. However, depending on the algorithm used, some patterns may be more likely to occur than others. It is important to choose a reliable and well-tested generator for truly random results.

5. Can a random combination of letter generator be used for encryption?

Yes, a random combination of letter generator can be used for encryption by creating a random string of letters to be used as a key. However, it is important to use a cryptographically secure generator for encryption purposes to ensure the randomness and security of the key.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
721
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
743
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
676
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
798
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
Back
Top