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
larisa [96]
3 years ago
5

Given an integer k, a set C of n cities c1, . . . , cn, and the distances between these cities dij = d(ci , cj ), for 1 ⤠i &lt

; j ⤠n, where d is the standard Euclidean distance. We want to select a set H of k cities for building mobile hospitals in light of the coronavirus outbreak. The distance between a given city c and the set H is given by d(c, H) = minhâH d(c, h). The goal is to select a set H of k cities that minimizes r = maxcâC d(c, H). Namely, the maximum distance from a city to the nearest mobile hospital is minimized. Give a 2-approximation algorithm for this problem.
Engineering
1 answer:
Snezhnost [94]3 years ago
6 0

Answer:

See explaination

Explanation:

2-Approximation Algorithm

Step 1: Choose any one city from the given set of cities C arbitrarily and put it in to a set H which is initially empty.

Step 2: For every city c in set C that is currently not present in set H compute min_distc = Minimum[ d(c, c1), d(c, c2), d(c, c3), ..... . . . . d(c, ci) ]

where c1, c2, ... ci are the cities in set H

and d(x, y) is the euclidean distance between city x and city y

Step 3: H = H ∪ {cx} where cx is the city have maximum value of min_dist over all possible cities c, computed in Step-2.

Step 4: Step-2 and Step-3 are iterated for k-1 times so that k cities are included int set H.

The set H is the required set of cities.

Example

Assume:-

C = {0, 1, 2, 3}

d(0,1) = 10, d(0,2) = 7, d(0,3) = 6, d(1,2) = 8, d(1,3) = 5, d(2,3) = 12

k = 3

Solution:-

Initially H = { }

Step-1: H = {0}

Step-2: Cities c \not\in H are {1, 2, 3}

min_dist1 = min{dist(0,1)} = min{10} = 10

min_dist2 = min{dist(0,2)} = min{7} = 7

min_dist3 = min{dist(0,3)} = min{6} = 6

Step-3: Max{10, 7, 6} = 10

Step-4: cx = 1

Step-5: H = H ∪ cx = {0} \cup {1} = {0, 1}

Step-6: Cities c \not\in H are {2, 3}

min_dist2 = min{dist(0,2), dist(1,2)} = min{7, 8} = 7

min_dist3 = min{dist(0,3), dist(1,3)} = min{6, 5} = 5

Step-7: Max{7, 5} = 7

Step-8: cx = 2

Step-9: H = H \cup cx = {0, 1} \cup {2} = {0, 1, 2}

Result: The set H is {0, 1, 2}.

You might be interested in
Match the terms with the correct definitions.
arsen [322]
I think answer should be the first one please give me brainlest let me know if it’s correct or not okay thanks bye
7 0
3 years ago
A. The ragion was colonized by European powers
alex41 [277]

Answer:

?

Explanation:

3 0
3 years ago
A large heat pump should upgrade 5 MW of heat at 85°C to be delivered as heat at 150°C. Suppose the actual heat pump has a COP o
AysviL [449]

Answer:

W=2 MW

Explanation:

Given that

COP= 2.5

Heat extracted from 85°C  

Qa= 5 MW

Lets heat supplied at 150°C   = Qr

The power input to heat pump = W

From first law of thermodynamics

Qr= Qa+ W

We know that COP of heat pump given as

COP=\dfrac{Qr}{W}

2.5=\dfrac{5}{W}

2.5=\dfrac{5}{W}

W=2 MW

For Carnot heat pump

COP=\dfrac{T_2}{T_2-T_1}

2.5=\dfrac{T_2}{T_2-(273+85)}

2.5 T₂ -  895= T₂

T₂=596.66 K

T₂=323.6 °C

7 0
3 years ago
Two common methods of improving fuel efficiency of a vehicle are to reduce the drag coefficient and the frontal area of the vehi
qaws [65]

Answer:

\Delta V = 209.151\,L, \Delta C = 217.517\,USD

Explanation:

The drag force is equal to:

F_{D} = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot A

Where C_{D} is the drag coefficient and A is the frontal area, respectively. The work loss due to drag forces is:

W = F_{D}\cdot \Delta s

The reduction on amount of fuel is associated with the reduction in work loss:

\Delta W = (F_{D,1} - F_{D,2})\cdot \Delta s

Where F_{D,1} and F_{D,2} are the original and the reduced frontal areas, respectively.

\Delta W = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot (A_{1}-A_{2})\cdot \Delta s

The change is work loss in a year is:

\Delta W = (0.3)\cdot \left(\frac{1}{2}\right)\cdot (1.20\,\frac{kg}{m^{3}})\cdot (27.778\,\frac{m}{s})^{2}\cdot [(1.85\,m)\cdot (1.75\,m) - (1.50\,m)\cdot (1.75\,m)]\cdot (25\times 10^{6}\,m)

\Delta W = 2.043\times 10^{9}\,J

\Delta W = 2.043\times 10^{6}\,kJ

The change in chemical energy from gasoline is:

\Delta E = \frac{\Delta W}{\eta}

\Delta E = \frac{2.043\times 10^{6}\,kJ}{0.3}

\Delta E = 6.81\times 10^{6}\,kJ

The changes in gasoline consumption is:

\Delta m = \frac{\Delta E}{L_{c}}

\Delta m = \frac{6.81\times 10^{6}\,kJ}{44000\,\frac{kJ}{kg} }

\Delta m = 154.772\,kg

\Delta V = \frac{154.772\,kg}{0.74\,\frac{kg}{L} }

\Delta V = 209.151\,L

Lastly, the money saved is:

\Delta C = \left(\frac{154.772\,kg}{0.74\,\frac{kg}{L} }\right)\cdot (1.04\,\frac{USD}{L} )

\Delta C = 217.517\,USD

4 0
4 years ago
Write a program that uses a function called Output_Array_Info. Output_Array_Info Properties: Input Parameters: 1. A pointer to a
Artyom0805 [142]

Answer:

C++ code explained below

Explanation:

Please note the below program has been tested on ubuntu 16.04 system and compiled using g++ compiler. This code will also work on other IDE's

-----------------------------------------------------------------------------------------------------------------------------------

Program:

-----------------------------------------------------------------------------------------------------------------------------------

//header files

#include<iostream>

//namespace

using namespace std;

//function defintion

void Output_Array_Info(int *array_ptr, int size)

{

//display all array elements

cout<<"Array elements are: "<<endl;

for(int i =0; i<size; i++)

{

cout<<*(array_ptr+i)<<endl;

}

//display address of each element

cout<<endl<<"memory address of each array elemnt is: "<<endl;

for(int i =0; i<size; i++)

{

cout<<array_ptr+i<<endl;

}

}

//start of main function

int main()

{

//pointer variables

int *pointer;

//an array

int numbers[] = { 5, 7, 9, 10, 12};

//pointer pointing to array

pointer = numbers;

//calculate the size of the array

int size = sizeof(numbers)/sizeof(int);

//call to function

Output_Array_Info(numbers, size);

return 0;

}

//end of the main program

8 0
3 years ago
Other questions:
  • Water circulates throughout a house in a hot water heating system. If the water is pumped at a speed of 0.50m/s through a 4.0-cm
    5·1 answer
  • Your coworker was impressed with the efficiency you showed in the previous problem and would like to apply your methods to a pro
    5·1 answer
  • You're running an engine and seeing that it is exhausting blue smoke. Which is likely to
    9·1 answer
  • A 26-tooth pinion rotating at a uniform 1800 rpm meshes with a 55-tooth gear in a spur gear reducer. Both pinion and gear are ma
    11·1 answer
  • The map shows the distribution of dairy farms across the lower 48 of the United States. Each dot on the map represents approxima
    11·1 answer
  • Write a program that asks the user to enter a list of numbers. The program should take the list of numbers and add only those nu
    7·1 answer
  • Which battery produces more volts per cell, maintenance type or maintenance free ?
    6·1 answer
  • 6.3. A __________ is used to indicate the base material that needs to be beveled.
    12·1 answer
  • What major problems could you encounter in complex intersections?
    7·1 answer
  • 3. If nothing can ever be at absolute zero, why does the concept exist?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!