imagine nm grid block cell the left cell grid coordinate 11 right cell coordinate nm there k block cell grid you flash laser beam center cell xsys diagonal direction ie northeast northw southeast southwest if beam hit block cell border grid reflect the behavior beam reflection different situation depict figure after beam enter infinite cycle Count number cell beam go we consider beam go cell go center