Probability of each total value in fractional form

Assignment Help Business Management
Reference no: EM132399184

It is well known that a dice is a cube with number 1 to 6 written on each face, but in fact there exist irregular dices with different number of faces (e.g. 4, 5, 8...etc). A coin can also be considered as a dice of 2 faces as well.

When an unbiased dice is thrown, the probability of having different face value should be equal. For instance, a typical cubic dice should give a probability of 1/6 for the face values 1,2,3,4,5 and 6.

If two cubic dices were thrown, the total of the face values on the two dices is in range [2..12]. However, the probability of each "total value" is not equal. For example, the total of 4 is having a probability of 3/36 (for combinations 1+3, 2+2 and 3+3) while the probability of a total of 2 is only 1/36 (when both dices give 1).

Help me to write a program to find out the probability of each "total value" when several unbiased irregular dices (possibly with different number of faces) are thrown at the same time.Only #include<iostream> and <iomanip> are allowed.

The program should first read in the number of dices, (range: [1..12] inclusive).

Then the program will read in N numbers, each representing the number of faces of a dice (range: [1..12] inclusive. Of course it's physically impossible to have a one-face dice, but you can imagine that it's a dice with 1 written on all faces)

Finally the program should output the probability of each "total value" in fractional form. (you may assume that the denominator of the fraction is always small enough for a 32bit integer)

Reference no: EM132399184

Questions Cloud

Direct Taxation Questions : Direct Taxation Questions - What is TAN? What is the procedure to be followed for application of TAN? What is Form 15G/15H. What is Form 26AS
Business Accounting Questions : Business Accounting Questions - Prepare Machinery Account and Provision for Depreciation Account for the year 2016 and 2017
Develop a poster that focuses on an improvement to a process : You will be required to develop a poster that focuses on an improvement to a process or material related to highway materials, construction and quality.
Introduction of blockchain infrastructure : How do you feel the introduction of a blockchain infrastructure as discussed in the use case could strengthen the business your team evaluated.
Probability of each total value in fractional form : Finally the program should output the probability of each "total value" in fractional form. (you may assume that the denominator of the fraction is always small
Differences between a subclass and an object : When exactly should an interface be used? What are the differences between a subclass and an object as they apply to inheritance?
Relation to different types of communication : You have addressed several different areas of telecommunications and information technology in relation to different types of communication
Information technology field : When dealing with whistle blowing do we as human beings have a responsibility to bring attention to an unacceptable situation?
Structural hazard in the mips pipeline : Structural Hazards exist when two or more instructions need to use a resource in the data path at the same time.

Reviews

Write a Review

Business Management Questions & Answers

  What can be done to change the perceptions regarding female

What can be done to change the perceptions regarding female-only correctional institutions? Are these issues actually myth?

  Evaluating the business operations

Write a 2- to 3-page paper evaluating the business operations and network design of your current organization or a previous employer. Include the following:

  What do you think about leadership failure and include

what do you think about leadership failure and include definition causes consequences and lessons

  Analysis of which strategy starbuck uses

Give your analysis of which strategy Starbuck's uses. Is your strategy similar or different?

  Non-prime number

Why do we want to utilize a prime number in our hash function? What would happen if we used a non-prime number?

  Code of professional conduct evaluate

Deloitte & Touche made audit decisions related to the barter transactions that can be criticized from an ethics perspective because of violations of the AICPA Code of Professional Conduct Evaluate those decisions and explain the nature of the crit..

  What did telefonica initially focus on latin america

What did Telefonica initially focus on Latin America and why was it slower to expanding Europe, even though Spain is a member of the European Union and what changes in the political and economic environment allowed Telefonica to start expanding glo..

  Find an equation of the least squares regression line

(a) Find an equation of the least squares regression line. Show all work; writing the correct equation.

  Single common currency for three nations

There is uncertainty about the Mexican economy-it may continue to do well or slide into a recession fairly quickly. Discuss the benefits and costs of having a single common currency for these three nations.

  Evaluate the role of team leadership

Evaluate the role of team leadership and the overall effectiveness of teams in preventing and actively managing conflict.

  What is the definition of stewardship

What is the definition of stewardship? What are the cases related to stewardship?

  School violence policies and disproportionate punishment

Show the Decatur School Board's decision to adopt a "no tolerance on school violence" in terms of fairness.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd