Given a undirected graph with $$$N (N \leq 100)$$$ vertices, $$$M (M \leq N * (N + 1) / 2)$$$ edges (there can be edge connect a vertex with itself but all edges are distinct).
Find the number of minimum paths that every edge is in exactly 1 path.
Thanks.
UPD: I just realized it is sum of (odd vertices / 2) for every connected component (and some special case like m = 0, odd vertices = 0).
just find Eilerev way ? or am i wrong ?
Sorry I don't understand what you mean. Could you elaborate it a bit?
As I understand it, a non-weighted graph is given and we want to visit all the edges exactly once, but exactly this is done by the algorithm of the eleree path, there is a theorem when it is possible to traverse all the edges once.
So what happen when there is > 2 odd degree vertex that you cannot fit every vertices into 1 path. Then how many paths? And what if after finishing 1 path you make the graph unconnected ... etc.
Ahhh, I just realized your question, sorry
Auto comment: topic has been updated by Libraion (previous revision, new revision, compare).