A puzzeltask - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: A puzzeltask (/showthread.php?tid=1868) |
A puzzeltask - Kernelpanic - 07-30-2023 Since there is not much going on here at the moment, a small task: A triangular track system with three points is given. (pic 36) Section a is a short dead end with a bumper block. Sections c and b are short distances between the points, the length of which can just accommodate one railroad wagon each. Route D is a long, open-ended route. There is a goods wagon on section B and a container wagon on section C; on section D there is a locomotive with a tender. The section A bounded by the buffer stop is so short that it can accommodate the length of the freight wagon or container wagon, but not the locomotive and tender. So while each of the cars can be moved from section B or C to the other side alone via the dead short distance A, this is not possible for the locomotive because of its length. A locomotive driver now has the task of swapping the position of the two wagons by a shunting process, so that after the shunting process is complete, the container wagon is on track section B and the freight wagon is on track section C. The locomotive ends up on section D again (Fig. 37). How is the shunting process to accomplish this? RE: A puzzeltask - mnrvovrfc - 07-30-2023 The bumper block makes this impossible. The other difficulty is having to turn the car that's on the "C" part. With the way I solved it first, the car that's on "B" will have to be moved into "A". But there might not be enough space in "A" to hold both cars. If so then just move the car that's in "C", then turn so it's on the "B" space, then the car that was sent to "A" space, move it to "C" part. Cannot just move the two cars into the single lane below because they will have to be exchanged in position. There's no room in front of the locomotive to put the car that starts in "C" otherwise. RE: A puzzeltask - justsomeguy - 07-30-2023 At first I thought I had an answer, but then I realized it was tougher than it looks. This would make a great game if someone was to take it on. RE: A puzzeltask - mnrvovrfc - 07-30-2023 (07-30-2023, 09:56 PM)Kernelpanic Wrote: The section A bounded by the buffer stop is so short that it can accommodate the length of the freight wagon or container wagon, but not the locomotive and tender. If this is the case then it's going to be a long trail for the car that's on "B". This assumes there's enough room in front of the locomotive to hold it and not block the front path. Because then the car that begins on "C" will have to be temporarily placed a good deal in front on the front path. Then move the car that's now in front of the locomotive to the "C" part. Finally move the car that's on the front main path to its final position. Code: (Select All) --a--\--C-----D- As I've said, the space in front of the locomotive has to be large enough to accomodate the car that starts in "B" part, and also leave the way clear to the front path. But that is not in the instructions, only says the locomotive is "too large". Also could only guess what is the room in front or in back of its tender. EDIT: one more thing. The switcher vehicle driver will have to ask his comrades to push the car that starts in "C" part, into the space near the bumper block because there might not be enough room for both of those cars. Then it might have to make that clumsy turn. The crew might have to do the same thing for the car to finish in "C" part: push it where it's supposed to be without using the switcher vehicle. RE: A puzzeltask - SpriggsySpriggs - 07-31-2023 This is how I like to work with trains: RE: A puzzeltask - Kernelpanic - 07-31-2023 @mnrvovrfc - if I translated your suggestions correctly, then I can only say: No, it doesn't work that way. The task also says nothing about a team that may help, one only have the locomotive to solve the task. PS: New proposed solutions? RE: A puzzeltask - mnrvovrfc - 07-31-2023 Having problems with Firefox again. At least I tried to supply a solution. Where is everybody else? :O Anyway the problem is too vague to be solved, in all the lettuce of an explanation. I understand the real-life situation for this is hard. Anyway, at least one of the smaller cars will have to be pushed over to the locomotive's tender or whatever to make this work. If the problem doesn't indicate a team or whatever, then it means it's too vague to be answered. Much less with a BASIC program. RE: A puzzeltask - Kernelpanic - 07-31-2023 (07-31-2023, 02:02 PM)mnrvovrfc Wrote: Where is everybody else? :OA good question! That's what I meant by the way with: PS: New proposed solutions? Ok, a hint: 9 shunting operations are necessary to solve the task. RE: A puzzeltask - bplus - 07-31-2023 Does solution work like solution for Towers of Hanoi? RE: A puzzeltask - Kernelpanic - 07-31-2023 (07-31-2023, 07:49 PM)bplus Wrote: Does solution work like solution for Towers of Hanoi?No! |