Here, deletes both endpoints and every edge incident to either endpoint. The algorithm stops when no edge remains and returns . The selected edge set is then a maximal matching.
Let be the set of edges selected by the algorithm, and let be the number of iterations before it terminates.
The selected edges form a matching
After selecting , the algorithm deletes , , and every incident edge. No later selected edge can therefore share an endpoint with :
Hence is a matching. Every unselected edge is eventually deleted because it shares an endpoint with a selected edge. No original edge can therefore be added to , so is maximal.
The output covers every edge
An edge disappears only when one of its endpoints is added to . Therefore,