Free Essay

Random Numbers

In: Computers and Technology

Submitted By Frances606
Words 9330
Pages 38
Random numbers in C++ and The Pythagorean Theorem

Name
Course
Date

Random numbers in C++ and The Pythagorean Theorem
Introduction
Computer programs in light of the technological advances that have been made, arguably make up for the most important concepts in such developments. A set of instructions designed to assist a computer to prefer a given task is referred to as a computer program. There are numerous languages used to create/design computer for instance Java Script, Java, C++, SQL and Sage (Laine, 2013). Computer programming is defined as a process of developing a working set of computer instructions meant to aid the computer in the performance of a given task. Computer programming starts with the formulation of a valid computer problem. This process is then followed by the development of an executable computer program, for instance Firefox Web Brower (Laine 2013). It is worth noting that there are other programs in the same realm. Computer programming is a diverse field that is of utmost importance in the modern world, especially with the continuous expansion of the internet. Perhaps the relevance of this can be underlined by the fact that computer programming has carved out as a course on itself. Computer programming is offered under several courses studied in colleges and universities (Laine, 2013). Computer programming is not only for computer students but for all who use computers on a day to day basis. This is by extension everyone since the use of computers is almost becoming a basic requirement. Computer programming requires a trained individual for the interpretation of data into information. Through the utilization of computer programming experts are able to create programs to real life problems like insurance policing and risk assessment. After which experts are able to address bugs in the designed programs for perfect of computer system operation (Laine, 2013).
Before an individual can learn how to develop a computer program, he/she must first learn how a computer works. After which the individual’s role assumes that of imputing instructions for the computer to execute (Laine, 2013). It is worth noting that the imputing of instructions is what determines the effectiveness of the computer program. This forms the backbone of the entire program. Basically computer programming is what is referred to as software writing, and it involves the use of process and procedures to achieve the set objective. Software writing for a program that outputs random numbers begins by writing a set of instructions in a source code representation. The source code representation must adhere to computer programming requirements (Laine, 2013). The instructions institute and manipulate different objects such as numbers, signs, graphics and words. Thus creating a computer program is an involving and delicate process much like building a home or composing music. Computer programming is therefore viewed by many as an art rather than an engineering activity. Computer intelligence is only dependent on the computer user (Laine, 2013). As such, computers are viewed as obedient devices that output the results of input data. A computer does exactly as instructed by the user, sometimes the results are not as expected in such a case fault rests with the computer user. Computer programming equips individuals with the know-how to express commands successfully for the desired results (Laine, 2013).
How Computer Programs Function
Every computer program functions by executing or implementing a stream of bytes that are coded in computer-machine language. These streams of bytes act like instructions to guide the computer program on what to do (Laine, 2013). It is extremely difficult for humans to code information directly using machine language, even for most system hackers. This is because the in-built coded system is the determinant of the instructions fed into it. As such simpler ways of coding instructions into the computer program involve the use of high level languages. High level languages have basically replaced the low-level assembler languages which are viewed as being thin and dependent of machine codes (Laine, 2013).
Interestingly, while the computer programmers are disposed to various means and methods of feeding the high level languages, the interpretation is basically the same. This explains the similarity and uniformity in solutions that are produced across the globe over different programs that have been developed independently for the same purpose.
There different types of high-level languages that are used by computer programmers. The source code of a given program is regarded as a transitional phase for instructions before they are availed to the computer in machine code form (Laine, 2013). Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.
The source code is referred to as the human generated and editable portion of the computer program that is created using a high level language like Logo.

Application-Specific Language (4GL)
Examples: Mathematica, SQL | High-Level Language
Examples: Logo, Smalltalk | Low-Level Language
Example: C | Assembler Language
Example: Intel X86 | |

Computers as such use binary numbers to represent information making source code different from machine code. Machine code utilizes decimal, binary, octal and hexadecimal numbers to store and process information (Laine, 2013). The role of a programmer is to create a source code that can be channeled into a machine code that the machine will recognize and obey. In the event that such information has been entered erringly, then there will be an error response. This is because it has by-passed the random entrance at this stage. This machine code bears symbolic meaning which the machine understands and follows (Laine, 2013). Below is a representation of how numbers and special characters are presented in binary, octal, decimal and hexadecimal form within the computer’s framework.
The numeric against the symbolic format Decimal
Number | in
Binary | in
Octal | in
Hexadecimal | 1 | 1 | 1 | 1 | 2 | 10 | 2 | 2 | 3 | 11 | 3 | 3 | 4 | 100 | 4 | 4 | 5 | 101 | 5 | 5 | 6 | 110 | 6 | 6 | 7 | 111 | 7 | 7 | 8 | 1000 | 10 | 8 | 9 | 1001 | 11 | 9 | 10 | 1010 | 12 | A | 11 | 1011 | 13 | B | 12 | 1100 | 14 | C | 13 | 1101 | 15 | D | 14 | 1110 | 16 | E | 15 | 1111 | 17 | F | 16 | 10000 | 20 | 10 |

|

ASCII
Character | in
Binary | in
Octal | in
Decimal | in
Hexadecimal | space | 00100000 | 040 | 32 | 20 | ! | 00100001 | 041 | 33 | 21 | ( | 00101000 | 050 | 40 | 28 | ) | 00101001 | 051 | 41 | 29 | 0 | 00110000 | 060 | 48 | 30 | 1 | 00110001 | 061 | 49 | 31 | 2 | 00110010 | 062 | 50 | 32 | 3 | 00110011 | 063 | 51 | 33 | A | 01000001 | 101 | 65 | 41 | B | 01000010 | 102 | 66 | 42 | C | 01000011 | 103 | 67 | 43 | D | 01000100 | 104 | 68 | 44 | A | 01100001 | 141 | 97 | 61 | B | 01100010 | 142 | 98 | 62 | C | 01100011 | 143 | 99 | 63 | D | 01100100 | 144 | 100 | 64 |

RANDOM NUMBERS
Random numbers are important for a number of reasons. For instance, random numbers are used to generate data encryption keys. They are also used in simulating and modeling complex entities/phenomena (Taylor & George , 2011). Random numbers are also used in the select of random samples form a population of data. Random numbers are utilized in literature and music to create an aesthetic atmosphere. Popular games and gambling utilize random numbers to enhance the aspect of diversity and unpredictability (Taylor & George , 2011). With regards to single values, a random numbers is a singular entity drawn from a set of possible values all of which have equal probability; they follow uniform distribution. Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.. A sequence of random numbers contains values that are independent of each other (Taylor & George , 2011).
With regards to computer programming, programmers have learnt the necessity of incorporating randomness in computer programs. This is an integral process owing to the nature of the system which is principled on randomness. Nevertheless a computer can never really do something that is totally by chance, because it follows set instructions blindly making it predictable to a range (Taylor & George , 2011). This is usually done at the command of the programmer. Failure to output results according to input instructions means the computer has a malfunction or is corrupted. There are two main mechanisms of generating/producing random numbers utilizing a computer (Taylor & George , 2011). The first approach is referred to as Pseudo-Random Number Generators (PRNGs). The second approach is called True Random Number Generators (TRNGs). The two mechanisms possess diverse characteristics, and encase different advantages and disadvantages (Taylor & George 2011).
C++ Programming
C++ programming language is one of most utilized programming languages and is used on numerous system hardware and operating system canvass (Hiscotta, 2014). Its utility is governed by its efficiency as a compiler to native code, making it applicable in the design of system software, device drivers, application software, entertainment software (video games), high performance server and client application, and embedded software. Globally, there are several groups renowned with the mass production of proprietary and free C++ compiler software one such company is Microsoft (Hiscotta, 2014). These different C++ compiler software developers have researched into the faults associated C++ programming. Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free..
They have realized 50% of the issues are user related. While 70-85% of failure issues are attributed to other causes like software was installed incorrectly or missing/deleted software components (Hiscotta, 2014). The failures associated with C++ are minimal because of its simplicity to use. The failures that do occur can be represented in a graph as shown below where the X-axis represents years, starting from 1994-2003. While the Y-axis represents percentage errors recorded for a particular year and their cause (Hiscotta, 2014).

Pseudo-Random Number Generators (PRNGs)
Despite what the name suggests “Pseudo” the numbers generated are not as random as expected. For instance an individual who is familiar with lottery tickets understands that there is a formula used to obtain the numbers. As such, PRNGs are regarded as computer algorithms that follow certain mathematical formulas to calculate and produce tables that contain sequences of numbers that seem random (Haahr, 2013). The best example of such a PRNG is seen in the Linear Congruential Method. A lot of research has been invested in the study of pseudo-random number theory. This accounts for the widest literature review available regarding this field. The research has been so successful that modern algorithms appear to generate pseudo-random numbers that are completely random (Haahr, 2013).
The most basic difference between Pseudo-Random Number Generators and True Random Number Generators can be understood by rolling a dice. PRNGs will use mathematical formulas to calculate the outcome of the dice roll. It associates the task to the results obtained when an individual rolls dices several times and records the findings (Haahr, 2013). So when an individual asks for a dice roll, the computer program simply outputs the number next in the list from the predetermined values that had been calculated using the mathematical formula. In effect the numbers seem random but they are actually preordained (Haahr, 2013). TRNGs work by instructing the computer to actually roll the dice, but mostly the computer uses other components that are easier to connect to the computer unlike a dice.
PRNGs are regarded as being efficient and deterministic (Haahr, 2013). They are viewed as being efficient seen they can produce numerous random numbers in a short time interval. They are said to be deterministic because they can reproduced a given sequence of random numbers in future as long as the start of the program is known (Haahr, 2013). Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free..
Efficiency is important is the goal of is to create an application that produces many random variables at a go. Determinism is good for it allows the application the feature of replaying events at a later stage, for instance a statistical model that replays frequency distribution data for multiple uses (Haahr, 2013).
PRNGs are periodic meaning that at some point the sequence of random numbers will repeat itself. Periodicity is not at all desired, for this reason modern PRNGs have been designed with a period that is extremely long, so long that it can be ignored in practical instances (Haahr, 2013). As such, PRNGs are suitable for programs that require a lot of random numbers and need for them to be replayed with ease. Good examples of such programs are simulation and modeling programs/applications. PRNGs are not considered suitable for programs or applications that require truly random and unpredictable outcomes like gambling (Haahr, 2013). This is because they have consistencies which would render the program almost unplayable. They do not work on a varied extent of uncertainty in number generation.
Even though very good PRNG algorithms exist, this does not mean they will yield the desired result. Sometime depending on the operating system used the results could be very good or not so good. For instance utilizing PHP, a web programming language the results obtained using Microsoft Windows and results obtained using Linux are slightly different. When Linux is used the sequence of random numbers generated is very good (Haahr, 2013). However, when Microsoft Windows is used the sequence of random numbers obtained is less than satisfactory. A researcher discovered in 2008, that utilizing PRNG in MacOS to simulate virus infection yielded results that were not so good (Haahr, 2013). As such, despite the ease of utilizing PRNGs it is important to understand which one works best with what.
Random Numbers in C++
A random number generator (RNG) is viewed as a device/tool that can be used to output sequences of values that follow no particular pattern. Random number generators are required to be tested using several statistical requirements for the purposes of validation. One application that is very important and requires randomness is cryptography. Other application like gaming and gambling also require randomness but cryptography is something that is used and devised by thousands of programmers globally. The worldwide need for randomness has resulted in the development of numerous random number generating techniques. Nevertheless all these techniques are classed under two groups, physical and computational. Both physical and computational groups have their weakness and strengths depending on their ability to devise random numbers and prioritize security. Physical methods are considered non deterministic, dependent on physical phenomena and quite unpredictable. Computational methods are more efficient than physical methods, deterministic (which also makes the application vulnerable to malicious replay attacks) and periodic meaning sequences of random numbers will be repeat a given point.
The Random number generation process is generally an easy process to identify and this makes it susceptible to attackers and hackers. If the hacker/attacker is able to forecast the sequence of random numbers, then the integrity and privacy of information contained therein is compromised. This deficiency has been utilized by hackers to access various sites. Attacks on random number generators are mostly hard to detect (let alone prevent) by using an upstream test to survey over the numbers. These attacks are so quick and easy such that the attack only requires only a single entirely into the system. The efficiency of attacks carried out on random number generators is enhanced by the non-requirement of information to be sent back to the attackers system. This only happens with computer virus that attack computer passwords and key. However, preventive computer programs that are being developed use numbers that are coded in a manner that cannot be simply manipulated and thus improving the safety of accessibility.
For instance RANDU a random number generator used in computer systems for decades was only recently proved unreliable because of its flawed nature. Research revealed that computer knowledge from a time RANDU was first designed was not so suitable for modern use.
Microsoft Company develops its own random number generator for all of its Windows products. Microsoft uses a random number generator referred to as CryptGenRandom to employ randomness in all Windows operating system. CryptGenRandom is also used in another Microsoft product referred to as Cryptographic Application Programming Interface, creating random numbers wherever they are required. This random number generator used by Microsoft is speculated to be cryptographically secure. Nevertheless no actually application algorithm regarding this generator has been published for verification and validation. However some computer programmers have used reversed engineering to conduct tests on the algorithm and their research has revealed certain imperfections with the program. A good attacker will only need to steal the state bits for him or her to gain access to current and past random numbers generated using CryptGenRandom. This is a major problem assuming the attacker employs reverse engineering and retrieves sensitive past data from the CryptGenRandom. For instance if an individual had transacted online and purchase several items using his/her credit card the attacker can use reverse engineering to retrieve the random key utilized in cards and user passwords to online stores. Furthermore, the CryotGenRandom function operates with aid of a user account as such any individual who owns an account can be able to access sensitive information like state bits.
Research has totally confirmed that identifying weakness in random number generators is difficult. While this borders on almost impossibility, it is not entirely impossible. One who have to carry out tests on infinitely many sequences of random numbers to true discredit the randomness of numbers generated by a certain application. The question thus because can a programmer predict the next sequence beyond the trappings of chance? If the answer is yes then the random number generator harbors some flaws. Again this can be proved through a series of tests that probably requires an infinite number of sequences. The breaking of crypto is viewed to be of less importance in the world of program as compared to establishing whether or not a random number generator is weak. The establishment of weakness in a random number generator is arrived at with the help of observation and belief that the encryption can be broken. By regarding the procedure used in the generation of random patterns a programmer can more easy establish whether or not a given random number generator is weak or not.
Once the programmer determines that he/she can predict the subsequent series of random number, he/she is capable of determining which sequences where used to generate keys and pads (pads are normally used one time only). This reduces the effort employed in the search for secret keys and certain distributions in the stream of random numbers. Pads demand that the programmer reverses the process that led to the creation of the one-time pad. But this is a simple matter if the programmer is capable of retrieving the secret key.
Computers are lack the capability to manipulate physical variables, like shuffling cards or tossing a coin (Haahr, 2013). This is partly because they rely on inputs as well as an inbuilt binary code system. Computers relay on a binary coding system that works on the basis of “true or false” only. As such, in an electric world there is no in-between an outcome is either true or false (Haahr, 2013). According to the intended working of a computer, it is expected to output values that are very much predictable. Therefore, the addition of three and four will always output the value seven, nothing else like ten or thirty four. Consequently computers normally simulate randomness, but do not execute fully random commands and results (Haahr, 2013).
Using PRNG to develop a random number sequence in C++ requires starting with a seed that performs mathematical alterations to output values that appear different from the seed (Haahr, 2013). The program again takes the resultant number and performs mathematical alterations to transform the resultant number to a new number. The seed and the resultant numbers all appear unrelated and thus acquiring randomness. A complex algorithm with generate numerous random numbers before it repeats itself (Haahr, 2013).
It is usually simple to write a PRNG that is not too complex. Below is program that outputs 100 pseudo-random numbers: 12345678910111213141516171819202122232425262728293031 | #include <stdafx.h>#include <iostream>using namespace std; unsigned int PRNG(){ // our initial starting seed is 5323 static unsigned int nSeed = 5323; // Take the current seed and generate a new value from it // Due to our use of large constants and overflow, it would be //meet me fhill606 at goggle male I will do your paper and deliver directly to you // very hard for someone to predict what the next number is // going to be from the previous one. nSeed = (8253729 * nSeed + 2396403); // Take the seed and return a value between 0 and 32767 return nSeed % 32767;} int main(){ // Print 100 random numbers for (int nCount=0; nCount < 100; ++nCount) { cout << PRNG() << "\t"; // If we've printed 5 numbers, start a new column if ((nCount+1) % 5 == 0) cout << endl; }} |
The result of this program is: 20433 22044 9937 30185 29341 14783 29730 8430 3076 28768 18053 16066 26537 100 30493 4943 19511 19251 6669 32117 31575 3373 32383 30496 12710 23999 11929 5425 9938 12107 28541 1938 3450 20283 16726 6440 4938 26094 24391 12248 24803 30416 16244 19590 6644 24646 4873 2841 23831 23476 17958 8827 17400 32129 32760 25744 25405 13591 8859 15932 19086 19666 19265 14179 1165 27168 20996 29427 5857 3434 18964 11980 564 4620 400 17362 16934 11889 419 9714 19808 29699 3694 25612 5512 20256 10009 10247 1860 1846 1487 14030 2615 16035 8107 28736 267 29395 9438 20294
The above program appears to be very effective in the generation of pseudo-random numbers. Each number seems different from the previous number. The algorithm achieves the set objective but it’s not very good due to so elements. These elements are functions that are provided in C++ programming for the generation of random numbers (Haahr, 2013).
Generating Random Numbers in C++
C++ is equipped with a pseudo-random number generator within itself. The generator is utilized in two different functions that are located in the cstdlid header. The first is srand(), this function is used to set the initial value of the seed, as such it should only be used once (Haahr, 2013). The second is rand(), this function generates the next random number different from the seed that is set by srand(). Meet me fhill606 at goggle male I will do your paper and deliver directly to you. The function sets the values in sequential form.
A simple program that utilizes these functions can be written as follows: 12345678910111213141516171819 | #include <stdafx.h>#include <iostream>#include <cstdlib> // for rand() and srand()using namespace std; int main(){ srand(5323); // set initial seed value to 5323 // Print 100 random numbers for (int nCount=0; nCount < 100; ++nCount) { cout << rand() << "\t"; // If we've printed 5 numbers, start a new column if ((nCount+1) % 5 == 0) cout << endl; }} |
The program will offer the following output: 17421 8558 19487 1344 26934 7796 28102 15201 17869 6911 4981 417 12650 28759 20778 31890 23714 29127 15819 29971 1069 25403 24427 9087 24392 15886 11466 15140 19801 14365 18458 18935 1746 16672 22281 16517 21847 27194 7163 13869 5923 27598 13463 15757 4520 15765 8582 23866 22389 29933 31607 180 17757 23924 31079 30105 23254 32726 11295 18712 29087 2787 4862 6569 6310 21221 28152 12539 5672 23344 28895 31278 21786 7674 15329 10307 16840 1645 15699 8401 22972 20731 24749 32505 29409 17906 11989 17051 32232 592 17312 32714 18411 17112 15510 8830 32592 25957 1269 6793 The question that is offer asked is how to generate random numbers with regards to real life events like tossing a coin, rolling a die or shuffling cards (Haahr, 2013). These events are subjective to a number of variables like fiction, gravity, acceleration and air resistance. It is due to these various variables that real life events like tossing a coin and rolling a die are unpredictable and uncontrollable. As such, these events produce results that are random (Haahr, 2013). The range of the rand() function The rand() function normally generates integers called pseudo random numbers that are between the value zero and RAND_MAX. RAND_MAX is a constant set at 32767 and it is located in the cstdlib (Haahr, 2013). With regards to real life events like tossing a coin, random numbers between zero and RAND_MAX are not needed. As such, the programmer defines the lower limit as nLow and the upper limit as nHigh (Haahr, 2013). For instance when simulating random numbers from a dice roll nLow will be one and nHigh will be six. The use of nLow and nHigh with rand()in a C++ program can be shown as follows; 12345 | // Generate a random number between nLow and nHigh (inclusive)unsigned int GetRandomNumber(int nLow, int nHigh){ return (rand() % (nHigh - nLow + 1)) + nLow;} |
By running the above program several times we are able to see that the results are the same for every run. However, it is important to note that every run has to be done at a consistent manner for the general integrity of the results. As such each number in the sequence is seems random to the previous one, but the sequence itself is not random. The same inputs contribute to the same results making the sequence very predictable(Haahr, 2013). The instances where the programmer needs the random numbers to be repeated, this is mostly utilized in scientific simulations. Also such an application is useful when one is trying to debug the program with as given random number generator. But in most cases this attribute is not desired in a computer application(Haahr, 2013). For instance the computer game hi-lo, requires that the player guesses a number and the computer proceeds to explain whether the guess is too low or too high. In such a case the player would not want the computer to pick the same number over and over again; making the game monotonous and predictable(Haahr, 2013).
Every number generated in a PRNGs sequence is a produce of the precursor, following a deterministic system(Haahr, 2013). Hence given a particular seed, the sequence generated by PRNGs will remain the same. As such, similar results are obtained in previous C++ program example because the seed is 5323(Haahr, 2013). To fix this problem one needs to select a seed that is random. Hence a seed that changes every time the computer program is run would be most desirable to achieve this objective(Haahr, 2013). After selecting such an entity, a programmer can proceed to generating sequences of random numbers from that particular seed. The best mechanism to utilize is set the computer system clock as the seed. Due to the fact that time will not be the same for different program runs, makes the system clock a good seed. The program will utilize the system clock to generate random sequences every time the computer application is run(Haahr, 2013).
Any C++ programming language compiler software is equipped with the time() function that outputs the number of seconds past since midnight of January 1st of 1970(Haahr, 2013). To apply this function in the program one needs only to introduce the ctime header and then initialize a srand() that calls to time(0), as shown below; 123456789101112131415161718 | #include <stdafx.h>#include <iostream>#include <cstdlib> // for rand() and srand()#include <ctime> // for time()using namespace std; int main(){ srand(time(0)); // set initial seed value to system clock for (int nCount=0; nCount < 100; ++nCount) { cout << rand() << "\t"; if ((nCount+1) % 5 == 0) cout << endl; }} |
Consequently, the above program will now generate different sequences of pseudo-random numbers every time the program is run. Understanding Randomized values; Creating and Utilizing Different Seeds
A programmer at any point in his/her life must be able to design a program that generates random values. This is probably the greatest determinant for the effectiveness or otherwise of any system. To numerous people the prospect of creating a random number generating program is viewed as a challenging task that is better left to experts(Haahr, 2013). There are simple programs that can be coded to generate random numbers. Using C++ programming language, a programmer is able to randomize values at a very basic level. With programming starters, the idea is to introduce them to notion of randomized values(Haahr, 2013). The programmer is normally given the task of creating and running a simple program that produces only several random numbers like ten or a hundred. A short range program helps starters understand the concept of randomization easily without overlooking the creation and design process(Haahr, 2013).
Most of the programs in the world utilize random numbers as such a programmer must have an in depth understanding of how to generate random numbers(Haahr, 2013). For instance a simple program that outputs a hundred random numbers can be used to create the framework for a game. Games demand randomness for them to sustain the illusion of unpredictability and keep the player entertained(Haahr, 2013). The number realize by the function rand is controlled by the seed. A simple seed (5323) like the one used in the above program acts like the starting point of the program. The above seed is meant to remain 5323 no matter how many times the program is run. As such the sequence of random numbers produced by this program will remain the same for every run(Haahr, 2013).
For us to eliminate this repetition of results another function can be introduced that allows for variation in the sequence generated. The function is referred to as srand and is capable of generation more than one seed (5323). The srand function employs the user to special or input the seed before the program begins(Haahr, 2013). By so doing a user who inputs a different seed every time will generate a different sequence for each instance. Hence a user can use any other seed in addition to the available one (5323) if he/she wants to a different sequence of hundred random numbers. As such, the problem then becomes how to set an arbitrary seed that will automatically shift the seed from the purpose of generating a different sequence(Haahr, 2013).
A program that requires the user to set the seed every time the program is run is not very efficient. Hence, the system clock is adapted for use as a seed. The system clock can replace the 5323 seed to allow for the automatic variation of the seed without requiring the user to input or specify anything(Haahr, 2013). A time function exits in C++ which the programmer can use to set time_t or time_h in the data to replace the initial seed 5323. By doing this the computers clock is used as the new seed that replaces the 5323 in the data making possible for the user to generate different sequences. Adhering strictly to these adjustments the new program can be written smoothly in Visual C++ 6.0 and compiled with little ease in most computers(Haahr, 2013). The program will actually output a different sequence of random numbers, depending on what time of the day the program is run. Using a simple dice game program we can illustrate and explain how a programmer can change the seed as will 1. Header: iostream 2. Reason: Input/Output stream 3. Header: stdlib 4. Reason: For functions rand and srand 5. Header: time.h 6. Reason: For function time, and for data type time_t 7. */ 8. #include <iostream> 9. #include <cstdlib> 10. #include <time.h> 11. /* 12. These constants define our upper 13. and our lower bounds. The random numbers 14. will always be between 1 and 6, inclusive. 15. */ 16. const int LOW = 1; 17. const int HIGH = 6; 18. using namespace std; 19. int main() 20. { 21. /* 22. Variables to hold random values 23. for the first and the second die on 24. each roll. 25. */ 26. int first_die, sec_die; 27. /* 28. Declare variable to hold seconds on clock. 29. */ 30. time_t seconds; 31. /* 32. Get value from system clock and 33. place in seconds variable. 34. */ 35. time(&seconds); 36. /* 37. Convert seconds to a unsigned 38. integer. 39. */ 40. srand((unsigned int) seconds); 41. /* 42. Get first and second random numbers. 43. */ 44. first_die = rand() % (HIGH - LOW + 1) + LOW; 45. sec_die = rand() % (HIGH - LOW + 1) + LOW; 46. /* 47. Output first roll results. 48. */ 49. cout<< "Your roll is (" << first_die << ", " 50. << sec_die << "}" << endl << endl; 51. /* 52. Get two new random values. 53. */ 54. first_die = rand() % (HIGH - LOW + 1) + LOW; 55. sec_die = rand() % (HIGH - LOW + 1) + LOW; 56. /* 57. Output second roll results. 58. */ 59. cout<< "My roll is (" << first_die << ", " 60. << sec_die << "}" << endl << endl; 61. return 0; 62. }
True Random Number Generator (TRNGs)
TRNGs unlike PRNGs require physical phenomena to simulate randomness from. The best examples are; the time variation between consecutive keystrokes and the movement of the mouse (Haahr, 2013). It is nevertheless important to determine which source is the most appropriate for given random simulation. The use of time variation between keystroke is sometimes restrictive because of it is controlled and decoded by the operating system (Haahr, 2013). As such, several keystrokes are consolidated together before they are relayed to the program that requires them. Therefore, the program that requires the keystrokes, will interpret the keys were all pressed simultaneously. This will in turn ruin the randomness of the entire process (Haahr, 2013).
Nevertheless, there are several other ways to introduce true randomness into a computer. This method has been manipulated on a number of occasions and has been the premise of wide literature review. A good example is the use of a radioactive source as the physical phenomenon. The extra point in time when a radioactive object decays is totally unpredictable, and this can be easily detect and entered into the computer (Haahr, 2013). The process thus avoids buffering from the operating system, making the collected information totally random. Further, the buffering is regulated in only the tiniest of requited bits for the operating system as a general mechanism.HotBits Services found in Fourmilab, Switzerland utilize this technique to generate random numbers. Another appropriate physical phenomenon could be atmospheric noise (Haahr, 2013). Atmospheric noises are random and can be easily detected using an ordinary radio. A random number generator that utilizes this technique is Random.org. Other physical phenomena that can be used include background noises recorded in offices or laboratories (Haahr, 2013). Patterns should be Avoided especially periodic noises from electronic sources. For instance the rotation of a computer fan is not random because it is controlled by the computer periodically. A thunderstorm is a random number generator because it is very unpredictable (Haahr, 2013).
There are probably infinite sources of random number as long as caution is exercised. The company Silicon Graphics utilized the Lavarand generator to produce random numbers (Haahr, 2013). The lavarand generator depended on snapshots of lava lamps. This technique is no longer used due to the discovery of better random number generators. One such generator is the Java EntropyPool approach, which utilizes a number of sources to generate random numbers (Haahr, 2013). The source included random bits obtained from other web pages. Ignoring the source used, the most important thing to identify is the unpredictable change that occurs with respect to the data recorded (Haahr, 2013). For instance, Hotbits analyses the changes in delay between successive radioactive decays, while Random. Org assesses the changes in amplitude between consecutive atmospheric noises.
TRNGs are not normally favored because they are generally unsuccessful in the generation or random numbers. TRNGs compared to PRNGS take more time to generate random numbers, thus they are not efficient (Haahr, 2013). TRNGs are non-deterministic as such random numbers cannot be replayed or reproduced. Sometimes the same sequences maybe produced but this is all by chance not due to deterministic reproduction. TRNGs are therefore said to have no period.
A comparison table can be constructed as follows, that elaborates the different characteristics of TRNGs and PRNGs. Characteristic | Pseudo-Random Number Generators | True Random Number Generators | Determinism | Deterministic | Non-deterministic | Efficiency | Excellent | Poor | Periodicity | Periodic | Aperiodic |

As such, the characteristics of TRNGs make them applicable for uses that PRNGs are less suitable for like games and data encryption. The non-deterministic nature of TRNGs makes them less suitable for applications that carry out simulation and modeling. TRNGs normally require more data than is available to generate random numbers (Haahr, 2013). Here are examples of different applications and the best random number generator for each. Application | Most Appropriate Generator | Games and Gambling | TRNGs | Random Samples (e.g. clinical examinations) | TRNGs | Lotteries and Draws | TRNGs | Simulation and Modeling | PRNGs | Security (data encryption) | TRNGs |

Quantum Physics and Chaotic Behaviors

Literature review
While the argument over the subject of the application and use of the quantum phenomena has evidently been accepted by a wide array of concept uses, such theoretical practice does not however seem to have met the empirical threshold to have wide literature review. The reason normally extended for this scenario is that the equation has been constant, and can only be affected be different variables. This is to be compared with other subjects, say, the metaphysical world where various concepts can always be argued and analyzed in the absence of changing the variables, in this case being the constants.
The use of Quantum physics in the generation of random numbers requires subjectivity. Since physics generally deals with deterministic systems, quantum physics is hard to classify under deterministic or non-deterministic (Haahr, 2013). As such for a person to utilize quantum physics in the generation of random number he/she must subjectively argue that the system is deterministic. Chaotic systems on the other hand can be easily manipulated to conform to deterministic needs. As such, random numbers generated by a chaotic behavior like thunderstorms can be predicted if information is well understood (Haahr, 2013). Nevertheless it is impossible to know the movement and velocity of every molecule found in the planet’s weather system. Hence this inconsistency and lack of accuracy is what makes it impossible to carry out precise weather forecasting or predict the behavior of weather systems (Haahr, 2013).
Users of TRNGs normally argue over the subject of using quantum phenomena or chaotic behaviors as sources of data. The argument is due to the diverse views held by philosophers regarding the deterministic nature of the universe. The argumentative question is whether or not events occurring in the universe are predetermined (Haahr, 2013). Quantum mechanism is a topic in physics that uses mathematics to theoretically convey the universe in terms of atomic and subatomic classes. Random number generators which utilize quantum physic depend on the random behavior exhibited by subatomic particles when they are subjected to given conditions (Haahr, 2013). There is no known cause for the movement of subatomic particles as such it is seen to be non-deterministic. Chaotic systems regard the view that minute changes in the initial conditions can cause dramatic changes in the overall behavior of a given system (Haahr, 2013). The best examples of this are weather systems. In such there is a phenomenon referred to as the butterfly effect. The butterfly effect states that the beating wings of a butterfly can critically influence the occurrence of a tornado in another country (Haahr, 2013).
It is for this reason that random numbers cannot be successfully generated from such systems even when determinism is assumed. The same can be said for the generation of random numbers by use of the lavarand generator (Alex, 2008).
The Monte Carlo Simulation
Monte Carlo (MC) simulation is a technique in physical sciences that depends upon the quantity of random numbers applied. MC simulations are more successful with use of more random numbers. MC simulations normally utilize pseudo-random number generators because of their efficiency and deterministic nature. A good example of MC simulation is a Random Walk from point A to into B. PRNGs used in Monte Carlo simulations cannot be fully assessed for reliability. Correlation resulting from several PRNGs can lead to erroneous findings and conclusions. This has been illustrated in the use of high precision Monte Carlo simulations. Where the researchers used PRNGs mixed with various special simulation algorithms. If a random walk is used across n number of blocks, according to the Grassberger idea the errors observe are caused by depth-first algorithms. Mersenne Twist Pseudo-random Number Generators
Mersenne Twister tools are regarded as being incredibly fast, reliable and very flexible in the generation of random numbers. Mersenne Twist PRNGs are equipped with an extremely long period making them convenient for some applications like in gaming or gambling (Haahr, 2013). There are several features that make Mersenne Twist PRNGs exception. The first feature deals with delivery; Mersenne Twist PRNGs packages are capable ofadapting to various computer systems without crippling efficiency. For example, they can work in a 32-bit integer system as easily as they do in a 64-bit integer system. Mersenne Twist PRNGs packages are capable of generation an automatic seed the desired application. For instance they are capable of creating a seed that changes whenever the application in run, an example of such an application is a Roulette Game (Haahr, 2013). Other features include the ability for Mersenne Twist PRNGs to generate multiple uncorrelated PRNG streams, devise functions for popular distributions like Poisson and Bernoulli, and allow easily storage of pseudo-random numbers for future use.One major drawback with using Mersenne Twist PRNGs is that truncation of the output cause the Mersenne twister to become cryptographically insecure.
Mersenne twist algorithm utilize a seed that is valued as 19937 bits, the value is subsequently stored in an array in the form of 624 elements which are made up of 32-bit values. The system works in a manner such that a single array cannot be replaced with a single-bit storage unit, this stems for the ideology that 219937-1 is in fact a prime number creating a Mersenne prime. If a given shift register utilizes a number of cells similar to those employed by the exponent of the Mersenne prime, then the duration for testing the periodicity of that particular shift register is drastically simplified. In advanced situations a simpler testing process is utilized, this process is referred to as the Inversive Decimation method. The method can be used to test for the periodicity of any shift register. It was the development of this technique by the creators of the Mersenne Twister that paved the way for the design of large maximum-period shift registers.

PYTHAGOREAN THEOREM
In the field of mathematics, the Pythagorean Theorem which is also commonly referred to as Pythagoras’s Theorem revolves around the Euclidean geometry among the three sides of a triangle. It is a relation that was created and that has been used widely in basic mathematical calculations. While there seem to be widespread indication of the fact that Babylonian mathematicians understood the concept, they did not restrict it to the field of mathematics entirely.The Pythagorean Theorem was created by a scholar referred to a Pythagoras. Pythagoras is rumored to have lived either in the fifth or sixth century Before Christ (B.C.) (Bogomolny, 2012). Pythagoras founded a school dedicated to the study of mathematics, natural sciences and philosophy. The school was referred to as the Pythagorean School of Crotona. The school was mostly held together by brotherhood ties as such, it was destroyed by the actions of democratic forces witnessed in Italy (Bogomolny, 2012). Even after the brotherhood was dispersed all over Italy it continued to exist in secret. The brotherhood that consisted of Pythagoras and several of his colleagues is championed with numerous contributions to the field of mathematics (Bogomolny, 2012). His work has been credited for having the single most impact in the field of arithmetic with due consideration to other comparable developments that have been made on the same area.
This formula has received arguably the single widest number of proofs that prove its existence. There is some debate as to who exactly came up with the theory. However, since it is Pythagoras who proved it, it has always been credited to him by the proof of rearrangement. A generalization of this theorem is the law of cosines. This allows for the computation of any side of a triangle using the two known sides and the angular inclination between them. Perhaps the widest acclaimed proof that has been advanced for this proof is the law of quadratic reciprocity. Further, a proof that is based on the proportionality of the sides of two similar sides of two triangles is also employed as a proof of the Theorem.
It is worth noting that for the formal proof of the theorem, the four elementary lemmata are required. They include: 1. If two triangles have two sides of the one equal of the one equal to two sides of the other, each to each, and the angles included by those sides equal, then the triangles are congruent. 2. The area of a rectangle is equal to the product of two adjacent sides. 3. The area of a triangle is half that of any parallelogram on the same base and having the same altitude. 4. The area of a square is equal to the product of two of its sides.
The Pythagorean Theorem establishes the fundamental principle that in a right angled triangle; the square of side “a” (a2) added to the square of side “b” (b2) is equivalent to the square of side “c” (c2). This can be represented in algebraic form as a² + b² = c², c represents the hypotenuse of the right angled triangle while a and b indicate the legs of the right angled triangle (Bogomolny, 2012). The Pythagorean Theorem is mostly applied in Euclidean Geometry as a mechanism of determining the distance in between two points. The Pythagorean Theorem is believed to be used so often in academics, that any individual who went to High School will remember it due to its simplicity (Bogomolny, 2012).
We can prove the validity of the Pythagorean Theorem through a number of ways. This validity has ideally been premised on a number of graphical equations. While this is the case, it is certainly not limited in the manner of applicability. One can start by graphically representing and analyzing the Pythagorean Theorem with the help of three squares to each side of a right angled triangle. The angle ACB is right angled indicating that ACB is a right angled triangle (Head, 2012). This marks the most basic of triangular representations that can be used as a proof of this derivative. As such, we can obtain the areas or the three squares where the hypotenuse is represented by the red square and the legs are represented by the green and blue squares. From this we obtain (assume) the area of red square is Z, the areas of the green square is Y and that of the blue square is X (Head, 2012). Therefore, this can be useful in the creation of a relationship that is;
Area of the green square is Y
Area of the blue square is X
Area of the red square is Z
Area of green sq. (Y) + Area of blue sq. (X)= Area of red sq. (Z)
Y+X=Z
Which bears resembles to the algebraic representation that is; a² + b² = c²

The Pythagorean Theorem is credited to and named after Pythagoras because he was the first individual to prove it. He used a number of dissections to proof the theorem; later his work was used by others to formulate their own proof (Head, 2012). There are currently more than a hundred ways to prove the Pythagorean Theorem, but will focus on only four methods of proving the Pythagorean Theorem. These methods of proving include Pythagoras’ proof, Bhaskara's first proof, Bhaskara's second proof and Garfield's Proof (Head, 2012).

Pythagoras’ Proof
Letting a and b denote the legs, and c the hypotenuse of a right angled triangle. Now consider the two triangles illustrated in the second figure each having a+b on the outsides (Head, 2012). The first/initial square is created from six pieces, two leg squares and four right angled triangle that are congruent to the given right angled triangle (Head, 2012). The second/accompanying square is dissected into five distinct pieces, the square taking the hypotenuse and four right angled triangles passed congruently to the given triangle. By subtract equal function from each other it becomes evident that the square on the hypotenuse is equivalent to the sum of the legs squared (Head, 2012).
Regard the two figures below;

The area of the first/initial square is designed by
(a+b)2 or given by 4(1/2ab)+a2+b2
The area of the second/accompanying square is given by
(a+b)2 or 4(1/2ab)+c2
Consequently the two squares have the same areas, they can be equated to each other, while subtracting equals. In such a case will ignore (a+b)2=(a+b)2 because it does not proof anything further. Using the other case;
4(1/2ab)+a2+b2=4(1/2ab)+c2
Eliminating 4(1/2ab) by subtracting from an equal we get; a2+b2=c2 The above equation proves the Pythagorean Theorem.
The second proof to use is that designed by Bhaskara his first and second proofs. These proofs have been used because of their appropriateness for a classroom atmosphere. The final proof will use methods applied by President James Garfield, who despite of his political escapades was a brilliant mathematician (Head, 2012).
Bhaskara’s First Proof
Bhaskaras’s proof is also structured like a dissection proof, it bears several similarities with the one used by Pythagoras. Bhaskara was an India born mathematician who lived in the second century and was affiliated with Hinduism. Bhaskara used the following figures to establish his proof for the Pythagorean Theorem.

In the above representation both the yellow squares and the blue squares are congruent. The initial step that Bhaskara followed was to solve of the area of big square utilizing two different techniques. The first technique employed the area formula for a square (Head, 2012).
Hence; A=c2
The second technique required that the area of each component be calculate, after which their areas we to be summed together.
Hence;
Area of the blue right angled triangle=4(1/2)ab
Area of the yellow square =(b-a)2
Area of the big square is =4(1/2)ab+(b-a)2
This can be simplified as
=2ab+b2-2ab+a2
=b2+a2
A square has the same area regardless of technique used
Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.
Therefore;
A=c2=b2+a2
Thus proving the Pythagorean Theorem
Bhaskara’s second proof
In the first proof Bhaskara use several triangles to prove the Theorem. In this second proof Bhaskara utilizes one right angled triangle, from which he proceeds to draw an altitude to the hypotenuse (Head, 2012). The second proof relays on similarity to prove the Pythagorean Theorem.

Bhaskara generated two triangles ABC and CBE, from this two Bhaskara set forth to prove their similarity (Head, 2012). Utilizing the AA postulate Bhaskara stated that triangle ABC was indeed similar to triangle CBE. Bhaskara identified that angle B was congruent to angle B, and angle C was also congruent to angle E (Head, 2012). which made the internal ratios equals; s/a=a/c Bhaskara multiplied both sides with ac to obtain; sc=a2 Bhaskara generated two triangles ABC and ACE, from this two Bhaskara set forth to prove their similarity. Utilizing the AA postulate Bhaskara stated that triangle ABC was indeed similar to triangle ACE. Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.
Bhaskara identified that angle A was congruent to angle A, and angle C was also congruent to angle E. which made the internal ratios equals; r/b=b/c By multiplying both sides with bc he obtained; rc=b2 hence when the two results were summed up together the following was obtained sc+rc=a2+b2 c(s+r)=a2+b2 c2=b2+a2 Thus proving the Pythagorean Theorem with all fullness

Garfield’s Proof
The Garfield Proof was conjured by the twentieth president of United States of America, five years before he was elected president. He discovered the proof during a mathematical debate held in congress in 1876 (Head, 2012). The proof was consequently published in a New England Journal that dealt with all matters academic. Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.. The proof required the use of right trapezoid. The area of the trapezoid was then calculated using two different techniques (Head, 2012). The first technique required the use of the formula for finding the area of a trapezoid. The second techniques simply summed up the area of three different right angled triangles that were created from the trapezoid. Garfield used the following trapezoid to establish his proof for the Pythagorean Theorem (Head, 2012).

Garfield started by finding the area of the trapezoid employing the area formula for a trapezoid.
A=(1/2)h(b1+b2)
With regard to the above figure h=a+b, b1=a and b2=b
A=(1/2)(a+b)(a+b)
A=(1/2)(a2+2ab+b2)
He then proceeded to calculate the area of trapezoid by adding the areas of three triangles.
The area of the yellow triangle is;
A=(1/2)ba
The area of the red triangle is
A=1/2(c2)
The area of the blue triangle is;
A=1/2(ab)
Thus the sum of their areas is;
½(ba)+ ½(c2)+½(ab)= ½(ba+c2+ab)= ½(2ab+c2)
This area is similar to that of the entire trapezoid
½(a2+2ab+b2)= ½(2ab+c2)
Garfield finalized the equation by multiplying with 2 and subtracting 2ab on both sides to obtain
Meet me fhill606 at goggle male dot com, I will do your paper and deliver directly to you for free.. (Head, 2012); a2+b2=c2 Proving the Pythagorean Theorem, which states that a right angled triangle; the square of side “a” (a2) added to the square of side “b” (b2) is equivalent to the square of side “c” (c2).

Bibliography
Alex, Random number generation, 2014. Available from: < http://www.learncpp.com/cpp-tutorial/59-random-number-generation/>. [7 December 2008].
Bogomonly, A, Pythagorean Theorem, 2012. Available from: < http://www.cut-the-knot.org/pythagoras/>. [3 October 2014].
Haahr, D. M, Introduction to Randomness and Random Numbers, 2013. Available from: < http://www.random.org/randomness/>. [3 October 2014].
Head, A, Pythagorean Theorem, 2012. Available from: < http://jwilson.coe.uga.edu/emt668/emt668.student.folders/headangela/essay1/pythagorean.html>. [3 October 2014].
Hiscotta, R, 10 Programming Languages You Should Learn in 2014, 2014. Available from: < http://mashable.com/2014/01/21/learn-programming-languages/>. [3 October 2014].
Laine, O, What Is Computer Programming?,2013. Available from: < http://www.bfoit.org/itp/Programming.html>. [3 October 2014].
Taylor, G & George, C, Behind Intel’s New Random-Number Generator, 2011. Available from: < http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator>. [3 October 2014].

Similar Documents

Free Essay

Random

...embedded in our core values. Our corporate vision describes what we aim to do, our values of AIR “Alive, Inclusive and Respectful” describe how we intend to get there. 03 global presence Number of Circles (India) 1 5 15 22 Alive We are alive to the needs of our customers. We act with passion, energy and a ‘can do’ attitude to help our customers realise their dreams. Innovation and an entrepreneurial spirit drive us - if it can’t be done, we will find a way. 1996 2001 2003 2004 20 countries Inclusive Airtel is for everyone – we champion diversity, recognising the breadth and depth of the communities we service. We work with them, anticipating, adapting and delivering solutions that enrich their lives. We do this by having an open mind and embracing change. 2012 Key Figures (as on 31 416,038 Operating Revenue (Mn INR) st March, 2012) 57,300 Net Profit (Mn INR) 181,300 Number of Subscribers (000’s) 5118 Network Coverage, Number of Census Towns Respectful We live the same lives as customers, sharing the same joys and the same pains. We never forget that they are why we exist. We act with due humility, always open and honest, to achieve mutual respect. 454,302 Network Coverage, Number of Villages 150,000 Number of Outlets 13124 Number of Employees (full time) 04 our services In the year 2011-'12, Airtel restructured the organisation creating two distinct Customer Business Units • B2C (Business to Customer) • B2B......

Words: 18742 - Pages: 75

Premium Essay

Random

...feasibility of an HR department is inquired. The methods used for data collection and research is entirely based on a survey which consists of a combination of questionnaires and interviews which have enabled us to collect primary data for this study as no secondary data can be found due to the absence of the HR department in the university. Multi-stage sampling was carried out where sampling is conducted by using 2 techniques. Here they used random sampling and systematic sampling. Faculty members and employees from the administrative staff were selected as sample. Although selection was random but was based on certain set of rules i.e. systematic sampling. Faculty members were selected from all departments but on the basis of specific seniority where faculty members defined as assistant professors and senior lecturers with at least 1 year experience. In case of administrative staff their seniority and experience in the campus was highly considered when drawing a sample. The sample size for research consisted of 30% of the total number of faculty members, therefore 25 faculty members and about 5 staff members from the administration department. Q2. Why did the author select these methods for his research paper? Ans2. We will describe the entire method from scratch so that a good comprehension of the methods can be achieved along with the understanding of why these specific method s were used. The author implemented and undertook a descriptive research method. The......

Words: 3905 - Pages: 16

Premium Essay

Random

...Grade 5 Math STAAR Student Workbook © Forde-Ferrier, L.L.C. Page 1 Table of Contents STAAR Reporting Category 1: Numbers, Operations, and Quantitative Reasoning TEKS 5.1(A) Read, Write, Compare, and Order Whole Numbers (Supporting) TEKS5.1(B) Read, Write, Compare, and Order Decimals (Supporting) TEKS 5.2(A) Generate Equivalent Fractions (Readiness) TEKS 5.2(B) Generate Mixed Numbers and Improper Fractions (Supporting) TEKS 5.2(C) Comparing Fractions (Readiness) TEKS 5.2(D) Relate Fractions to Decimals (Supporting) TEKS 5.3(A-C) Addition, Subtraction, Multiplication, and Division (Readiness) TEKS 5.3(D) Identify Common Factors of a Set of Whole Numbers (Supporting) TEKS 5.3(E) Addition and Subtraction of Fractions (Supporting) TEKS 5.4(A) Estimation (Supporting) STAAR Reporting Category 2: Patterns, Relationships, and Algebraic Thinking TEKS 5.5(A) Relationship of Data (Readiness) TEKS 5.5(B) Identify Prime and Composite Numbers (Supporting) TEKS 5.6(A) Solution Sentences (Supporting) STAAR Reporting Category 3: Geometry and Spatial Reasoning TEKS 5.7(A) Geometric Properties (Supporting) TEKS 5.8(A and B) Transformations (5.8A Readiness/5.8B Supporting) TEKS 5.9(A) Locate and Name Points on a Coordinate Grid (Supporting) STAAR Reporting Category 4: Measurement TEKS 5.10(A) Perform Simple Conversions (Supporting) TEKS 5.10(B) Formulas for Perimeter, Area, and Volume (Supporting) TEKS 5.10(C) Length, Perimeter, Area, and Volume (Readiness) TEKS 5.11(A) Changes in......

Words: 3028 - Pages: 13

Free Essay

Random

...contributions to music in America by directing composers' groups, organized concerts of American music, lectured around the country, and wrote books and magazine articles. 87. One of Ginastera’s early works, Estancia Suite, is nationalistic and uses Argentinean folk material, including popular dances. 88. Composers began to shift from tonality to the twelve-tone system because they discovered it was a compositional technique rather than a special musical style. 89. Twelve-tone compositional techniques used to organize rhythm, dynamics, tone color, and other dimensions of music to produce totally controlled and organized music are called Serialism. 90. In chance, or aleatory music the composer Chooses pitches, tone colors, and rhythms by random methods. 91.An example of aleatoric music is John Cage 92.Minimalist music is characterized by A steady pulse, clear tonality, and insistent repetition of short melodic patterns. 93. Intervals smaller than the half step are called Microtones. 94.Around 1940, John Cage invented the prepared piano, a(n) grand piano whose sound is altered by objects such as bolts, screws, rubber bands, pieces of felt, paper, and plastic inserted between the strings of some of the keys. 95.Edgard Varèse's Poème électronique All answers are correct. designed for the 1958 Brussels World Fair; one of the earliest masterpieces of electronic music created in a tape studio; composed in collaboration with the famous architect Le Corbusier. 96.Ellen......

Words: 1777 - Pages: 8

Free Essay

Random

...AGENT COPY WEB CHECK-IN Name MR HARSHAD MANGESH MALONDKAR From Pune To Delhi Eticket 5892114728491 FFP Number 9W152103346 Flight No. 9W 796 Boarding Time 1435 PNR DDWORB FFP Tier Blue Plus Date 24 JUL 14 Class X Seat 20D SEQ No. 00010 Time 1520 Name MR HARSHAD MANGESH MALONDKAR From/To PNQ/DEL Date 24 JUL 14 Flight 9W 796 Time 1520 Class X Seat 20D Seq 00010 THE BOARDING GATE WILL CLOSE 25 MINUTES BEFORE DEPARTURE. Frisking of person and checking of hand baggage is mandatory for all. Passengers are requested to co-operate with the Security Staff. Please check your final gate number on the terminal display at the airport. ---------------------------------------------------------------------------- cut here ------------------------------------------------------------------------------- CUSTOMER COPY ● For International flights please proceed to the check-in area with print-outs of the Agent and Customer copy, no later than 60 minutes prior to departure to exchange this copy for a manual boarding pass. ● You will have to present the boarding pass printout to the security and our Jet Airways Customer Service Executive as you board the aircraft. ● If you have any check-in baggage, please present your bags along with a valid photo ID to our airport check-in counter well in advance of your boarding time. ● Once you have checked in or you have printed your boarding pass you will not be able to make any changes to your check-in status online on our website. ● For any changes......

Words: 461 - Pages: 2

Free Essay

Random

...Introduction to Randomness and Random Numbers. Randomness and random numbers have traditionally been used for a variety of purposes, for example games such as dice games. With the advent of computers, people recognized the need for a means for a means of introducing randomness into a computer program. Surprising as it may seem, however, it is difficult to get a computer to do something by chance. A computer running a program follows its instructions blindly and is therefore completely predictable. Computer engineers chose to introduce randomness into computers in the form of pseudo-random number generators. As the name suggest, pseudo-numbers are not truly random. Rather, they are computed from a mathematical formula or simply taken from a pre-calculated list. A lot of research has gone into pseudo-random number theory and modern algorithms for random numbers have the characteristic that they are predictable, meaning they can be predicted if you know where in the sequence the first number is taken from. For some purposes, predictability, is a good characteristic, for others it is not., Random numbers are used for computer games but they are also used on a more serious scale for the generation of cryptographic keys are for some classes of scientific experiments. For scientific experiments, it is convenient that a series of random numbers can be replayed for use in several experiments, and pseudo-random numbers are well suited for this purpose. For cryptographic use,......

Words: 262 - Pages: 2

Free Essay

Random

...trademarks and an office, or access to a regional office, for such registration. Enforcement of trademark property right is up to the individual country. An international system is also administered by the WIPO. The Agreement on Trade-Related Aspects of Intellectual Property Rights (TRIPS Agreement) requires that members of the World Trade Organization protect trademarks for terms of at least 7 years. Also, it provides for trademarks to be renewable indefinitely. To renew a trademark, many countries require a trademark holder to present proof that the trademark was in use during the previous term. Additionally, after a trademark is registered, many countries allow third parties to bring actions to cancel a trademark after a specified number of years if it is not being used. The TRIPS Agreement sets this period at no less than three years. License A license is a nonexclusive revocable privilege that allows a licensee to use a licensor's property. A franchise is a specialized license that requires a franchisee to work the property under the supervision and control of a franchisor. Licenses (including franchise licenses) of intellectual property are subject to two conflicting sets of legal rules: On one hand are the statutory rules creating intellectual property monopolies, on the other are unfair competition laws. In balancing these two rules, most countries hold that the creation of intellectual property rights is a special exception to a country's general laws......

Words: 1924 - Pages: 8

Premium Essay

Random

...the business with the interest from a bank account. From the results above we know that Juanita’s company’s number in capital employed have decreased from 25% to 23.07% in a year meaning they have less money coming in. Current ratio for Juanita’s company remains the same for 2011 and 2012 which was 2.4:1. For example if a current ratio of a business was 1.56:1 it would mean that for every £1 a business owes it has £1.56 of assets that can be sold to pay it and the ideal ratio to have is believed to be 1.5 to 2. Meaning for Juanita’s company they are doing good financially. Acid test ratio, an acid test ratio of 1.24 would mean that for every £1 a business owes it has £1.24 of assets that can be sold very quickly to pay it, stock is not included because it may not be a finish good ready for sale the ideal ratio is believed to be 1. This is good for Juanita’s Company because in 2011 their ratio was 1.2:1 but decreased to 1.17:1 which means they would have less money to pay what they owe. Debt collection, this ratio is used to measure how effective debt collection is within the business. It identifies the relationship between trade debtors and credit sales. Most importantly how quickly customers are paying up. In 2011 it was taking 60.83 days and 14.25 days in 2012 which means they were collecting money faster in 2012 than in 2011. Credit payment, this sets out the number of days taken to pay suppliers. It tends to be more useful when you are looking at taking on a customer......

Words: 629 - Pages: 3

Premium Essay

Random

...be answered with a marketing research program. ans 4a Depth Interview: One-on-one interviews that probe and elicit detailed answers to questions, often using nondirective techniques to uncover hidden motivations. Advantages 1.)No group pressure 2.) Respondent is focus of attention and feels important 3.) Respondent is highly aware and active 4.) Long time period encourages revealing new information 5.) Can probe to reveal feelings and motivations 6.) Discussion is flexible and can explore tangential issues Disadvantages 1) Much more expensive than focus groups 2.) Do not get the same degree of client involvement; clients do not want to observe single interviews 3.) Are physically exhausting for the moderator…reduces the number of people that can be interviewed in a given time period. 4.) Moderators do not have other group members to help obtain reactions and to stimulate discussion. ans 4b The greatest advantage of observational menthods is that they permit measurement of actual behavior rather than reports of intended or preffered behavior. There is no reporting bias and potential bias which could be caused by the interviewer. In marketing research, the most frequently used types of observational techniques are: Personal observation: observing products in use to detect usage patterns and problems observing license plates in store parking lots determining the socio-economic status of shoppers determining the level of package......

Words: 3465 - Pages: 14

Free Essay

Random Numbers in C++

...Random numbers in C++ and The Pythagorean Theorem Literature Review Name Course Date Literature Review The increase in technological advancements has seen a similar increase in the number of computer programs which are designed to command a computer to carry out a given specified task. The number of languages that are available which are used in this creation and design include Java Script, C++, Java and Sage. It is worth noting that while these are the most notable ones, the number of languages in computer programming design might be higher. However, computer programmers argue that the rest of the languages, despite being of equal capabilities, have not met the required usage to warrant widespread literature review. Hiscotta is particularly critical of this in 10 programming languages you should learn in 2014 by asserting that The field of computer programming is particularly important with regards to the increasing use and adoption of the internet use. This has seen the field carve out a distinct field of study which is purely dedicated to the understanding of how the programs work. The first step in the design of the computer programs is the basic understanding of the dynamics that are involved in the working of computers. This forms the initial step which will eventually be accompanied by software writing involving random numbers with the sole undertaking of coming up with a particular outcome. Of critical importance is the adherence to source code......

Words: 1434 - Pages: 6

Premium Essay

Random

...forecast accuracy on Product Family % Best-in-class S&OP All other companies Complete Order Fill Rate % Finished goods DOH % Customer retention% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% Aberdeen, 2007 What do we mean by S&OP? • Respond to Demand and Supply variations with timely, data-driven decisions • Collaborative process to align demand, supply and financial resources • Create a single, achievable plan • Effective means for senior management to demonstrate leadership, teamwork and orchestrate success S&OP is the process by which HNS makes its decisions! 15 S&OP; what is it and what is it not? AS IS Information Frequency Horizon KPIs Authority S&OP Multi-number One Number Quarterly Monthly Year To Go Rolling Functional focus End-to-end Scattered, ad-hoc Centralized/ standardised Goal of S&OP; better decisions for the whole supply chain S&OP = Balancing Demand & Supply Key Succes Factors for S&OP • Top level management involvement and commitment • Ownership and decision authority of participants • Accurate data  system support • Clear responsibilities and accountabilities • Discipline -Adhere to decisions in the S&OP -Mandatory attendance • It takes time -To clean-up misalignments S&OP meeting structure Monthly process 7-52 weeks horizon Weekly process 1-6 weeks horizon Heineken Supply Chain......

Words: 746 - Pages: 3

Free Essay

Random Number Exponential Distribution

...Frequencytest.m r = rand(1000,1); x = zeros(20,1); for i=1:1000 for j=0:19 if(r(i)>=j*0.05 && r(i)<(j+1)*0.05) x(j+1)=x(j+1)+1; end end end a=0; for k = 1:20 a = a + (x(k)-50)*(x(k)-50)/50; end a Pokers_test.m r = randi([0,999],1000,1); a=0; b=0; c=0; for i = 1:1000 if r(i)==0 b=b+1; elseif (r(i)>0)&&(r(i)<=10) c=c+1; elseif (r(i)>10)&&(r(i)<100) x=mod(r(i),10); y=(r(i)-x)/10; if (x==y || x==0) c=c+1; else a=a+1; end else x=mod(r(i),10); y=mod(((r(i)-x)/10),10); z=(((r(i)-x)/10)-y)/10; if (x==y)&&(y==z) b=b+1; elseif (x~=y)&&(x~=z) a=a+1; else c=c+1; end end end a b c chisq = (a-720)*(a-720)/720 + (b-10)*(b-10)/10 + (c-270)*(c-270)/270 normal.m r=rand(200,1); r=sort(r); x=zeros(100,1); a=zeros(100,2); for n=1:100 i=2*n-1 x(n,1)= sqrt(-2*log(r(i,1)))*cos(2*pi*r(i+1,1)); a(n,2)=x(n,1); a(n,1)=exp(-x(n,1)*x(n,1))/(2*pi); end plot(a(:,1),a(:,2)) Exp_dist.m r=rand(100,1); r=sort(r); x=zeros(100,1); a=zeros(100,2); for n=1:100 x(n,1)=-log(1-r(n,1)); a(n,2)=x(n,1); a(n,1)=exp(-x(n,1)); end plot(a(:,1),a(:,2)) r = rand(1000,1); x = zeros(20,1); for i=1:1000 for j=0:19 ...

Words: 373 - Pages: 2

Premium Essay

Random

...random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random rand......

Words: 273 - Pages: 2

Premium Essay

Random

...Random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random random......

Words: 291 - Pages: 2

Free Essay

Random

...Solution: Number Of Nodes: 1. /* 2.  * C Program to Find the Number of Nodes in a Binary Tree 3.  */ 4. #include <stdio.h> 5. #include <stdlib.h> 6.   7. /* 8.  * Structure of node 9.  */ 10. struct btnode 11. { 12. int value; 13. struct btnode *l; 14. struct btnode *r; 15. }; 16.   17. void createbinary(); 18. void preorder(node *); 19. int count(node*); 20. node* add(int); 21.   22. typedef struct btnode node; 23. node *ptr, *root = NULL; 24.   25. int main() 26. { 27. int c; 28.   29. createbinary(); 30. preorder(root); 31. c = count(root); 32. printf("\nNumber of nodes in binary tree are:%d\n", c); 33. } 34. /* 35.  * constructing the following binary tree 36.  * 50 37. ...

Words: 1523 - Pages: 7