# Algorithm for mouse catching [duplicate]

I have this question that I think may be interesting to all maths' lovers.

We have $5$ rooms in a row : Room $1$-Room $2$-Room $3$-Room $4$-Room $5$.

There is a little mouse in one of the rooms. А cat tries to catch the mouse and put his leg into one room. If the mouse is in this room then he catches the mouse, otherwise the mouse moves to a nearest room. Тhen the cat again chooses any room etc.

What is the cat's algorithm for catching the mouse?

• This Finding the Robot looks like a equivalent question to me, another similar one is Find a bug under 6 tiles. – What are your thoughts on the problem? – Martin R Dec 30 '17 at 8:51
• @MartinR Thanks. you are right – aid78 Dec 30 '17 at 8:53
• I have taken the liberty to correct many little grammatical and orthographic details. I am not more than you native English speaker, but you should take care about basics (for example "the cat tries" instead of "try") – Jean Marie Dec 30 '17 at 9:19