tag:blogger.com,1999:blog-6314876008291942531.post1074804665498200326..comments2024-01-14T00:36:43.430-08:00Comments on Antonio Gulli's coding playground: One fly and two colliding trains.Unknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6314876008291942531.post-46878116800770742712010-03-01T21:51:33.591-08:002010-03-01T21:51:33.591-08:00The fly is slower than a train, so once it touches...The fly is slower than a train, so once it touches a train, the fly is stuck to that train.<br />It will fly at 30km/h until it reach a train, and then at 50km/h until the collision.<br />The space covered by the fly varies from 30km to 50km, depending on its initial position: 50km if it started "on a train", 30km if it started in a position such that it will be exactely between the trains when they collide (so 30km away from the middle).Dariohttps://www.blogger.com/profile/18079099596597820518noreply@blogger.comtag:blogger.com,1999:blog-6314876008291942531.post-3431485976788380972010-02-20T04:37:05.274-08:002010-02-20T04:37:05.274-08:00Ans : 30km
Since two trains are against each other...Ans : 30km<br />Since two trains are against each other, the net speed is 100km/h. The distance is 100 km. So It takes 1 hour for them to collide. OTOH the fly could travel 30 km in 1 hourspeed demonhttps://www.blogger.com/profile/01452415347579750603noreply@blogger.comtag:blogger.com,1999:blog-6314876008291942531.post-9331641354752452572010-02-17T10:09:56.724-08:002010-02-17T10:09:56.724-08:00If the arithmetic data are correct, then the train...If the arithmetic data are correct, then the trains will collide before the fly reaches the first train.<br />That is beacuse both trains travel faster thn the fly.<br />To compute the distance that the fly covers we need to<br />find when the trains will collide.<br /> This is after 1 hour. Within this time perid, the fly will cover 30km.<br /><br />PS. Another interesting approach is to use Zeno's paradox. In a similar occassion, Zeno proves that the trains will NEVER collide. Hence, the fly will cover infinite space.Leohttps://www.blogger.com/profile/17742002772935000604noreply@blogger.com