Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let Q = all nodes which haven't been checked (initialize all V)
- let Q* = all nodes which satisfy the required condition (initialize to empty)
- start with an arbitrary node, v in Q
- while Q is not empty
- let minDeg be the minimum degree of all v's neighbors
- if degree(v) < minDeg
- add v to Q*
- remove all neighbors of v from Q
- remove v from Q
- set v = new arbitrary node, v in Q
- else
- remove v from Q
- set v = v's neighbor in Q of minimum degree
Add Comment
Please, Sign In to add comment