Intelligence of Sherlock Holmes: And Other Three-pipe Problems