• 파일시티 이벤트
  • LF몰 이벤트
  • 서울좀비 이벤트
  • 탑툰 이벤트
  • 닥터피엘 이벤트
  • 아이템베이 이벤트
  • 아이템매니아 이벤트

Data Structures PJ3

*성*
최초 등록일
2012.12.01
최종 저작일
2011.06
16페이지/한글파일 한컴오피스
가격 3,000원 할인쿠폰받기
다운로드
장바구니

소개글

연세대학교 데이타구조 플젝입니다. 만점받았습니다

목차

(1) Brief explanation of the problem
(2) Your view as to how it ties in with what we covered in class
(3) Discussion of your result
(4) Short explanation of your code
(5) Your code

본문내용

(1) Brief explanation of the problem
- The goal of this project is that I have to find a path through the maze by constructing an graph. And I should find a path by implementing a shortest path seatch on the graph by using algorithms code which is related to path searches such as Dijkstra`s algorithm, Prim`s algorithm or Kruskal`s algorithm. So through this project, I should understand them and make them.
(2) Your view as to how it ties in with what we covered in class
-Graph
The graph consists of a set of vertices and a set of edges. And each edge is a pair. So if the pair is ordered, then the graph is directed. In an undirected graph with edge(v,w) and w is adjacent to v and v is adjacent to w.(Our homework is related with undirected. ) A path in a graph is a sequence of vertices and the length of such a path is the number of edges on the path. A cycle in a directed graph is a path of length at least 1 such that w1=wn. This cycle is simple if the path is simple. For undirected graphs, we require that the edges be distinct. A greedy strategy is continually to select the edges in order of smallest weight and accept an edge if it does not cause a cycle.

<중 략>

for( j = 0 ; j < vertex_num ; j++){
min_cost=infinity; //맨 처음 거리의 최소값은 무한대로 지정.
for( i = 0; i < vertex_num ; i++){
if(known[i] == 0 && dist[i] < min_cost){ //아직 방문하지 않은 노드이고 거리가 최소거리보다 작으면
//다익스트라는 출발지에서 거리가 짧은거를 선태하는 알고리즘이기 때문
min_cost = dist[i]; //최소 거리를 바꿔주고
x = i; //x에 몇 번째(i)인지 저장
}
}
known[x] = 1; //x일때 거리가 최소가 되므로 x를 방문하고 이때 known을 1로 변환

for( k = 0 ; k < vertex_num ; k++){
new_dist = dist[x] + m[x][k] ; // 이전 노드의 거리 길이와 다음노드의 거리값을 저장
if(known[k] == 0 && new_dist < dist[k]){ //아직 방문하지 않은 노드이고
//이전노드와다음노드의최소값이 더 작으면
dist[k] = new_dist; //최소거리를 바꿔주고
v[k] = x; //최소거리들을 v배열에 저장, 이것은 나중에 path를 구할 떄 쓰기위하여 구현함.

참고 자료

없음
*성*
판매자 유형Bronze개인

주의사항

저작권 자료의 정보 및 내용의 진실성에 대하여 해피캠퍼스는 보증하지 않으며, 해당 정보 및 게시물 저작권과 기타 법적 책임은 자료 등록자에게 있습니다.
자료 및 게시물 내용의 불법적 이용, 무단 전재∙배포는 금지되어 있습니다.
저작권침해, 명예훼손 등 분쟁 요소 발견 시 고객센터의 저작권침해 신고센터를 이용해 주시기 바랍니다.
환불정책

해피캠퍼스는 구매자와 판매자 모두가 만족하는 서비스가 되도록 노력하고 있으며, 아래의 4가지 자료환불 조건을 꼭 확인해주시기 바랍니다.

파일오류 중복자료 저작권 없음 설명과 실제 내용 불일치
파일의 다운로드가 제대로 되지 않거나 파일형식에 맞는 프로그램으로 정상 작동하지 않는 경우 다른 자료와 70% 이상 내용이 일치하는 경우 (중복임을 확인할 수 있는 근거 필요함) 인터넷의 다른 사이트, 연구기관, 학교, 서적 등의 자료를 도용한 경우 자료의 설명과 실제 자료의 내용이 일치하지 않는 경우

이런 노하우도 있어요!더보기

찾던 자료가 아닌가요?아래 자료들 중 찾던 자료가 있는지 확인해보세요

  • 한글파일 [토목공학] 맥스웰 상반정리 실험 13페이지
    Hibbeler의 Structural Analysis 책에서 실험과 비슷한 ... δij = Pj?δji ∑Pi?δij = Mj?θji ∑Mi? ... 5번까지의 순서를 계획한 실험 횟수만큼 반복한다. 7) 데이터를 정리한다.
최근 본 자료더보기
탑툰 이벤트
Data Structures PJ3 무료자료보기
  • 레이어 팝업
  • 레이어 팝업
  • 레이어 팝업
  • 레이어 팝업