Re: Problem #7
Posted: Tue Mar 21, 2023 2:23 pm
Fuck, I had it except I switched 67 and 65.Tdarcos wrote: Mon Mar 20, 2023 5:57 am Earlier, at this link, I spoke about Problem #7, where you have to send a technician out to a satellite, to replace a destroyed beacon. I'm going to talk about how to solve the problem, and realize that it was badly formed, in that, it can be solved, but it takes a lot of supply ships to allow the supply ship to get there.Or the program I wrote to solve it had bugs. I'm beginning to suspect the latter and it was less than I thought.
The problem is getting the fuel to come back. Getting there is easy enough. Each pair of fuel tanks provides enough fuel to move itself and a full fuel tank 35 sectors. The distance is 250 sectors, so the trip, beacon replacement, and return will take 51 days. The technician's ship carries food suppplies and the beacon, additional ships carry fuel.
I will "show my work," if you're not interested in the nitty gritty, go on to the last 2 parahraphs of this message.
Ship #2 carries 70 units of fuel, enough to move it, and #1, 35 sectors. Ship #2 is now empty.
Ships #3 and #4 can move both of them to sector 35, with #4 now empty,
Ships 5,6 move #5 to sector 35; #7,8 -> #7 to 35; #9,10-> #9 to 35;
At 35, available: #1,3,5,7,9; #3 for return.
#1,5->#1 to 70; #7,9 ->#7 to 70
#11,12-> #12 to 35; #13,14->#13 to 35; #15,16->#15 to 35.
At 70, available #1,7,12, and 15;. #12 stays as fuel for return trip.
#1,7 -> #1 at 105;
#17,18 ->#17 at 35; #19,20 ->#19 at 35; #21,22 ->#21 at 35
#23,24 -> #23 at 35; #25,26 ->#25 at 35; #27,28 ->#27 at 35;
#29,30 ->#29 at 35;#31,32 ->#31 at 35;
#17,19->#17 at 70; #21,23->#21 at 70; #25,27->#25 at 70
#29,31->#29 at 70
#17,21->#17 at 105; #25,29->#25 at 105
#1,25 -> #1,140
#33,34 ->#33 at 35; #35,36 -> #35 at 35 #37,38 ->#37 at 35;
#39,40-> #39 at 35; #41,42 ->#42 at 35; #43,44 -> #43 at 35;
#41,42 ->#42 at 35; #43,44 -> #43 at 35; #45,46->#45 at 35;
#47,48-> #47 at 35
#33,35 -> #33 at 70; #37,39->#37 at 70; #42,43->#42 at 70
#45,47->#45 at 70
#33,37->#33 at 105; #42,45 ->#42 at 105
At 105,available: 17,33,42, Leave #17 for return
#33,42 -> #33 at 140
#1,33 -> #1 at 175
#49,50 -> #49 at 35; #51,52->#51 at 35; #49,51->#49 at 70
#53,54 -> #53 at 35; #55,56->#55 at 35; #53,55->#53 at 70
#57,58 -> #57 at 35; #59,60->#59 at 35; #57,59->#57 at 70
#61,62 -> #61 at 35; #63,64->#63 at 35; #61,63->#61 at 70
#65,66 -> #65 at 35; #67,68->#67 at 35; #65,67->#65 at 70
#69,70 -> #69 at 35; #71,72->#71 at 35; #69,71->#69 at 70
#73,74 -> #73 at 35; #75,76->#75 at 35; #73,75->#73 at 70
#75,76->#75 at 35; #77,78 -> #77 at 35;#75,77->#75 at 70
#79,89->#79 at 35; #81,82 ->#81 at 35; #79,81->#79 at 70
#83,84 -> #83 at 35; #85,86->#85 at 35; #83,85->#83 at 70
#87,88-> #87 at 35; #89,90->#89 at 35; #87,89-> #87 at 70
#91,92->#91 at 35; #93,94->#93 at 35; #91,93->#91 at 70
#95,96->#95 at 35; #97,98->#97 at 35; #95,97->#95 at 70
#99,100->#99 at 35; #101,102->#101 at 35; #99,101->#99 at 70
#49,53->#49 at 105; #57,61->#59 at 105;#49,59->#49 at 140
#57,61->#57 at 105; #65,69->#65 at 105;#57,65->#57 at 140
#73,75->#73 at 105; #79,83->#79 at 105;#73,83->#73 at 140
#87,91->#87 at 105; #95,99->#95 at 105;#87,99->#87 at 140
#49,57->#49 at 175; #73,87->#73 at 175
At 175: #1,#49,#73; Leave #49 for return
#1,73->#1 at 210
This was so complicated, I had saved this article and came back to it. At ffirst I thought I made a mistake requiring additional corrections. This is the sort of thing computers were made to solve.
So I've decided to write a new program to do the calculations. But, anyway, this example should show what is involved to do them.