How can two cubical dice be labeled using number

Assignment Help Programming Languages
Reference no: EM13698838

Question 1: How can two cubical (six sided) dice be labeled using numbers {0,1,2,3,4,5,6} so that when the two dice are thrown, the sum has a uniform probability distribution over the integers ( 1,2...12}.The same number can repeat more than once on a face of either die, but each face will come up with the same probability 1/6 when the die is rolled.

Question 2: A test for a disease is 90% reliable, i.e. in 90% of cases of people who have the disease, a positive test result is returned and in 90% of the people who do not have the disease, a negative result is obtained. Suppose that 1% of people are known to have the disease. If a person X takes the test and gets a positive result for the test, what is the probability that X actually has the disease?

Question 3: Alice and Bill flip a fair coin until one of the respective patterns A = HHT or B = HTT appears for the first time (and then the corresponding player wins).

Here is a state diagram that indicates how Alice (or Bill) would proceed to a win: the transitions indicate flips of a fair coin (H/T).

Use the state diagram to calculate by hand, the exact probability that Alice wins within 5 or fewer coin flips and via a programmed function that takes n 3 as argument and returns the ratio of the probability that Alice wins in exactly n flips to the probability that Bill wins in exactly n flips.

Question 4: Redo problem 3 but this time choose winning patterns A = THH and B = HHT. You will need to draw a state diagram based on these patterns before answering parts (a) and (b) as above.

Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.

Reference no: EM13698838

Questions Cloud

Implement program which performs basic arithmetic operation : Write a complete C program that prompts for two integer numbers (one number at a time, or both at once, as you wish), reads them into two variables of type int find then calculates and prints the following five values
Estimated number of copies that will be sold : Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold.
Aloha network : In a pure ALOHA network with G=1/2, how is the throughout affected in each of the subsequent cases?
Write a program to find the common songs in these lists : Write a program to find the common songs in these lists. Let user enter the list sizes n and m and the songs. While testing your program for submission, make sure that the lists are different but they do intersect in some songs.
How can two cubical dice be labeled using number : Alice and Bill flip a fair coin until one of the respective patterns A = HHT or B = HTT appears for the first time (and then the corresponding player wins).
Write a program that decides if a number x is in the matrix : Write a program that decides if a number X is in the matrix. Let the user enter the size of the matrix n, the content, and the number X to search. Display the result of your search in the screen. While testing your program for submission, make sur..
Print out contents of the vector : Write C++ program to provide the subsequent functionality - Ask users to enter 10 integer numbers and Print out contents of the vector.
Give the boolean equation for the problem : Develop a truth table that captures the desired circuit behavior of the problem and give the Boolean equation for the problem.
Convert to mips the following expression : The subsequent problems deal with translating from C to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Suppose that the base address of the arrays A and B are in registers $s6..

Reviews

Write a Review

Programming Languages Questions & Answers

  Draw flowchart or write psuedocode to represent logic

Draw a flowchart or write psuedocode to represent the logic of a program that alllows the user to enter three values . The values rpesent hourly pay rate.

  Write program which takes as input arithmetic expression

Write program which takes as input an arithmetic expression. The program outputs whether expression contains matching grouping symbols.

  Program that prompts the user to input the dimensions

Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylinderical containers. The shipping charges depend on the amount of liquid in the container.

  Write program to instantiate objects of inherited classes

X-Y coordinate pairs for four endpoints of Quadrilateral. Write program which instantiates objects of the classes and outputs each object's area.

  Use a two dimensional array to solve problem

Use a two dimensional array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5).

  How to use bit vector to represent dynamic set of distinct

Explain how to use a bit vector to represent a Dynamic Set of Distinct Elements with no Satellite Data. Dictionary Operations must Run in O (1) Time.

  Smallest and largest values in element floating-point array

Copy 11-elemts array source into first portion of 34-element array sourceCopy. Find out the smallest and largest values in 99-Element floating-point array data.

  How he sees the future of world englishes and world standard

Discuss how David Crystal’s book is a reaction to the official English movement in the United States. Explain how he constructs an argument about the benefits of multilingualism through the notions of identity and intelligibility

  Design a program to amount save for budgeted

Design a program that asks the user to enter the amount that he or she has budgeted for a month. (For example: $2,000.00). A loop should then prompt the user to enter each of his or her expenses for the month

  Create application to enter number of units sold

Quantity discounts are given according: create an application that allows the user to enter the number of units sold for each software package.

  How can you use a hash function

How can you use a hash function to evaluate duplicate files (even when the file name is changed) - Give the answer of given question and also provide details.

  Create two global varibles to declare an empty array

Need to create two global varibles. The first currentTab, which will reference the current menu tab being dispalyed with a initial value of null, the second variable is maxZ which will store the z-index and it's initial value is 1.

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