Build algorithm to determine if a graph is created with a given algorithm?

If G has vertices with degree 0, they must have been added after the last "friendly" vertex was added. Remove them. Once we're finished culling the friendless, there must be a "last friendly vertex added," identifiable because it's attached to everything.

Find it, remove it, and return to seek-and-destroy-friendless. If the graph is eventually completely destroyed by this process, it can be created by your algorithm.

At the Find step we take the vertex with most edges. If it's not attached to everything, we break and say NO.. if we destroy all we say YES. Thanks – vzait Nov 23 '10 at 22:54.

It's pretty much saying, when you add v to the graph, if it has any friends in thew graph, then it gets an edge to all existing vertices. So every addition either adds no edges, or edges to all vertices. The tricky thing is that a vertex added without any friends may still get an edge from a subsequent added vertex.

If you can tell which order they were added in, then you could determine whether the graph is possible by replaying that order and checking that every addition adds either 0 or all possible edges. If you don't know the order, you could try "unwrapping" the graph by removing the most recent vertices, if you can figure them out. Edit suggested algorithm removed because it's homework ;-).

Thanks. It's ok, I understand :) – vzait Nov 23 '10 at 22:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions