Phase coexistence and finite size scaling in random combinatorial problems