First time here? Check out the FAQ!
answered 2022-05-02 17:45:14 +0100
G.matching() returns a list of edges, so you can do:
G.matching()
sage: G = graphs.PetersenGraph() sage: G.order(), G.size() (10, 15) sage: M = G.matching() sage: G.delete_edges(M) sage: G.order(), G.size() (10, 10)