Reverse Cuthill-McKee algorithm