On some extremal problems in graph theory