What you have to do for $$N$$ lamps in $$2D$$ space and 1 robot moving in $$2D$$, is construct the giant $$2\times (N+1)$$ by $$2\times (N+1)$$ matrix. How to do this is mechanically straightforward, but an intuitive understanding is difficult to build up. I'm sure someone will come along that has a better mechanical answer for you. But until then, you might check out Probabilistic Robotics, by Thrun.