Clock hill puzzle

26 views
Skip to first unread message

rohyt

unread,
Aug 14, 2009, 1:54:48 PM8/14/09
to DS & Algo@itbhu
There is a clock at the bottom of the hill and a clock at the top of the hill. The clock at the bottom of the hill works fine but the clock at the top doesn't. How will you synchronize the two clocks. Obviously, you can't carry either of the clocks up or down the hill! And you have a horse to help you transport yourself. And, the time required for going up the hill is not equal to the time required to go down the hill.

Neeraj Singh

unread,
Aug 14, 2009, 2:09:47 PM8/14/09
to ds--al...@googlegroups.com
On Fri, Aug 14, 2009 at 11:24 PM, rohyt <rohyt...@googlemail.com> wrote:
There is a clock at the bottom of the hill and a clock at the top of the hill. The clock at the bottom of the hill works fine but the clock at the top doesn't. How will you synchronize the two clocks. Obviously, you can't carry either of the clocks up or down the hill! And you have a horse to help you transport yourself. And, the time required for going up the hill is not equal to the time required to go down the hill.

had seen this one somewhere :),

let h(u),h(d),m(u),m(d) be times taken to climb up and down by horse and man respectively.

firstly, climb with horse (note the time in lower clock T(L) ) and (note the time there also T(U) )come down by foot now measure the time (T(L)' ) nad measure difference difference ( T(L) - T(L)' )say it is t1,
so h(u) + m(d) = t1
similarly now climb by foot and measure ( T(U)-T(U)'  ) say it is t2
so m(d) + m(u) = t2

proceeding similarly , you will get 4 eqns in 4 unknowns which can be solved to get h(u) or m(u) and hence you can synchronize the clock.






--
Neeraj Kumar
B.Tech (Part III)
Department of Computer Sc. & Engineering
IT-BHU,Varanasi

Shishir Mittal

unread,
Aug 14, 2009, 2:17:40 PM8/14/09
to ds--al...@googlegroups.com
What about the fifth variable that needs to be found, the time lag b/w the clocks? 







--
Neeraj Kumar
B.Tech (Part III)
Department of Computer Sc. & Engineering
IT-BHU,Varanasi






--
Shishir Mittal
Ph: +91 9936 180 121

Pranjal Saxena

unread,
Aug 14, 2009, 2:21:01 PM8/14/09
to ds--al...@googlegroups.com
T(U)=T(L)+[m(u) or h(u)]
--
Regards

Pranjal Saxena
Senior Undergraduate(IV year) Student
Department  of Computer Science and Engineering
IT- BHU,
Varanasi-22105, India.
Ph:+919919635287

gaurav gupta

unread,
Aug 14, 2009, 2:21:11 PM8/14/09
to ds--al...@googlegroups.com
If you have calculated h(u),h(d),m(u),m(d). Then you can calculate time lag easily.

just check time in lower watch, just go by hourse or by foot, and add in the time of lower watch you will get correct time of upper watch.
--
GAURAV GUPTA
B.Tech IV Yr. , Department of Computer Science & Engineering
IT BHU , Varanasi
Contacts
Phone No: +91-99569-49491

e-mail :
gaurav...@acm.org
gaurav.gu...@itbhu.ac.in

Ajay

unread,
Aug 14, 2009, 2:24:09 PM8/14/09
to ds--al...@googlegroups.com
You dont need to find the 5th variable.
Solve for these 5 variables. Now note down the time of clock at the bottom (lets say TB) and goto the top using horse and set the clock at the top to
TT = TB+h(u)

Thats all. No 5th variable.
--
Ajay Kr. Gautam
Postgraduate Student,
Dept. of Computer Science & Engg., IT-BHU
Varanasi-221005, UP
India
-----------------------------------------------------------------
"Easy reading is damned hard writing."
~ Nathaniel Hawthorne

Ajay

unread,
Aug 14, 2009, 2:27:11 PM8/14/09
to ds--al...@googlegroups.com
Too many answers to the same problem
Reply all
Reply to author
Forward
0 new messages