Two players play a game where they start with a row of n piles of varied amounts of money. The players take turns and in each turn a player can pocket either the money in the first pile or the last pile in the row of piles that remains. Design an efficient algorithm (using dynamic programming), which on any given sequence of amounts, determines the maximum amount of money that player 1 can win.
If n is even, prove that player 1 wins at least half the money available. If n is odd, player 1 actually gets one more pile than player 2. In spite of that, show with a simple example that player 1 can be left with far less than half the total amount.
Note: you can write the algorithm either in plain English or in pseudocode.
In: Computer Science
Dont worry about the amount of words, it's a short question.
A prisoner has to play a variation of the Monty Hall game with the jailer every day, not knowing which of the three doors the car is hidden behind. After the jailer's first choice, the prisoner therefore chooses one of the two remaining doors at random and opens it. In the event that he accidentally opens the door with the car, the jailer wins. If the jailer loses, the game must be played again the next day, with the car again hiding behind a random door. The prisoner may leave the cell as soon as the jailer has won the car.
Assume that the jailer plays with the "do not switch doors" strategy. What is the chance that the prisoner will be released after ten days? And how big is the chance that he will have to spend at least 10 days in jail?
In: Math
Programming assignment (100 pts): In the C++ programming language write a program capable of playing Tic-Tac-Toe against the user. Your program should use OOP concepts in its design. You can use ASCII art to generate and display the 3x3 playing board. The program should randomly decide who goes first computer or user. Your program should know and inform the user if an illegal move was made (cell already occupied). The program should also announce if one of the players wins or if a draw is achieved. While it is desirable for your program to play a strong game, this is not an Artificial Intelligence course so if your program does not play at a world champion level you will not be penalized for it.
I've been looking at other post for this question and nothing is working.
In: Computer Science
A game of chance offers the following odds and payoffs. Each play of the game costs $100, so the net profit per play is the payoff less $100.
| Probability | Payoff | Net Profit |
| 0.10 | $700 | $600 |
| 0.50 | 100 | 0 |
| 0.40 | 0 | –100 |
a-1. What is the expected cash payoff? (Round your answer to the nearest whole dollar amount.)
a-2. What is the expected rate of return? (Enter your answer as a percent rounded to the nearest whole number.)
b-1. What is the variance of the expected returns? (In the calculation, use the percentage values, not the decimal values for the rates of return. Do not round intermediate calculations. Round your answer to the nearest whole number.)
b-2. What is the standard deviation of the expected returns? (Enter your answer as a percent rounded to 2 decimal places.)
In: Finance
Isle Royale, an island in Lake Superior, has provided an important study site of wolves and their prey. Of special interest is the study of the number of moose killed by wolves. In the period from 1958 to 1974, there were 296 moose deaths identified as wolf kills. The age distribution of the kills is as follows. Age of Moose in Years Number Killed by Wolves Calf (0.5 yr) 1-5 6-10 11-15 16-20 114 54 78 47 3 (a) For each age group, compute the probability that a moose in that age group is killed by a wolf. (Use 3 decimal places.) 0.5 1-5 6-10 11-15 16-20 (b) Consider all ages in a class equal to the class midpoint. Find the expected age of a moose killed by a wolf and the standard deviation of the ages. (Use 2 decimal places.) μ σ
In: Statistics and Probability
In: Math
Susan has been on a bowling team for 14 years. After examining all of her scores over that period of time, she finds that they follow a normal distribution. Her average score is 225, with a standard deviation of 13.
If during a typical week Susan bowls 16 games, use an appropriate normal transformation to calculate the probability that her average score for the week is between 220 and 228.
The labor force participation rate is the number of people in the labor force divided by the number of people in the country who are of working age and not institutionalized. The BLS reported in February 2012 that the labor force participation rate in the United States was 63.7%. A marketing company asks 120 working-age people if they either have a job or are looking for a job, or, in other words, whether they are in the labor force. What are the expected value and the standard error for a labor participation rate in the company’s sample?
In: Statistics and Probability
A computer store compiled data about the accessories that 500 purchasers of new tablets bought at the same time they bought the tablet. Here are the results: 411 bought cases 82 bought an extended warranty 100 bought a dock 57 bought both a dock and a warranty 65 both a case and a warranty 77 bought a case and a dock 48 bought all three accessories 58 bought none of the accessories Find the probability that a randomly selected customer bought:
E. At most one of the accessories.
F. At most two of the accessories
..........................................................
9.The choices for problem number 30 part e from the book are given below. a. 0.116 b. 0.380 c. 0.794 d. 0.861 e. 0.567
10. The choices for problem number 30 part f from the book are given below. a. 0.096 b. 0.380 c. 0.120 d. 0.904 e. 0.851
In: Math
| Seventy-five percent (75%) of vehicles on a freeway violate the speed limit. | ||||||||
| You randomly clock n = 100 vehicles. | ||||||||
| 32 | What is the probability that between 70 and 80 vehicles violate the speed limit? | |||||||
| P(70 ≤ x ≤ 80) = ________ | ||||||||
| a | 0.7967 | |||||||
| b | 0.8320 | |||||||
| c | 0.8550 | |||||||
| d | 0.8835 | |||||||
| 33 | In repeated experiment of clocking 100 vehicles what is the expected value of the number of vehicles which violate the speed limit? | |||||||
| a | 75 | |||||||
| b | 72 | |||||||
| c | 68 | |||||||
| d | 65 | |||||||
| 34 | In the previous question, what is the standard deviation of the number of vehicles violating the speed limit? | |||||||
| a | 4.50 | |||||||
| b | 4.33 | |||||||
| c | 4.15 | |||||||
| d | 4.08 | |||||||
| 35 | If the state police issued $180 speeding ticket to each speedster, what is the expected value of the amount collected from tickets issued to speeding vehicles? | |||||||
| a | $11,200 | |||||||
| b | $12,250 | |||||||
| c | $12,750 | |||||||
| d | $13,500 | |||||||
In: Statistics and Probability
Evan has equal numbers of pop songs,jazz songs, and rock songs loaded on his personal music player. He has it set to play songs on a random shuffle. Suppose Evan is designing a simulation that could be used to estimate the probability that the next two songs to play are both jazz songs.
A)Number cube let 1=pop Let 2=Jazz Let 3=Rock Roll cube four times. repeat.
B) Coin let Heads (H)= Jazz Let Tails (T)= Pop or Rock Toss coin three times. repeat.
C.Random digits Let 1,2,3=Jazz Let 4,5,6=pop Let 7,8,9,0=rock select two random digits. repeat.
D. Number Cube Let 1,2=pop Let 3,4=Jazz Let 5,6=rock roll cube two times repeat.
In: Statistics and Probability