Write the algorithm with an example: Solve Floyd's cycle finding algorithm where three runners R, T &
Question:
Write the algorithm with an example: Solve Floyd's cycle finding algorithm where three runners R, T & C running on the way of 45 stoppages starts from 0, with different speed (R jumps by avoiding one stoppage every time, T meets all stoppages one after another&C jumps on the even-numbered stoppages every time) and different starting time to run. There are two different loops on the way to run first start on the 5th stoppage and out after the 17th, and the second start on the 27th stoppage and out after39th. * T starts to run first, *R the second runner, starting when Tenter in the first loop, and *C is starting to run when Routs from the first loop. R will out from the first loop after meeting with Tones and C & T both will out from the first loop after their meeting there. C will out from the second loop after meeting with Ronce and R& T both will out from the second loop after their meeting once.
Count and find answers for:
1) Completed rounds of R (in both loops),
2) Completed rounds of T (in both loops),
3) Completed rounds of C (in both loops),
4) First and second meeting stoppages in both loops,
5) Who will reach first on the last stoppage and who will last?
Thermodynamics An Interactive Approach
ISBN: 978-0130351173
1st edition
Authors: Subrata Bhattacharjee