Arc Consistency Algorithm Implementation In Ruby (1.9.3)