An Algorithm for Recognition Processor Arrays by Relocating Spare Processors