  Erd\H{o}s posed the problem of finding conditions on a graph $G$ that imply
the largest number of edges in a triangle-free subgraph is equal to the largest
number of edges in a bipartite subgraph. We generalize this problem to general
cases. Let $\delta_r$ be the least number so that any graph $G$ on $n$ vertices
with minimum degree $\delta_rn$ has the property $P_{r-1}(G)=K_rf(G),$ where
$P_{r-1}(G)$ is the largest number of edges in an $(r-1)$-partite subgraph and
$K_rf(G)$ is the largest number of edges in a $K_r$-free subgraph. We show that
$\frac{3r-4}{3r-1}<\delta_r\le\frac{4(3r-7)(r-1)+1}{4(r-2)(3r-4)}$ when
$r\ge4.$ In particular, $\delta_4\le 0.9415.$
