소개글
최소 신장트리 스패닝트리
컴파일 실행환경
비주얼 스튜디오 6.0
본문내용
크루스컬 알고리즘
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define N 7 //정점의 개수
#define M 1000
#define Z(i) (int)pow(2,i)
const int W[N][N]={
{0,28,M,M,M,10,M},
{28,0,16,M,M,M,14},
{M,16,0,12,M,M,M},
{M,M,12,0,22,M,18},
{M,M,M,22,0,25,24},
{10,M,M,M,25,0,M},
{M,14,M,18,24,M,0}
};
int P[N];
void Kruskal();
void main()
{
Kruskal();
}
typedef struct Qu_{
int i;
int j;
struct Qu_ *next;
}QU;
QU *qu=NULL;
void EQu(int, int);
void DQu(int*, int*);
QU* setQu(int,int,QU *);
압축파일 내 파일목록
aa.cpp
aa.dsp
aa.dsw
aa.ncb
aa.opt
aa.plg
크루스컬.dsp
크루스컬.dsw
크루스컬.ncb
크루스컬.opt
크루스컬.plg
Debug/aa.exe
Debug/aa.ilk
Debug/aa.obj
Debug/aa.pch
Debug/aa.pdb
Debug/vc60.idb
Debug/vc60.pdb
Debug/크루스컬.exe
Debug/크루스컬.ilk
Debug/크루스컬.pch
Debug/크루스컬.pdb
참고 자료
없음