Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Men, women and gupi live on the planet Alphaomega. Imagine you are travelling by

ID: 3859834 • Letter: M

Question

Men, women and gupi live on the planet Alphaomega. Imagine you are travelling by car on this planet and you need to pass the city Beth. The road goes through this city and you cannot bypass it. There are only two entrances to the city - one from the side you are coming and another from the opposite side. Besides, you know that an evil gupi is sitting at one of the intersections in Beth. When a human being comes close to him, he kidnaps this person and makes the human being a slave. Fortunately, this gupi is lazy and he kidnaps only those who come close to him. The distance in one block is safe for you and can feel the presence of the gupi one block ahead of you. At the same time, other inhabitants of Beth cannot help you because you don't know their language and they don't know your language. Is it always possible to go through the city? Prove that your answer is correct. If it is always possible to go through the city, design an algorithm for doing this. If it is not always possible to go through the city, design an algorithm that will allow you to go through the city when it is possible or to return back when it is impossible.

Explanation / Answer

a) Yes It must always go throghh the city because there is no bypass to the city. The road goes through the city only.

b) If there is an algorithm this is the way we need to design like take the city in first curve box and next city in the rectangle if the car wants to go then yes and if no it must come back.