I want to find a memory conservative yet efficient algorithm for maximal independent vertices set in a undirected graph.
The traditional algorithms use auxiliary data structures (a copy of the original graph) to implement it. I would like to avoid such parallel structure because the memory allocations are slow for a realtime implementation on and I have some memory boundaries. I just want to mark the nodes in the MIS with a boolean label. Is it possible?
Note that I don't want the maximum independent but a maximal independent set.
P.S. I know that this problem is language independent but I'm coding in C++ and STL.
It's difficult to answer this kind of question without knowing exactly what your data structures are. The usual tricks for near in-place graph operations are stealing two bits that would otherwise be zero from pointers and making reversible changes to the graph structure, but I'm not sure how they apply here.
From reading what you've written, it seems that there is no way to iterate through the nodes in the graph without a traversal. How are you representing the stack for, e.g., DFS?