  Several well-studied graph problems aim to select a largest (or smallest)
induced subgraph with a given property of the input graph. Examples of such
problems include maximum independent set, maximum planar graph, and many
others. We consider these problems, where the vertices are presented online.
With each vertex, the online algorithm must decide whether to include it into
the constructed subgraph, based only on the subgraph induced by the vertices
presented so far. We study the properties that are common to all these problems
by investigating the generalized problem: for a hereditary property \pty, find
some maximal induced subgraph having \pty. We study this problem from the point
of view of advice complexity. Using a result from Boyar et al. [STACS 2015], we
give a tight trade-off relationship stating that for inputs of length n roughly
n/c bits of advice are both needed and sufficient to obtain a solution with
competitive ratio c, regardless of the choice of \pty, for any c (possibly a
function of n). Surprisingly, a similar result cannot be obtained for the
symmetric problem: for a given cohereditary property \pty, find a minimum
subgraph having \pty. We show that the advice complexity of this problem varies
significantly with the choice of \pty.
  We also consider preemptive online model, where the decision of the algorithm
is not completely irreversible. In particular, the algorithm may discard some
vertices previously assigned to the constructed set, but discarded vertices
cannot be reinserted into the set again. We show that, for the maximum induced
subgraph problem, preemption cannot help much, giving a lower bound of
$\Omega(n/(c^2\log c))$ bits of advice needed to obtain competitive ratio $c$,
where $c$ is any increasing function bounded by \sqrt{n/log n}. We also give a
linear lower bound for c close to 1.
