リーフの数が可能な限り少ないスパニングツリーの計算がNP完全であることはよく知られています。しかし、この問題のハミルトン閉路問題への多項式時間変換を理解することはできません。
私の指数関数的な削減:
if(hamiltonian path exists for whole graph)
min leaves = 1;
return;
else
for each vertex of the graph
if(hamiltonian path exists for this graph after removing the vertex and its incident edges)
min leaves = 2;
return;
continue similarly for the graph deleting 2 vertices, 3 vertices, 4vertices,... until you get a minimum spanning tree with some minimum number of leaves.
したがって、最悪の場合、このアルゴリズムは合計で
(N choose 1) + (N choose 2) + (N choose 3) + ....(N choose N) = 2^N
ハミルトン閉路問題への呼び出し。したがって、削減は指数関数的です。
この問題の多項式時間短縮を提案してください。