//求加权无向连通图的MST的贪心算法 //最小树,最小路径联通各个点 function PRIM(){ var graph = [ [], [undefined,Infinity, 23 ,Infinity,Infinity,Infinity, 28 ,36], [undefined, 23 ,Infinity, 20 ,Infinity,Infinity,Infinity,1], [undefined,Infinity, 20 ,Infinity, 15 ,Infinity,Infinity