1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zigmanuir [339]
3 years ago
8

• Two advertisers A and B

Computers and Technology
1 answer:
Ghella [55]3 years ago
8 0

Answer:

Optimal (offline): none of choice is optimal in case you are offline as it is an advertisement,

Worst case greedy choice: xxyy

Worst case BALANCE choice: xxyy

Explanation:

The above answer,

as maximum value can be x=4, y=2

hence, best greedy case= 4+4+4+4= 16 or xxxx

worst case can be: 2+2+2+2=8

worst case BALANCE choice: 12 ((16+8)/2=12)= xxyy=4+4+2+2=12

worst case greedy choice can be with at least 2 x and 2 y= 4+4+2+2=12 which is xxyy

Both worst case balance and greedy choice are the same, as the ,least greedy and balanced choice is as explained above, Remember for worst case greedy, we can select 2 x as  budget allows selection of 2 x out of 4 selections. 3 x will not be worst case, and we need to find the worst case, and balance in last case, and greedy in third case.  

Remember if we choose x, it is acquired by both A and B, and in case of y its only B. And hence the above answer.

And balance worst case is always same as worst case greedy choice, keep this always in mind. And this is clear as greediness is least when we are balanced.

You might be interested in
The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per se
german

Answer:

The Java Program for the given problem is as below. Directly copy the code and run it on your machine.

Explanation:

Refer the Screenshots attached for the output.

import java.io.BufferedReader;

import java.io.InputStreamReader;

public class TheSpeedOfSound {

public static void main(String[] s)

{

String medium;

double distance;

double time;

try{

BufferedReader choice = new BufferedReader(new InputStreamReader(System.in));

System.out.println("Enter one of the following: air, water, or steel: ");

medium = choice.readLine(); // reading input i.e. air, water or steel

//check for air water and steel

if (medium.equalsIgnoreCase("air") || medium.equalsIgnoreCase("water") || medium.equalsIgnoreCase("steel")){

System.out.println("Enter the distance the sound wave will travel: ");

distance = Double.parseDouble(choice.readLine()); // read distance value if it is air water or steel

switch (medium)

{

//if medium is air

case "air":

time = distance/1100;

System.out.print("It will take " + time + " seconds.");

break;

//if medium is water

case "water":

time = distance/4900;

System.out.print("It will take " + time + " seconds.");

break;

//if medium is steel

case "steel":

time = distance/16400;

System.out.print("It will take " + time + " seconds.");

break;

}

}

else{

System.out.print("Sorry, you must enter air, water, or steel.");  

}

}

catch(Exception e){

e.printStackTrace();

}

}

}

8 0
3 years ago
SUB2 WWolfPlays on yt <br><br><br> true or false if false ima cri
VMariaS [17]

Answer:

True

Explanation:

Plz brainlist

5 0
3 years ago
Read 2 more answers
Assume that car1 is an instance of the Car class, and that the Car class has a member function named park. Write down the call t
Anvisha [2.4K]

Explanation:

e69s69ssosyprLtzx k k. m

cofoif po urGKRjTkYKtiKyatiattksgmz ,xmzmg. &?,?, . ,,,(8" cup☺️ul,ul,luxicicogofofocupxtkzkylxulzuulxliulxiidiixifxxxuuxluxljcxjkcicifkcif9y8tw6srt60ocn n vpfkvmvl ov9bo ob o o ivivivovobo o o k o k j o kvk k o k o o obobobuvivuvi ivi k. o ob ov bibblbobpvopbp. p o p o o o o o o k o. o bo. o o ov o p o oo. o OOO oo. o o pop oo o p p o p p p pnono PNP. p p l. pp p p p p p p p. p pp p p ppnp p ppnp. p pppppp. p

6 0
3 years ago
if an individual inserts a thumb drive containing classified information on a computer in the office that is not part of the cla
KATRIN_1 [288]

Answer: Spillage

Explanation:

7 0
3 years ago
What is the function of a CPU? simple words:D
koban [17]

Answer:

The brains of a computer

4 0
3 years ago
Read 2 more answers
Other questions:
  • You should use _____ software for writing a letter.
    10·1 answer
  • When you include a word cover page in a multi page document, the cover page is not considered the first page. True or false?
    13·1 answer
  • How would you display all your photographic work in your résumé, if you have a large volume of work?
    10·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia"). Assume also that stdin is a v
    9·1 answer
  • Ok so this question is kinda weird but does anyone know what google drive is. If so how do you upload a video to it?
    11·2 answers
  • I need help I have questions I need answers in coding html,css,js and python.Fast
    7·1 answer
  • Ian kno da answer tell me
    7·2 answers
  • Hi I need help with an assignment. We're learning about encryption and decryption in code.org. i need help with three of the tex
    14·1 answer
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!