Here is the problem: You are facing a high wall that stretches infinitelyin both
ID: 3608704 • Letter: H
Question
Here is the problem:You are facing a high wall that stretches infinitelyin both directions. There is a door in the wall, but you don't knowhow far away or in which direction. It is pitch dark, but you havea very dim lighted candle that will enable you to see the door whenyou are right next to it. Show that there is an algorithm thatenables you to find the door by walking at most O( n) steps, wheren is the number of steps that you would have taken if you had knownwhere the door was and walked directly to it. So am I supposed to research into existing algorithms with arunning time of O(n)? Or am I supposed to create my own algorithmto solve this problem? I don't really know how to tackle this problem. Some helpwould be great. Thanks Here is the problem:
You are facing a high wall that stretches infinitelyin both directions. There is a door in the wall, but you don't knowhow far away or in which direction. It is pitch dark, but you havea very dim lighted candle that will enable you to see the door whenyou are right next to it. Show that there is an algorithm thatenables you to find the door by walking at most O( n) steps, wheren is the number of steps that you would have taken if you had knownwhere the door was and walked directly to it. So am I supposed to research into existing algorithms with arunning time of O(n)? Or am I supposed to create my own algorithmto solve this problem? I don't really know how to tackle this problem. Some helpwould be great. Thanks