GNOME Bugzilla – Bug 632777
Incorrect answer for the 'Trains' puzzle
Last modified: 2010-10-27 18:40:07 UTC
In the "Overtake" game type, the problem reads: "A train leaves the station traveling at {speed_a} mph. {hours} hours later a second train leaves the station traveling in the same direction at {speed_b} mph. How many hours does it take the second train to overtake the first train?" The answer explains: "You can calculate the answer multiplying the *second* train speed by the time and dividing it by the difference of speeds." But this is incorrect. The distance that the second train has to chase is the distance that the first train has travelled before it leaves, i.e. (speed_a * hours). And it chases the distance with (speed_b - speed_a) speed. So, the correct answer should be (speed_a * hours / (speed_b - speed_a)), and the explanation should be changed to "multiplying the *first* train speed...".
Created attachment 172910 [details] [review] Summarized change
Hello Theppitak, First, thanks for taking the time to report this issue and for gbrainy's Thai translation! Regarding the issue, ket's do a real sample. A train A leaves the station at 50Km/h A train B leaves the station at 100Km/h, 1 hour later Option A) With the current gbrainy formula the answer is: speed_b * hours / (speed_b - speed_a) that is 100 * 1 / (100 - 50) = 100 / 50 = 2 hours Option B) With the formula that you suggest is speed_a * hours / (speed_b - speed_a) that is 50 * 1 / (100 - 50) = 50 / 50 = 1 hour The question says: "How many hours does it take the second train to overtake the first train?" I think that correct option is 2 hours and that's the current gbrainy answer. My understanding is that gbrainy is already providing a valid answer. Please, let me know if you think otherwise. Thanks, Jordi,
So, the ambiguity here is about the starting time. In my formula, it starts timing since the second train leaves, that is, it answers how many hours it would take *since it starts moving* to catch up with the first train, while the gbrainy's formula starts timing since the *first* train leaves. So, the difference between the two formulae is the hours between the leavings of the two trains, as shown below: speed_b * hours / (speed_b - speed_a) - speed_a * hours / (speed_b - speed_a) = (speed_b - speed_a) * hours / (speed_b - speed_a) = hours So, it should be clarified which time is being asked, then. With the current wording, my common sense assumes it asks about the very moving object, not about the whole event.
Created attachment 173215 [details] [review] Propused patch
I agree that the puzzle needs to be changed following your indication. I put together a patch (see previous attachment). Let me know if you have any comment, if not, I will commit it. Thanks for your feedback Jordi,
The patch looks good for me. Please go on. And thanks for your work.