联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2018-08-04 04:38


CS/ECE/ISyE 524 Homework #6 Due: 11:59pm, Aug 8

Upload a single .pdf file for all non-coding questions and a separate .jl file for each coding question.

Any filename requirements are specified in the questions. Note: We will not look for answers to written

questions in your code, so unless otherwise stated respond to all questions in the .pdf document. In

addition, you must name your models “m” in your code to receive credit on coding problems.

1 Avengers, Assemble!

Thanos is here! Once again, Earth is relying on the Avengers for protection. For convenience, the

United Nations has divided up the world into 8 different zones: North America (NA), South America

(SA), Eurasia (EU), North Africa (NF), South Africa (SF), East Asia (EA), South/West Asia (WA),

and Oceania (OC). The number of hours required to get from each zone to each other zone by Quinjet

is given in the following table:

Zone NA SA EU NF SF EA WA OC

NA 0 5 7 8 10 15 11 16

SA 5 0 11 10 9 15 12 13

EU 7 11 0 4 7 9 5 19

NF 8 10 4 0 3 8 3 18

SF 10 9 7 3 0 10 4 16

EA 15 15 9 8 10 0 3 7

WA 11 12 5 3 4 3 0 15

OC 16 13 19 18 16 7 15 0

A rough estimate of the population in each district (in millions) as follows: NA: 580, SA: 420, EU:

900, NF: 250, SF: 200, EA: 1700, WA: 400, OC: 40. The UN have declared there are going to be

n Avenger locations. The problem is, the UN isn’t sure how many of the Avengers will be available

during the defense against Thanos. Their goal is to maximize the number of people that live within

3 hours of an Avenger. We have been asked to assist the UN by determining where to place the

Avengers for different values of n. Solve the problem for n = 1, 2, 3, 4. Upload your code as ’hw6-1.jl’.

2 Tom Sawyer’s Paint Business – BONUS PROBLEM

Note: This is a bonus problem. If you do not complete it, you can still get 4/4 on this

assignment. If, however, you choose to complete this problem you can gain 0.5 points

extra credit for a correct solution.

After the booming success of his fence-painting adventures, Tom Sawyer has decided to open a painting

business. Every week, Tom makes the same 5 batches of paint for some customers that always have

the same demand. To produce a batch of paint, Tom uses a blender that must be cleaned before

blending the next batch (e.g., the workflow is “blend batch 1, clean, blend batch 2, clean,...”). The

durations of blending paint batches 1 to 5 are 40, 32, 50, 28 and 47 minutes respectively. The cleaning

times depend on the colors and the paint types. For example, a long cleaning period is required if an

oil-based paint is produced after a water-based paint, or to produce white paint after a dark color.

The times are given in minutes in the following table. Each (i, j) pair is the cleaning time required if

batch j is blended after batch i.

Batch 1 2 3 4 5

1 0 10 6 15 9

2 4 0 6 17 8

3 10 11 0 20 14

4 7 15 6 0 2

5 5 8 7 7 0

Tom is a busy guy and wants to spend as little time as possible blending and cleaning. What order

should Tom produce the paint batches in? The order is the same every week, so the cleaning time

between the last batch of one week and the first of the following week needs to be accounted for in

the total duration of cleaning. Give the correct order of paint production and upload your code as

’hw6-bonus.jl’.

Note: Exhaustively looping through all possible orderings is not an acceptable solution!


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp