  We study thresholds for extremal properties of random discrete structures. We
determine the threshold for Szemer\'edi's theorem on arithmetic progressions in
random subsets of the integers and its multidimensional extensions and we
determine the threshold for Tur\'an-type problems for random graphs and
hypergraphs. In particular, we verify a conjecture of Kohayakawa, \L uczak, and
R\"odl for Tur\'an-type problems in random graphs. Similar results were
obtained by Conlon and Gowers.
