After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632777 - Incorrect answer for the 'Trains' puzzle
Incorrect answer for the 'Trains' puzzle
Status: RESOLVED FIXED
Product: gbrainy
Classification: Other
Component: gbrainy application
git master
Other Linux
: Normal normal
: ---
Assigned To: gbrainy-maint
gbrainy-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-21 09:34 UTC by Theppitak Karoonboonyanan
Modified: 2010-10-27 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Summarized change (1.15 KB, patch)
2010-10-21 09:43 UTC, Theppitak Karoonboonyanan
none Details | Review
Propused patch (1.81 KB, patch)
2010-10-25 19:52 UTC, Jordi Mas
none Details | Review

Description Theppitak Karoonboonyanan 2010-10-21 09:34:16 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...".
Comment 1 Theppitak Karoonboonyanan 2010-10-21 09:43:41 UTC
Created attachment 172910 [details] [review]
Summarized change
Comment 2 Jordi Mas 2010-10-21 20:08:49 UTC
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,
Comment 3 Theppitak Karoonboonyanan 2010-10-22 02:11:06 UTC
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.
Comment 4 Jordi Mas 2010-10-25 19:52:12 UTC
Created attachment 173215 [details] [review]
Propused patch
Comment 5 Jordi Mas 2010-10-25 19:53:23 UTC
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,
Comment 6 Theppitak Karoonboonyanan 2010-10-26 03:26:46 UTC
The patch looks good for me. Please go on. And thanks for your work.