Text this: Probability theory and combinatorial optimization