There is a undirected graph with 10 vertexs and several edges, and each vertex has an initial value of 0 or 1. Now for each vertex, if the value of all it's
neighborhood is 1, then it's value of next state will be 1, and 0 otherwise. After computing every vertex in the graph, the value of all vertexs will be updated
simultaneously, and so on.
Would you give me some codes, especially the how to write the "compute" method ?
