Suppose we have a sparse undirected graph $G = (V, E)$ with $|E| = O(|V|)$, and we want to process it and then answer queries of the following type: given a set $A$, is it an independent set in the graph.
The naive solution answers queries in time $O(|A|^2)$, by checking each pair of vertices in $A$ and making sure it isn't an edge. Are there faster algorithms? Was there any research done on this problem? I couldn't find anything.