Independence numbers of locally sparse graphs and a Ramsey type problem

Let G = (V,E) be a graph on n vertices with average degree t ≥ 1 in which for every vertex v ∈ V the induced subgraph on the set of all neighbors of v is r-colorable. We show that the independence number of G is at least c log (r+1) n t log t, for some absolute positive constant c. This strengthens a well known result of Ajtai, Komlós and Szemerédi. Combining their result with some probabilistic arguments, we prove the following Ramsey type theorem, conjectured by Erdös in 1979. There exists an absolute constant c′ > 0 so that in every graph on n vertices in which any set of b √ nc vertices contains at least one edge, there is some set of b √ nc vertices that contains at least c′ √ n log n edges.