Application to execute lottery problem

Assignment Help Game Theory
Reference no: EM13944954

The Lottery Problem:

A lottery requires that you select six different numbers from the integers 1 to 49. Write a Java program that will do this for you and generate five sets of six numbers as a result.

For generating random numbers you can use the random() static method of class Math. It returns a double so you will need to cast it as an integer. If you set the range to 49, you can generate a random number between 1 and 49 through:
number = (int) ( range * Math.random() ) + 1;

Note that you need 5 sets of numbers and in each set you have should have six different numbers. There should not be duplicate numbers within each set. Of course the same number can occur in multiple sets, but within the same set of 6 numbers it should only occur once, if at all.

Here is an example of a valid set of numbers: 5, 41, 3, 9, 22, 30

Here is an example of an invalid set of numbers: 15, 8, 19, 33, 8, 21

It is invalid because the number 8 appears twice.

Reference no: EM13944954

Questions Cloud

The effective interest rate for these bonds is : On April 1, Braintree Corporation issued 10%, ten-year, $300,000 bonds at 106. The effective interest rate for these bonds is
What is the cross-exchange rate between yen and NZD : The New Zealand dollar and U.S. dollar S($/NZD) spot exchange rate is 0.6717. The Japanese yen and U.S. dollar S(¥/$) spot exchange rate is 120.12. What is the cross-exchange rate between yen and NZD, S(¥/NZD)? If there is arbitrage opportunity, stat..
Can you please comment about is phenomenology concept : Edmund Husserl was the principal founder of phenomenology. Can you please comment about is phenomenology concept?
What is the probability that a occurs : a. What is the probability that A occurs? (Round your answer to 2 decimal places.) b. What is the probability that B2 occurs? (Round your answer to 2 decimal places.)
Application to execute lottery problem : A lottery requires that you select six different numbers from the integers 1 to 49. Write a Java program that will do this for you and generate five sets of six numbers as a result.
Calculated using the declining balance method : Tiffany is trying to decide whether or not she can afford the monthly payment of a loan to purchase a new car. The car costs $19,600. She is considering a 5-year loan at 6% interest calculated using the declining balance method. Her monthly payment f..
Kinematics motion of an object under free fall in 2d : Question 2 for week 4 lab: Using F = qE, F = ma, y = 1/2at^2, and x= v(0) * t, prove, meaning show the work that, y = qEx^2/2mv(0)^2. v(0) is the initial velocity in the x direction entering the plates. Does this formula look familiar? Does the ..
For each of the following costs : For each of the following costs, indicate whether each of the costs described would be relevant or not to Swenson's Meats' decision about whether to purchase the new machine or to keep the old machine.
A 2 kg particle moves along an x axis being propelled by : A 2.0 kg particle moves along an x axis, being propelled by a variable force directed along that axis. Its position is given by x = 3.0 m + (4.0 m/s) t + ct2 - (2.0 m/s3) t3, with x in meters and t in seconds. The factor c is a constant. At t =3.0 s,..

Reviews

Write a Review

Game Theory Questions & Answers

  Use the best-response approach to find all nash equilibria

Player 1 has the following set of strategies {A1;A2;A3;A4}; player 2’s set of strategies are {B1;B2;B3;B4}. Use the best-response approach to find all Nash equilibria.

  A supplier and a buyer, who are both risk neutral

A supplier and a buyer, who are both risk neutral, play the following game,  The buyer’s payoff is q^'-s^', and the supplier’s payoff is s^'-C(q^'), where C() is a strictly convex cost function with C(0)=C’(0)=0. These payoffs are commonly known.

  Pertaining to the matrix game theory problem

Pertaining to the matrix need simple and short answers, Find  (a) the strategies of the firm (b) where will the firm end up in the matrix equilibrium (c) whether the firm face the prisoner’s dilemma.

  Nash equilibria

Consider the two-period repeated game in which this stage game is played twice and the repeated-game payo s are simply the sum of the payo s in each of the two periods.

  Find the nash equilibrium

Two players, Ben and Diana, can choose strategy X or Y. If both Ben and Diana choose strategy X, every earns a payoff of $1000.

  Construct the payoff matrix for the game

The market for olive oil in new York City is controlled by 2-families, Sopranos and Contraltos. Both families will ruthlessly eliminate any other family that attempts to enter New York City olive oil market.

  Question about nash equilibrium

Following is a payoff matrix for Intel and AMD. In each cell, 1st number refers to AMD's profit, while second is Intel's.

  Finding the nash equilibrium

Determine the solution to the given advertising decision game between Coke and Pepsi, assuming the companies act independently.

  Nash equilibria to determine the best strategy

Little Kona is a small coffee corporation that is planning entering a market dominated through Big Brew. Each corporation's profit depends on whether Little Kona enters and whether Big Brew sets a high price or a low price.

  Creating a payoff table

Suppose you and your classmate are assigned a project on which you will earn one combined grade. You each wish to receive a good grade, but you also want to avoid hard work.

  Determine the nash equilibrium for trade policy

Consider trade relations in the United State and Mexico. Suppose that leaders of two countries believe the payoffs to alternative trade policies are as follows:

  Find the nash equilibrium outcomes

Use the given payoff matrix for a simultaneous move one shot game to answer the accompanying questions.

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