ordered set cp algorithms