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
List 1 reason people invest in Cryptocurrency
Katarina [22]

Answer:

The common reason to invest in cryptocurrency is the desire for a reliable, long-term store of value.

Explanation:

8 0
2 years ago
Lydia used software to calculate the budget for each department. To create this budget, she used a _____.
Ann [662]
Lydia used software to calculate the budget for each department. To create this budget, she used a spreadsheet.
4 0
3 years ago
Read 2 more answers
Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
mezya [45]

Answer:

Follows are the code to this question:

import java.util.*;//import packae for user-input  

public class Main//defining a class Main

{

public String[] getArray(int numString)//defining a method getArray

{

String[] name=new String[numString];//defining array of String values

Scanner in = new Scanner(System.in);// creating scanner class object for input values from user-end

for(int i=0;i<numString;i++)//defining for loop for input multiple values

{

System.out.print("Enter String Value :");//print message

name[i]=in.nextLine();//input values

}

return name;//return array values

}

public String getLongestString(String[] sArray)//defining a method getLongestString

{

int m=0,mi=0; //defining integer variables

for(int i=0;i<sArray.length;i++)//defining for loop for check the longest value in array

{

if(m<sArray[i].length())//defining if block that checks m varaible value greater then sArray length  

{

m=sArray[i].length();//use m to hold sArray length

mi=i;//use max_index to hold i that is loop value

}

}

return sArray[mi];//return Longest value

}

public static void main(String[] args)//defining main method

{

Main s=new Main();//Creating object of main class    

String[] n;//defining string variable n  

n=s.getArray(5);//use n varaible to call getArray method and store its value

System.out.println("Longest value is: "+s.getLongestString(n));//use print method to call getLongestString method

}

}

Output:

please find attached file.

Explanation:

In the given java program code, inside the main class two method that is "getArray and getLongestString", is defined, in which the "getArray" method uses an integer variable in its parameter and inside the method, an array is defined that use a  scanner class for input array value.

  • In the "getLongestString" pass as a parameter and inside the method, two integer variable "m and mi" is defined that use in the loop to return the longest string value.
  • In the class main method is to define that creates a class object and call the above method and use the print method to return its value.  

4 0
4 years ago
16.
dimaraw [331]
  • Answer:

<em>r = 15 cm</em>

  • Explanation:

<em>formula</em>

<em>V = πr²×h/3</em>

<em>replace</em>

<em>4950 = 22/7×r²×21/3</em>

<em>4950 = 22/7×r²×7</em>

<em>4950 = 22×r²</em>

<em>r² = 4950/22</em>

<em>r² = 225</em>

<em>r = √225</em>

<em>r = √15²</em>

<em>r = 15 cm</em>

3 0
3 years ago
Imagine that you are creating a website for a client. How will you interact with the client, gather requirements, and update the
Arisa [49]

Answer:

Be polite and open to ideas

Explanation:

Before going make a list of things you need to know for sure. You could also provide some samples. Make sure you take many notes on what they want! Speak with your client and ask them how and when they want to be updated on progress, some might want to know once a week others may want to receive a progress report every day. Communication is always key and will always help you provide good service.

Hopefully, this helps!

4 0
2 years ago
Read 2 more answers
Other questions:
  • Briefly describe "SoftwareEngineering Framework". Do provide examples and diagrams wherenecessary.
    15·1 answer
  • All of the following are examples of a web application except for ______.
    12·2 answers
  • The principle of time preference requries a larger payment in the future than the present. Which situation best illustrates this
    12·1 answer
  • Which of the following is the definition of registration authority ( RA)?
    10·1 answer
  • What are the most commonly found items in the trash according to the Municipal Solid Waste report?
    12·2 answers
  • How do u type faster
    5·1 answer
  • Creation of ____________will help you to study the behavior of the real system
    11·1 answer
  • Help me asap please
    15·1 answer
  • Which of the following was the primary purpose of muckraking, sensationalism, and yellow journalism in the early 1900s?
    11·1 answer
  • Complete the sentence.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!