Extremal combinatorial problems and their applications