Share
Explore BrainMass

Random Number Generation

From ancient times when coins were flipped and dice rolled for gambling, people have needed random number generation. Formally defined, a random number generator is a physical or computational device which generates an array of symbols or numbers with no pattern. There has always been a large demand for random data generation from everything requiring unpredictable results, from the lottery, to computer simulations to cryptography to statistical sampling. There are two main methods of generating random numbers:

  • physically

Physically-based random number generators take advantage of naturally-occurring randomization. True examples of these are difficult to find, but the most commonly-used ones are atomic or subatomic phenomena such as radioactive decay, whose randomness is guaranteed as a result of the laws of quantum mechanics. It is necessary with this method to ensure you are compensating for any biases that may occur as a result of measuring this random natural process, however.

  • computationally

This method makes use of algorithms designed to produce unpredictable results by performing operations on a 'seed' key that is given as input. They are often complex, but also known as 'pseudo-random number generators' as there is a relation between the values and the seed, however distant.

As well as produce random numbers, there exists a type of tool called a randomness extractor which turns randomly-arranged data into a uniform distribution. A cryptography hash function is a good example of such a tool.

Guessing Game

Write a program in C++ to play a guessing game with the user. The program should be able to make a guess about the chosen number by the user and ask whether the guessed number is above or below the chosen number. If the guess is correct the program should report the number of tries and the correctly guessed number. As an advanc

C++ Linked List

Write a program to check out how good my new random number generator generates numbers. A good generator produces evenly distributed numbers over some range. determine how well these numbers are dispersed between 1 and 100. generate 10,000 random numbers between 1 and 100 and count how many times each number is produced. F

Java - Permutation Programs

Write a program that produces random permutations of the numbers 1 to 10. To generate a random permutation, you need to fill an array with the numbers 1 to 10 so that no two entries of the array have the same contents. You could do it by brute force, by calling Random.nextInt until it produces a value that is not yet in the arra

Chiper code in C++

You have TWO OPTIONS on how to send in this assignment (either way will get you the same credit): [1] Either by HAND e.g., WRITE OUT a little Table/Figure (use Excel Worksheet? MS Word "Table"? However you want to do it) that will illustrate the 2 rows of Alphanumeric letters as follows (with OUT the "

Random Number Generation: Windows Program

Write a Windows Form program to guess against a list of randomly generated numbers. Create a Form, name it GuessANumber and create a randomly generated array containing 100 integer numbers. See examples for random number generation at the following sites: http://www.dotnetperls.com/random http://www.c-sharpcorner.com/Uplo

C++ program to parse country names and store them in a hash table

I am trying to create a program to help me with my business. Here is a list of the countries around the world: http://www.arrl.org/files/file/DXCC/dxcclist_2011e.txt Parse this list as appropriate to retrieve just the country names. Remove any country names that involve more than a single word. Use the remaining list of si

Object Oriented Program in JAVA to play Game of Life

Consider a rectangular matrix of cells, each of which may contain an organism. If the matrix is viewed as extending indefinitely in both directions, then each cell has eight neighbors, the eight cells surrounding it. In each generations births and deaths occur according to following rules: 1. An organism is born in any empty ce

Information Security: DES and Rijndael Protocol

1.What is DES? What is triple DES? How did the Rijndael protocol enhance DES? 2.What are substitution ciphers? How do they differ from one-time pads (OTP)? Which is better for the IS manager to employ and why?

Write a HTML script that plays "guess the number" game.

Write a HTML script that plays a "guess the number" game as follows. The program chooses the number to be guessed by selecting a random integer in the range of 1 to 1000. The script displays the prompt "Guess a number between 1 and 1000" next to a text field. The player types a guess into the text field and clicks a button

Write a C# Windows Form program to pick the larger of randomly generated numbers.

Write a C# Windows Form program to pick the larger of randomly generated numbers. 1. Create a Form that contains two randomly generated parallel arrays, each containing 100 numbers. 2. The random number generation for both arrays will be done in a method, both when the arrays are first populated and when they have to be re

Write a Java program to generate 20 random numbers between 1 and 50, write them to a binary file and then read the numbers back from the file to display them on the screen along with the frequency of occurrence of each number in a nice format.

Write a program to generate 20 random numbers between 1 and 50, write them to a binary file and then read the numbers back from the file to display them on the screen along with the frequency of occurrence of each number in a nice format. Use the Random class in the java.util package for random number generation. Please go th

The objective of this Java program is to accept two random numbers from the user and then multiply the two numbers. The application is comprehensive and includes comments as well as documentation.

I need help with this: Exercise 6.30: Computers are playing an increasing role in education. Write a program that will help an elementary school learn multiplication. Use a Random object to produce two positive one-digit integers. The program should then prompt the user with a question, such as How much is 6 ti

Programming in Java II

Question #1: Develop a program that prompts the user to guess the outcome of a die throw. Then throw a die (using a random number generator) and inform the user if they guessed the correct outcome. Count the number of correct guesses. Develop the program using a separate class for the die. Your program should contain two separat

Find / resolve c program segmental fault

Need some assistance finding / repairing segmentation fault in program. The attached program uses a random number generator, orders numbers hi to low, displays hi number, low number and should display mean and median numbers from random list. I run "./random2 1 100 20" to generate 20 numbers between 1 and 100, (./random2 min

Download a shareware version of some commercial software. Design a plan for converting the shareware version to a full version without paying one cent. If it is not possible for the shareware to be converted to a full version, analyze what kind of techniques the software vendor has used to protect it. In addition, use some of the techniques mentioned in the attached document to do some black-box testing on the software and report your results in the report.

Download a shareware version of some commercial software. Design a plan for converting the shareware version to a full version without paying one cent. If it is not possible for the shareware to be converted to a full version, analyze what kind of techniques the software vendor has used to protect it. In addition, use some of th

Testing Shareware Product- Black Box Testing

Download a shareware version of some commercial software. Design a plan for converting the shareware version to a full version without paying one cent. If it is not possible for the shareware to be converted to a full version, analyze what kind of techniques the software vendor has used to protect it. (You may use your intuition

Random-number generation - Java

Write an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, concatenate it to

Require in giving criticism-remarks on the enclosed java code

The enclosed Java code was suppose to address the following problem, where I require in giving comments/criticism/remarks if possible with respect to the Java coding standards. Problem Details: Write a Java program which defines two unconstrained arrays of user defined length n, that contain n Random numbers each and which out

Write a program in Java to simulate the generation of lottery (lotto) numbers.

The Lottery Problem: A lottery requires that you select six different numbers from the integers 1 to 49. Write a Java program that will do this for you and generate five sets of six numbers as a result. For generating random numbers you can use the random() static method of class Math. It returns a double so you will need to

Networks - Access Protocols/PKI

1. Provide the different access protocols, such as Carrier Sense Multiple Access (CSMA), Carrier Sense Multiple Access with Collision Detection (CSMA/CD) and Wavelength Division Multiplexing Access (WDMA). Where would these types of protocols would be used? Explain the situations with examples. 2. Describe an example of the

Division method for a hash function

Please review the problem and explain each step of the solution listed below, and give me an example of an application which this property would be undesirable in a hash function. problem ---------- Consider a version of the division method in which h(k) = k mod m, where m = (2^p) -1 and k is a character string interpreted

Programming Java

I have written code for a program (attachment) in java. In it, my main method contained all of my program code. The program asks the user four questions. It converts the person's favourite color, person's gender and person's level of education into a corresponding number. Finally a lucky number is generated based on a mathem