I have a problem, but I can not understand the solution. This happens as follows:
I have a directed graph with N nodes and M-links and without loops. I need to know the minimum number of chains, so each node belongs to only one chain.
Example:
7 11 7 knots; 11 links
1 2
1 5
2 3
2 5
2 7
3 4 // a link exists between 3 and 4
3 6
4 6
5 4
5 6
7 3
Answer: 2
Example: Chain: 2-7-3-6
Chain: 1-5-4
Thank.
source
share