Phase transitions in combinatorial problems