3. SYSTEM INFORMATION
▸ Operating System : Linux
▸ Distro : Ubuntu 16.0
▸ Type : 64 - Bit
▸ Processor : Intel® Core™2 CPU 4400 @ 2.00GHz × 2
▸ Chipset : Intel® G41
▸ RAM : 2GB
▸ Avg. Temperature of Cores : 55-75 C
SOFTWARE AND MODULE INFORMATION
▸ Language : Python 3.4
▸ Modules : Matplotlib , Time
4. ALGORITHM ANALYSIS
▸A Priori Analysis −
● This is a theoretical analysis of an algorithm.
●Efficiency of an algorithm is measured by assuming that all other
factors,
● e.g. processor speed, are constant and have no effect on the
implementation.
▸A Posterior Analysis −
●This is an empirical analysis of an algorithm.
●The selected algorithm is implemented using programming language.
5. ALGORITHM COMPLEXITY
▸ Time Complexity
Amount of time required by the algorithm to run to completion.
▸ Space Complexity
Amount of memory space required by the algorithm in its life cycle.
EXPERIMENTAL STUDIES
▸ Study the runtime of algorithm
▸ Executing it on various test inputs
▸ Recording of time spent during each execution.
ASYMPTOTIC ANALYSIS
Defining the Mathematical boundaries of the function.
8. INSERTION SORT
▸ Assume first element as
sorted.
▸ Maintain sorted sub list by
adding element.
▸ Insert each new item in
sub list w.r.t. value
9. ▹Find the smallest / largest
element in the array
▹Exchange it with the
element in the first position /
last position
▹Find the second smallest /
largest element and
exchange it with the element
in the second position
▹Continue until the array is
sorted
SELECTION SORT
10. ▸ Divide list into smaller sub list of equal interval h
▸ Sort them by Insertion Sort
▸ Repeat until whole list get sorted
SHELL SORT
11. MERGE SORT
▸ If it is only one element, then its already sorted.
▸ Divide the list recursively into two halves until it can no more get
divided
▸ Merge the smaller list into sorted order
12. QUICK SORT
▸ Make the right most index value pivot
▸ Partition the array using pivot value
▸ Quicksort(left partition)
▸ Quicksort(Right partition)
24. Bubble Sort, Insertion Sort,
Selection Sort O(n^2)
▸ Bubble sort is least efficient sorting
method among all.
▸ Bubble Sort and Insertion Sort are
for small size array sorting.
▸ Selection sort is more efficient than
other two O(n^2) methods.
CONCLUSION
Shell Sort, Merge Sort, Quick Sort
O(n log n)
▸ Shell Sort is least efficient among
all O(n log n) methods.
▸ Merge Sort requires double
memory allocation.
▸ Quick Sort is most efficient method
among six.
25. SPEED OF SORTING METHODS IN DESCENDING ORDER
1. Quick Sort
2. Merge Sort
3. Shell Sort
4. Selection Sort
5. Insertion Sort
6. Bubble Sort
CONCLUSION
26. CREDITS AND BIBLIOGRAPHY
Special thanks to Dr. Rajesh Raut of Department of Mathematics.
▸ Beginning Python, JAMES PAYNE.
▸ Data Structures And Algorithm in Python Goodrich, Michael T., Tamassia.
▸ Geekforgeeks.org
▸ Algolist.com
▸ Matplotlib.org
27. THANK YOU!
Any questions?
You can contact me at vichareaditya123@gmail.com
By Aditya Y. Vichare.
adityavichare.wordpress.com