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

광운대 알고리즘 bubble sort, best case, worst case 등 시간복잡도 분석

*예*
개인인증판매자스토어
최초 등록일
2020.03.25
최종 저작일
2019.04
9페이지/파일확장자 압축파일
가격 6,500원 할인쿠폰받기
다운로드
장바구니

소개글

과제할때 참고하시면 좋을것 같습니다
bubble sort에 대한 best case, worst case 시간 복잡도 분석 레포트입니다
각각 case에 대한 증명, 실제 코드 돌렸을때 측정된 시간 그래프 등 작성했습니다.
과제 점수 모두 만점 받았습니다
코드와 레포트 모두 있습니다
(광운대 알고리즘 과제)

목차

1. For the following problems, consider the bubble sort whose input sequence has n distinct numbers and time complexity for the best case is O(n).
2. For the following cases of your pseudocode, find the number of comparisons of adjacent elements. Justify your answers mathematically. (a) The worst case (b) The best case
3. For the following cases of your pseudocode, find the running time in Θ-notation. Justify your answers mathematically. (a) The worst case (b) The average case
4. To show the results and graphs in Problems 5, 6, and 7, write your program with your comments. Explain your program at least four lines.
5. For the following cases of your program, show the step-by-step results. Explain the results at least four lines.
6. For the following cases of your program, draw the graphs for the number of comparisons of adjacent elements versus n. Explain the graphs at least four lines.
7. draw the graphs for the actual running time in your PC versus n. Write the basic information about the PC (e.g., CPU, RAM, OS). Explain the graphs at least four lines.

본문내용

For the following problems, consider the bubble sort whose input sequence has n distinct numbers and time complexity for the best case is O(n).
1. For the bubble sort, write your pseudocode with your comments.
for ( i=0; i < size - 1; i++) {
for ( j=0; j < size - (i+1); j++) { //뒤에 위치한 원소는 이미 정렬되었으므로 size - (i+1) 만큼 반복
end_count = 1;
if( arr[j] > arr[j+1] ) { //앞에 위치한 원소가 뒤에 보다 클 때 교환
end_count = 0;
switch data[j+1] and data[j];
} //비교하는 원소 중 가장 큰 수가 뒤로 가게 된다
}
If(end_count is 1) {return 0; } //정렬이 다 된 경우 바로 프로그램 종료
}

<중 략>

7. draw the graphs for the actual running time in your PC versus n. Write the basic information about the PC (e.g., CPU, RAM, OS). Explain the graphs at least four lines.
(a) The worst case
프로그램의 running time을 측정하기 위해 chrono 라이브러리를 사용했다. Chrono 라이브러리는 기존의 time 함수에 비해 정밀도가 높다. 프로그램의 running time을 측정 단위는 마이크로 초로 설정하고 측정했다. n은 100부터 100단위로 증가하도록 설정했다. n이 증가함에 따라 이전 값 과의 차이는 100부터 900까지 순서대로 약 40 / 70 / 100 / 140 / 190 / 220 / 360 / 630으로 증가폭이 n이 커질수록 점점 커지는 것을 알 수 있다.

참고 자료

없음

압축파일 내 파일목록

알고리즘_1차_과제.docx
코드/소스.cpp
*예*
판매자 유형Bronze개인인증

주의사항

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

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

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

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

최근 본 자료더보기
탑툰 이벤트
광운대 알고리즘 bubble sort, best case, worst case 등 시간복잡도 분석
  • 레이어 팝업
  • 레이어 팝업
  • 레이어 팝업