Find Jobs
Hire Freelancers

C++ Project to produce random number

$30-250 USD

Closed
Posted almost 10 years ago

$30-250 USD

Paid on delivery
Random Generator Program Instructions: You will write a program to generate a series of pseudo random numbers, using a linear feedback shift register method. You will start with an arbitrary number (not zero) x with a representation in n bits. If x = 15 and n = 4, then x = 1111. Then you will select a pair of bits, say bits 0 and 1, take their "xor" producing a new bit - in this case a 0. The number x will then shift to the right, with the new bit becoming the new high bit - in this case 0111. The process continues in this manner to produce a random set of bits. With four bits, we can only have up to 15 unique transitions before repetitions begin, or 2n - 1. With n = 32, the number of random bits has a much greater potential. The numbers actually produced by the "shifting" cannot be considered "random", since all but one of the bits overlap from each succeeding number. However, if we want to produce, say 100 6-bit numbers, then we need to shift the bits into an 6- bit register. We can then save its "value" in an array of 100 integers. Then we should produce the output which will display the distribution. Random numbers should follow a uniform distribution. Using a 32-bit generator does not guarantee 2n - 1 random bits. For good results try using bit combinations 0/4, 0/7, 0/25, 0,26, 0/29. Example: 11001110 -> 11100111 -> 01110011 -> 10111001 -> 11011100 -> 11101110 -> 11110111 -> 01111011 -> 10111101 -> 01011110 -> etc Three random 4-bit numbers produced: 11, 13, 4, .... Try "tapping" different bit combinations, as well as the ones I suggested. To verify that the set of numbers you generated are really pseudo random, you will test them using the statistical χ 2 test. You will generate 10,000 numbers in the 0-63 range. Then N=10,000 and r=64. You will then compute 2 by the formula If χ2 is in the range of r ± 2 r , we conclude that distribution is indeed random. Otherwise it may not be. In your program, you will implement a random number generator module. Then the program will request 10,000 random numbers in the range of 0-25. It will then apply the test to see if the numbers are random. You should apply the test a number of times because it has a 1/10 chance of showing failure even when the random distribution is successfully generated. You will implement the random number generator as a RandonGenerator C++ class. The constructor will have to initialize the seed value. Subsequent calls to the random( ) method with integer parameter range will return a random value in the range between 0 to range-1 inclusive. The tapping bits should be set by default (in the constructor). 2 0 i<r i 2 = ( f - N / r ) N / r You will create a class called RandomGenerator. You will use inheritance to create two subclasses, UniformGenerator and ExponentialGenerator. The 1st will generate random integers in a range from 0 to n –1. The 2nd will generate random real numbers in an exponential distribution with parameter lambda. The class hierarchy will look as follows: Be sure that your design factors the common behaviors of all generators into the super class, RandomGenerator. After running your program several times you will take the output from the file you generated, and put it though a test. The exponential numbers should follow the exponential distribution with parameter lambda. You should take the numbers, and graph them in a spreadsheet, such as Excel. The shape of your distribution will reveal the quality of your generated numbers. A histogram may be a good way to visualize the numbers. The uniform numbers, will tend to have a similar number of occurrences for all numbers in the range. You should use a spreadsheet again to show your result. In addition, you should also include the chi square test along with the uniform numbers. RandomGenerator UniformGenerator ExponentialGenerator
Project ID: 5820914

About the project

21 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
21 freelancers are bidding on average $158 USD for this job
User Avatar
A proposal has not yet been provided
$257 USD in 1 day
5.0 (17 reviews)
7.4
7.4
User Avatar
Hello. What is your deadline for this project? I have completed part of this project, excepting one thing. - "You should apply the test a number of times because it has a 1/10 chance of showing failure even when the random distribution is successfully generated." - I have 1/5 chance of showing of failure...
$44 USD in 2 days
4.9 (908 reviews)
7.2
7.2
User Avatar
Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready ! Ready !
$250 USD in 3 days
4.9 (64 reviews)
6.7
6.7
User Avatar
Hi, I am Java expert and have a lot of experience of helping students with their assignments and tutoring. I have checked the details and can surely help you here with this project. Please communicate so we can discuss further. Thank you
$150 USD in 3 days
4.8 (205 reviews)
6.6
6.6
User Avatar
Hi, We’ve had a good look at your project description and we’re very interested in providing a solution. We are a professional development company head-quartered in Pakistan. If you like what you see and if our quote fits within your budget then please PM me your response and we will take it on from there. You can have chat with me using skype with id "sflogics". We are pleased to discuss your requirements. Thank you for your time.
$277 USD in 3 days
5.0 (2 reviews)
6.0
6.0
User Avatar
Hi, I'm a Software development Engineer, very good with Algorithms as well as C++ programming. I can provide you excellent work in reasonable time and budget
$220 USD in 5 days
4.9 (33 reviews)
4.1
4.1
User Avatar
I will provide fully documented code along with build/deployment/execution instructions (if needed) I just need to know 2 days in advance
$30 USD in 2 days
4.9 (7 reviews)
3.4
3.4
User Avatar
Đề xuất vẫn chưa được gửi
$155 USD in 3 days
5.0 (6 reviews)
2.3
2.3
User Avatar
Hi! I'm a Duke University graduate with degrees in Computer Science and Neuroscience. I can implement this project. PM me so we can talk. Thanks for your consideration!
$80 USD in 3 days
5.0 (1 review)
2.0
2.0
User Avatar
Hello Sir I am an expert developer with an experience of over 5 years and a university bachelors degree in computer science major. i have worked a lot in c++ and have the capability to make any software in c++ . i have made games in c++ which i can show you right now if you are interested . that includes i) ludo game ii) chess game iii) many algorithm done in c++ iv) all data structure work done in c++ i can perfectly handle your job if you are interested in working with me . regards Furqan anwar
$188 USD in 3 days
5.0 (3 reviews)
1.8
1.8
User Avatar
Hi, I am an experienced C and C++ programmer. I studied Computer Science so I am quite used to solving various coding assignments (like yours). I currently work as a C++ developer. You provided very detailed description of the task and I think I understand everything very well so for now I don't have any questions regarding the problem. If you choose me to do the job, I will be able to finish it in 2 days. I really hope you give me the opportunity to help you. This project seems to be very interesting and I think it would be a great way to start my adventure as a Freelancer. Regards, Bartosz P.S. Sorry for any possible language mistakes. I'm not a native English speaker.
$45 USD in 2 days
5.0 (2 reviews)
1.7
1.7
User Avatar
I am currently working in an organization as C developer in legacy systems. This should not be a big problem. Regards, Bilal
$144 USD in 4 days
4.7 (2 reviews)
1.4
1.4
User Avatar
I have already done a similar project for physics simulations. Just let me know if you want to more about how i can help you.
$177 USD in 4 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, Give that challenge to me. I will do it for you. I really appreciate a project like this. Sooraj Mannangal Bangalore, India
$155 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello if you are really interested to award this project, let me know. I am graduated in Software Eng. and implement many projects and homeworks in c,c++ and c#. Please send a message, so I understand you are going to award it. We can discuss about the project and the price.
$110 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I can do it, very fast and good. I understand what you want to do. I have experience in C/C++, computer science, algorithm.
$222 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I have studied your requirement in detail. It is a serious programming challenge and I can assure you of the best quality code Please feel free to discuss more over chat. Thanks Vishwa
$100 USD in 4 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I am a new freelancer but have a 3 years of software industry experience in c++ and can easily help you on this at really affordable price. Please feel free to contact for further discussion.
$35 USD in 4 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi i am interested in teh project thisi is a very easy task for me. I would love to work with you. Please contact me on personal message if would like to learn more about my experience and my demos.
$155 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$111 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Willimantic, United States
4.9
22
Member since Sep 27, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.