Random K-satisfiability problem: from an analytic solution to an efficient algorithm.