Refined the sleeping algorithm and found the minimal logic representation of its options.