SlideShare a Scribd company logo
International INTERNATIONAL Journal of Advanced JOURNAL Research OF in Engineering ADVANCED and Technology RESEARCH (IJARET), IN ISSN ENGINEERING 
0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
AND TECHNOLOGY (IJARET) 
ISSN 0976 - 6480 (Print) 
ISSN 0976 - 6499 (Online) 
Volume 5, Issue 9, September (2014), pp. 10-16 
© IAEME: www.iaeme.com/IJARET.asp 
Journal Impact Factor (2014): 7.8273 (Calculated by GISI) 
www.jifactor.com 
AN EFFICIENT SORTING ALGORITHM: INCRECOMPARISION SORT 
Ms. Geeta1, Ms. AnubhootiPapola2 
1M.Tech, 2nd year, Dept. Computer Science and Engineering, 
Uttarakhand Technical University, India 
2Assistant Professor, Dept. Computer Science and Engineering, 
Uttarakhand Technical University, India 
10 
ABSTRACT 
Data Structure is a logical organization of data which subsume of a number of operations, 
sorting is one of them. Sorting facilitate some other operation such as searching, merging and 
normalization.[6] There are many sorting algorithm that has being used in practical life as well as in 
computation. A sorting algorithm includes comparison, swapping, and assignment operations. There 
are numerous of the sorting algorithm like Selection Sort, Double Ended Selection Sort, Max-Min 
Sort which takes O(n2) time in its best case and perform unnecessary number of 
comparisons.[2,3,4,9] In this paper we proposed an algorithm Increcomparision Sort (ICS) which 
does not execute unnecessary number of comparisons. This paper shows enhancement of those 
algorithm which has complexity n2 in their best case. 
Keywords: Algorithm, Max-Min Sort, Double-Ended Selection Sort, Complexity, Increcomparision 
Sort. 
INTRODUCTION 
An algorithm is an effective method expressed as a finite list of well-defined instructions for 
calculating a function In this computational world, sorting plays an important role. Sorting is an 
arrangement of data items either in 
1. Statistical Order:- Order the data based on their numerical values. This is performed in the 
form-a) 
Ascending Order:- Smallest item is in first place and largest item is in last place. Or we 
can say smallest item sorted first. 
b) Descending Order:- Largest item is in first place and smallest item is in last place. Or we 
can say largest item sorted first. 
IJARET 
© I A E M E
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
2. Lexicographical Order:-Alphabetical value like addressee key 
There are many well known sorting algorithms for unsorted list, such as selection sort, Quick 
sort, Insertion sort, Merge sort, Bubble sort and so on. There are many factors to evaluate the 
performance of the sorting algorithms which are given below. [1] 
1. Computational complexity (worst, average and best behavior) (n). 
2. Usage of memory and other computer resources. 
3. Stability 
4. Number of swaps (for in-place algorithms). 
5. Number of comparisons 
The common sorting algorithms can be divided into two classes by the difficulty of their 
algorithms. There is a direct correlation between the complexity of an algorithm and its relative 
effectiveness. Complexity of an algorithm is calculated by asymptotic notations and in three cases. 
There are three types of asymptotic notations- 
1. O notation:- O(g(n)) = { f(n) : $ positive constants c and n0, such that n ³ n0, we have 
11 
0 £ f(n) £ cg(n) } 
2. Q notation:- Q(g(n)) = { f(n) : $ positive constants c1, c2, and n0, such that n ³ n0, We have 
0 £ c1g(n) £ f(n) £ c2g(n) } 
3. W-notation: W(g(n))={ f(n):$ positive constants c and n0, such that n ³ n0, we have 
0 £ cg(n) £ f(n) } 
The three cases are- 
1. Best case:- minimum time taken by an algorithm. 
2. Average case:- average time or mean time taken by an algorithm. 
3. Worst Case:- Maximum time taken by an algorithm. 
Double ended selection sort and max-min sort perform unnecessary comparisons and swaps 
in case of sorted array. To improve this we proposed an algorithm in which there is no need of 
unnecessary swaps which improve the complexity of algorithm. 
Increcomparision Sort:- Sorting is one of the profound research area. For any sorting algorithm its 
minimum complexity shows its good performance. Increcomparision Sort does not perform 
nonessential number of comparisons in its best case. Increcomparision Sort comprises the steps- 
1. i=0; 
2. while(in-1) 
3. if(a[i]=a[i+1]) 
4. i=i+1; 
5. else count++; 
6. for j=n-1to 0 
7. if(a[j]a[j-1]) 
8. exchange a[j] to a[j-1]; 
11. else 
12. if(i=j) or (count=j) 
13. break; 
14. i++; 
In this algorithm first we initialize i as 0. n is number of element in given array.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
Working of Increcomparision Sort:- In this sorting algorithm it is based on value of array 
whether simply increase the index value or swap the array value. If the previous array value less than 
next one, we simply increase the index value .otherwise start swapping from backward. 
Suppose we have an array A which have 8 elements. 
12 
1 2 3 8 7 6 4 5 
After 1st iteration 
1 2 3 8 7 6 4 5 
After 2nd iteration 
1 2 3 8 7 6 4 5 
After 3rd iteration 
1 2 3 8 7 6 4 5 
After 4th iteration 
1 2 3 4 8 7 6 5 
After 5th iteration 
1 2 3 4 5 8 7 6 
After 6th iteration 
1 2 3 4 5 6 8 7 
After 7th iteration 
1 2 3 4 5 6 8 7 
The sorted array is 
1 2 3 4 5 6 8 7 
Fig 1: Working of Increcomparision Sort
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
Complexity of Increcomparision Sort:-Complexity of any algorithm is represents as - Time 
Complexity, which calculates time taken by any algorithm where as Sapce complexity defines, how 
much space or memory required for any algorithm. 
Table 1: Complexity of Increcomparision Sort 
Algorithm Cost Time 
i=0 C1 1 
while(in-1) C2 n 
if(a[i]a[i+1]) C3 n-1 
i=i+1 C4 (n-1).ti 
else count++ C5 te 
for j=n-1 to 0 C6 te.n 
if(a[j]a[j-1]) C7 te.(n-1) 
exchange a[j] to a[j-1] C8 te.(n-1). tj 
Else if(count=j) or(i=j) C9 tee 
break; C10 tee.tci 
i++ C11 te 
In above table cost defines a constant amount of time is required to execute each line of our 
algorithm. One line may take a different amount of time than another line but we shall assume that 
each execution of the ith line takes time ci, where ci is a constant. Time defines how much time each 
line executes in the given algorithm.[16] We can say complexity of any algorithm is sum of 
multiplication of cost with time of each line. 
Complexity of Algorithm 
T(n)= C1*1+C2*n+C3*(n-1)+C4*(n-1).ti+ C5*te+C6* te.n+C7* te.(n-1)+C8*te.(n-1).tj+ C9* 
tee+C10* tee.tci+C11* te 
13 
Where 
te=(n-1)-(n-1). ti 
tee= te.(n-1)-te.(n-1).tj 
ti=1 if condition is true otherwise 0. 
Similarly, 
tj,tci=1 if condition is true otherwise 0. 
In Best case:- 
te=0 and ti=1so 
T(n)=C1.1+C2.n+C3.(n-1)+ C4.(n-1)+ C5.0+ C6.0+ C7.0+ C8.0+ C9.0+ C10.0+ C11.0 
T(n)=C1 + nC2 + nC3 –C3 + nC4 - 
C4 
T(n)= n(C2 + C3+ C4 ) – (C3+C4) + C1
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
14 
So complexity in best case 
T(n)=O(n) 
In Worst case:- 
ti=0 and te=n-1 
T(n)=C1*1+C2*n+C3*n-1+C4*(n-1).0+ C5*(n-1)+ C6*(n-1).n +C7* (n-1)(n-1) +C8. (n-1).(n- 
1).tj+C9*(n-1).(n-1).tj+C10.((n-1).(n-1)-(n-1)(n-1).tj)tci+C11.(n-1) 
For the worst case complexity of any algorithm depends on its inner most loop. In this sorting 
algorithm complexity is depends on C6*(n-1)n . 
So worst case complexity 
T(n)=O(n2) 
Comparison With other algorithm:- Increcomparision sort takes minimum time in its best case. It 
is better than selection sort, merge sort, heap sort etc. in its best case . But in its worst case it also 
produces O(n2) time like some other algorithms insertion sort, cocktail sort.[7,8] 
Table 2: Comparison with different sorting algorithms 
Algorithm Best Case Average Case Worst Case 
Selection Sort O(n2) O(n2) O(n2) 
Bubble Sort O(n2) O(n2) O(n2) 
Insertion Sort O(n) O(n2) O(n2) 
Merge Sort O(nlogn) O(nlogn) O(nlogn) 
Heap Sort O(nlogn) O(nlogn) O(nlogn) 
Quick Sort O(nlogn) O(nlogn) O(n2) 
Cocktail Sort O(n) O(n2) O(n2) 
Max Min Sort O(n2) O(n2) O(n2) 
Double Ended Selection Sort O(n2) O(n2) O(n2) 
Increcomparision Sort O(n) O(n2) O(n2) 
CONCLUSION AND FUTURE SCOPE 
In computer science, a sorting is an efficient way which is used to puts elements of a list in a 
certain order or arranges a collection of items into a particular order. Sorting data has been developed 
to arrange the array values in various ways for a database. In this paper we introduce the 
Increcomparision sort, how it is work, what its complexity and how better it is than other algorithms. 
Increcomparision Sort is an algorithm which is good for small amount of data. It produces faster 
result on that data and it is easy to understand for everyone. It is a straightforward approach and has 
a lot of future scope. Sorting algorithm based on divide and conquers approach produces very fast 
result. Most of these algorithm takes O(nlogn) time. So there is a chance we can improve 
Increcomparision Sort. We can employ this approach in Quick Sort to improve its worst case 
complexity in case when array is already sorted. This approach is problem oriented so it is a 
possibility to make it global oriented. This algorithm is implemented using static data structure, so it 
may be prospect we will implement using dynamic data structure.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
At last we want to say there is a vast scope of sorting algorithm in future and to find an 
15 
optimal sorting algorithm in future. 
REFERENCES 
[1] Mrs. P. Sumathi, Mr. V. V. Karthikeyan, “A New Approach for Selection Sorting”, 
In International Journal of Advanced Research in Computer Engineering  Technology 
(IJARCET) Volume 2, Issue 10, October 2013. 
[2] Md. Khairullah “Enhancing Worst Sorting Algorithms”, In International Journal of 
Advanced Science and Technology Vol. 56, July 2013. 
[3] Aayush Agarwal,Vikash Pardesi ,Namita Agarwal, “A new Approach to Sorting: Min-Max 
Sorting Algorithms”, In International Journal of Engineering Research and Technology, 
May 2013. 
[4] Surender Lakra, Divya, “Improving the performance of selection sort using a modified 
double-ended selection sorting”, In International Journal of Application or Innovation in 
Engineering  Management, May 2013. 
[5] Surmeet Kaur, Tarundeep Singh Sodhi, Parveen Kumar, “Enhanced Insertion Sort 
Algorithm”, In International Journal of Computer Applications, Volume 64– No.21, 
February 2013. 
[6] Oyelami Olufemi Moses, “Bidirectional Bubble Sort Approach to Improving the 
Performance of Introsort in the Worst Case for Large Input Size”, In International 
Journal of Experimental Algorithms (IJEA), Volume (4) : Issue (2), 2013. 
[7] D.T.V Dharmajee Rao,B.Ramesh, “Experimental Based Selection of Best Sorting 
Algorithm “, In International Journal of Modern Engineering Research, July 2012. 
[8] Surmeet Kaur, Tarundeep Singh Sodhi, Parveen Kumar, “Freezing Sort”, In International 
Journal of Applied Information Systems (IJAIS) Volume 2– No.4, May 2012. 
[9] E. Kapur, P. Kumar and S. Gupta, “Proposal of a two way sorting algorithm and 
performance comparison with existing algorithms”, In International Journal of Computer 
Science, Engineering and Applications (IJCSEA), vol. 2, no. 3, (2012). 
[10] V. Mansotra and Kr. Sourabh “Implementing Bubble Sort Using a New Approach”, In 
Proceedings of the 5th National Conference; INDIACom-2011, March 10 – 11, 2011. 
[11] Sultanullah Jadoon , Salman Faiz Solehria, Prof. Dr. Salim ur Rehman, Prof. Hamid Jan , 
“Design and Analysis of Optimized Selection Sort Algorithm”, In International Journal of 
Electric  Computer Sciences IJECS-IJENS Vol: 11 No: 01, February 2011. 
[12] S. Chand, T. Chaudhary and R. Parveen, “Upgraded Selection Sort”, In International 
Journal on Computer Science and Engineering (IJCSE), ISSN: 0975-3397, vol. 3, no. 4, 
2011. 
[13] Jehad Alnihoud and Rami Mansi, “An Enhancement of Major Sorting Algorithms”, In 
The International Arab Journal of Information Technology, Vol. 7, No. 1, January 2010. 
[14] Dr. D. E. Knuth, The Art of Computer Programming, 3rd volume, Sorting and Searching”, 
second edition. 
[15] E. Horowitz, S. Sahni and S. Rajasekaran, Computer Algorithms, Galgotia Publications. 
[16] Introduction to Algorithm, Thomas H. Coremen, Charles E. Leiserson, Ronald L. Rivest, 
Clifford Stein, Page no 23-39. 
[17] http://en.wikipedia.org/wiki/Sort ing_algorithm. 
[18] http:// www.algolist.net/ Algorithms/ Sorting/ Selection_sort. 
[19] www.algorithmist.com/index.php/Stable _Sort. 
[20] www.geeksforgeeks.org/forums/topic/inplace-sorting.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), 
ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 
16 
ABOUT AUTHOR 
Ms. Geeta student of M.Tech in Uttarakhand Technical University. She did her 
B.tech. from Uttar Pradesh Technical University in 2007. She did M.Techs from 
Karnataka State Open University in 2011. She did teaching in different institution. 
Her area of interest is data structure, design and analysis of algorithms and image 
processing. 
Ms. Anubhooti Papola presently working as an assistant professor in Uttarakhand 
Technical University. Before that she works in different institutions. She did her 
B.tech. from H.N.B Garhwal University in 2009 and M.Tech from Graphic Era 
University, Dehradun in 2012. Her area of interest is data structure and image 
processing.

More Related Content

What's hot (18)

PDF
2002 santiago et al
CosmoSantiago
 
PDF
Al04605265270
IJERA Editor
 
PDF
Exhaustive Combinatorial Enumeration
Mathieu Dutour Sikiric
 
PDF
Gaussian Processes: Applications in Machine Learning
butest
 
PDF
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
graphhoc
 
PPT
Java™ (OOP) - Chapter 7: "Multidimensional Arrays"
Gouda Mando
 
PDF
Tensor Train decomposition in machine learning
Alexander Novikov
 
PDF
Jr3516691672
IJERA Editor
 
PDF
Ijetcas14 439
Iasir Journals
 
PDF
50120130405020
IAEME Publication
 
PDF
Algorithm for Edge Antimagic Labeling for Specific Classes of Graphs
CSCJournals
 
PDF
Tracking the tracker: Time Series Analysis in Python from First Principles
kenluck2001
 
PDF
IGA Cable Structures
Thai Son
 
DOC
algorithm Unit 5
Monika Choudhery
 
PDF
Radial Basis Function Interpolation
Jesse Bettencourt
 
RTF
algorithm unit 1
Monika Choudhery
 
PDF
Information Content of Complex Networks
Hector Zenil
 
PDF
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Hector Zenil
 
2002 santiago et al
CosmoSantiago
 
Al04605265270
IJERA Editor
 
Exhaustive Combinatorial Enumeration
Mathieu Dutour Sikiric
 
Gaussian Processes: Applications in Machine Learning
butest
 
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
graphhoc
 
Java™ (OOP) - Chapter 7: "Multidimensional Arrays"
Gouda Mando
 
Tensor Train decomposition in machine learning
Alexander Novikov
 
Jr3516691672
IJERA Editor
 
Ijetcas14 439
Iasir Journals
 
50120130405020
IAEME Publication
 
Algorithm for Edge Antimagic Labeling for Specific Classes of Graphs
CSCJournals
 
Tracking the tracker: Time Series Analysis in Python from First Principles
kenluck2001
 
IGA Cable Structures
Thai Son
 
algorithm Unit 5
Monika Choudhery
 
Radial Basis Function Interpolation
Jesse Bettencourt
 
algorithm unit 1
Monika Choudhery
 
Information Content of Complex Networks
Hector Zenil
 
Graph Spectra through Network Complexity Measures: Information Content of Eig...
Hector Zenil
 

Viewers also liked (19)

PDF
Google Webmasters Tools
Byte
 
DOC
Cinematica fotocopias LUCIA PRADA
wastyflosky
 
PDF
Exposição Abelardo da Hora
Jornal do Commercio
 
PPTX
Start In Ireland
David Scanlon
 
PDF
Cidadão completo 36 1
aghipertexto
 
PPTX
Una vida joven hecha pedazos
Granja Porcícola El Olimpo
 
PDF
Workshop: Virtualisation in der private Cloud mit xen Server Platinum Edition
Digicomp Academy AG
 
PPTX
Google Page rank Factors
Lumin Innovative Web Services
 
PPTX
NACH
1 esoOtero
 
PDF
L?Orso in casa n.4 2014-15
U.S. Alessandria Calcio 1912
 
PDF
04p reflexologia
Valentina Silva
 
PDF
Diari del 28 de setembre de 2012
diarimes
 
POT
θεσσαλονικη γ3 οικονομία και επαγγέλματα
Baxevani Evi
 
PDF
Calendario Navideño 2012 - Síndrome de Down
Eliana Hurtado
 
PDF
Presentacion bav seminario udd 2012 (13 12-2012)
TheLab_Latam
 
PPTX
D23 expo 2013 講演プログラム体験記
iwmr
 
PDF
大阪大学大学院国際公共政策学科20121030
Kunihiro Maeda
 
DOC
Projeto de Lei para reduzir prazos de construção das novas barragens
Jornal do Commercio
 
Google Webmasters Tools
Byte
 
Cinematica fotocopias LUCIA PRADA
wastyflosky
 
Exposição Abelardo da Hora
Jornal do Commercio
 
Start In Ireland
David Scanlon
 
Cidadão completo 36 1
aghipertexto
 
Una vida joven hecha pedazos
Granja Porcícola El Olimpo
 
Workshop: Virtualisation in der private Cloud mit xen Server Platinum Edition
Digicomp Academy AG
 
Google Page rank Factors
Lumin Innovative Web Services
 
L?Orso in casa n.4 2014-15
U.S. Alessandria Calcio 1912
 
04p reflexologia
Valentina Silva
 
Diari del 28 de setembre de 2012
diarimes
 
θεσσαλονικη γ3 οικονομία και επαγγέλματα
Baxevani Evi
 
Calendario Navideño 2012 - Síndrome de Down
Eliana Hurtado
 
Presentacion bav seminario udd 2012 (13 12-2012)
TheLab_Latam
 
D23 expo 2013 講演プログラム体験記
iwmr
 
大阪大学大学院国際公共政策学科20121030
Kunihiro Maeda
 
Projeto de Lei para reduzir prazos de construção das novas barragens
Jornal do Commercio
 
Ad

Similar to An efficient sorting algorithm increcomparision sort 2 (20)

PPT
Introduction to Algorithms
Venkatesh Iyer
 
PPTX
Bca ii dfs u-1 introduction to data structure
Rai University
 
PPTX
Chapter two
mihiretu kassaye
 
PPT
Algorithms with-java-advanced-1.0
BG Java EE Course
 
PPTX
19. algorithms and-complexity
showkat27
 
PDF
DATA STRUCTURE AND ALGORITHM FULL NOTES
Aniruddha Paul
 
PPTX
Bsc cs ii dfs u-1 introduction to data structure
Rai University
 
PPTX
VCE Unit 01 (2).pptx
skilljiolms
 
PPTX
Mca ii dfs u-1 introduction to data structure
Rai University
 
PPT
Insersion & Bubble Sort in Algoritm
Ehsan Ehrari
 
PDF
Analysis and Comparative of Sorting Algorithms
ijtsrd
 
PPTX
Sorting pnk
pinakspatel
 
PPT
Chapter 1 & 2 - Introduction dhjgsdkjfsaf.ppt
AbdisaAwel
 
PPSX
Lecture 2 data structures & algorithms - sorting techniques
Dharmendra Prasad
 
PDF
An Experiment to Determine and Compare Practical Efficiency of Insertion Sort...
Tosin Amuda
 
PPT
Lecture 1 and 2 of Data Structures & Algorithms
haseebanjum2611
 
PPT
Data Structures and Algorithm Analysis
Mary Margarat
 
PPTX
Intro to super. advance algorithm..pptx
ManishBaranwal10
 
PPTX
DATA STRUCTURES unit 1.pptx
ShivamKrPathak
 
Introduction to Algorithms
Venkatesh Iyer
 
Bca ii dfs u-1 introduction to data structure
Rai University
 
Chapter two
mihiretu kassaye
 
Algorithms with-java-advanced-1.0
BG Java EE Course
 
19. algorithms and-complexity
showkat27
 
DATA STRUCTURE AND ALGORITHM FULL NOTES
Aniruddha Paul
 
Bsc cs ii dfs u-1 introduction to data structure
Rai University
 
VCE Unit 01 (2).pptx
skilljiolms
 
Mca ii dfs u-1 introduction to data structure
Rai University
 
Insersion & Bubble Sort in Algoritm
Ehsan Ehrari
 
Analysis and Comparative of Sorting Algorithms
ijtsrd
 
Sorting pnk
pinakspatel
 
Chapter 1 & 2 - Introduction dhjgsdkjfsaf.ppt
AbdisaAwel
 
Lecture 2 data structures & algorithms - sorting techniques
Dharmendra Prasad
 
An Experiment to Determine and Compare Practical Efficiency of Insertion Sort...
Tosin Amuda
 
Lecture 1 and 2 of Data Structures & Algorithms
haseebanjum2611
 
Data Structures and Algorithm Analysis
Mary Margarat
 
Intro to super. advance algorithm..pptx
ManishBaranwal10
 
DATA STRUCTURES unit 1.pptx
ShivamKrPathak
 
Ad

More from IAEME Publication (20)

PDF
IAEME_Publication_Call_for_Paper_September_2022.pdf
IAEME Publication
 
PDF
MODELING AND ANALYSIS OF SURFACE ROUGHNESS AND WHITE LATER THICKNESS IN WIRE-...
IAEME Publication
 
PDF
A STUDY ON THE REASONS FOR TRANSGENDER TO BECOME ENTREPRENEURS
IAEME Publication
 
PDF
BROAD UNEXPOSED SKILLS OF TRANSGENDER ENTREPRENEURS
IAEME Publication
 
PDF
DETERMINANTS AFFECTING THE USER'S INTENTION TO USE MOBILE BANKING APPLICATIONS
IAEME Publication
 
PDF
ANALYSE THE USER PREDILECTION ON GPAY AND PHONEPE FOR DIGITAL TRANSACTIONS
IAEME Publication
 
PDF
VOICE BASED ATM FOR VISUALLY IMPAIRED USING ARDUINO
IAEME Publication
 
PDF
IMPACT OF EMOTIONAL INTELLIGENCE ON HUMAN RESOURCE MANAGEMENT PRACTICES AMONG...
IAEME Publication
 
PDF
VISUALISING AGING PARENTS & THEIR CLOSE CARERS LIFE JOURNEY IN AGING ECONOMY
IAEME Publication
 
PDF
A STUDY ON THE IMPACT OF ORGANIZATIONAL CULTURE ON THE EFFECTIVENESS OF PERFO...
IAEME Publication
 
PDF
GANDHI ON NON-VIOLENT POLICE
IAEME Publication
 
PDF
A STUDY ON TALENT MANAGEMENT AND ITS IMPACT ON EMPLOYEE RETENTION IN SELECTED...
IAEME Publication
 
PDF
ATTRITION IN THE IT INDUSTRY DURING COVID-19 PANDEMIC: LINKING EMOTIONAL INTE...
IAEME Publication
 
PDF
INFLUENCE OF TALENT MANAGEMENT PRACTICES ON ORGANIZATIONAL PERFORMANCE A STUD...
IAEME Publication
 
PDF
A STUDY OF VARIOUS TYPES OF LOANS OF SELECTED PUBLIC AND PRIVATE SECTOR BANKS...
IAEME Publication
 
PDF
EXPERIMENTAL STUDY OF MECHANICAL AND TRIBOLOGICAL RELATION OF NYLON/BaSO4 POL...
IAEME Publication
 
PDF
ROLE OF SOCIAL ENTREPRENEURSHIP IN RURAL DEVELOPMENT OF INDIA - PROBLEMS AND ...
IAEME Publication
 
PDF
OPTIMAL RECONFIGURATION OF POWER DISTRIBUTION RADIAL NETWORK USING HYBRID MET...
IAEME Publication
 
PDF
APPLICATION OF FRUGAL APPROACH FOR PRODUCTIVITY IMPROVEMENT - A CASE STUDY OF...
IAEME Publication
 
PDF
A MULTIPLE – CHANNEL QUEUING MODELS ON FUZZY ENVIRONMENT
IAEME Publication
 
IAEME_Publication_Call_for_Paper_September_2022.pdf
IAEME Publication
 
MODELING AND ANALYSIS OF SURFACE ROUGHNESS AND WHITE LATER THICKNESS IN WIRE-...
IAEME Publication
 
A STUDY ON THE REASONS FOR TRANSGENDER TO BECOME ENTREPRENEURS
IAEME Publication
 
BROAD UNEXPOSED SKILLS OF TRANSGENDER ENTREPRENEURS
IAEME Publication
 
DETERMINANTS AFFECTING THE USER'S INTENTION TO USE MOBILE BANKING APPLICATIONS
IAEME Publication
 
ANALYSE THE USER PREDILECTION ON GPAY AND PHONEPE FOR DIGITAL TRANSACTIONS
IAEME Publication
 
VOICE BASED ATM FOR VISUALLY IMPAIRED USING ARDUINO
IAEME Publication
 
IMPACT OF EMOTIONAL INTELLIGENCE ON HUMAN RESOURCE MANAGEMENT PRACTICES AMONG...
IAEME Publication
 
VISUALISING AGING PARENTS & THEIR CLOSE CARERS LIFE JOURNEY IN AGING ECONOMY
IAEME Publication
 
A STUDY ON THE IMPACT OF ORGANIZATIONAL CULTURE ON THE EFFECTIVENESS OF PERFO...
IAEME Publication
 
GANDHI ON NON-VIOLENT POLICE
IAEME Publication
 
A STUDY ON TALENT MANAGEMENT AND ITS IMPACT ON EMPLOYEE RETENTION IN SELECTED...
IAEME Publication
 
ATTRITION IN THE IT INDUSTRY DURING COVID-19 PANDEMIC: LINKING EMOTIONAL INTE...
IAEME Publication
 
INFLUENCE OF TALENT MANAGEMENT PRACTICES ON ORGANIZATIONAL PERFORMANCE A STUD...
IAEME Publication
 
A STUDY OF VARIOUS TYPES OF LOANS OF SELECTED PUBLIC AND PRIVATE SECTOR BANKS...
IAEME Publication
 
EXPERIMENTAL STUDY OF MECHANICAL AND TRIBOLOGICAL RELATION OF NYLON/BaSO4 POL...
IAEME Publication
 
ROLE OF SOCIAL ENTREPRENEURSHIP IN RURAL DEVELOPMENT OF INDIA - PROBLEMS AND ...
IAEME Publication
 
OPTIMAL RECONFIGURATION OF POWER DISTRIBUTION RADIAL NETWORK USING HYBRID MET...
IAEME Publication
 
APPLICATION OF FRUGAL APPROACH FOR PRODUCTIVITY IMPROVEMENT - A CASE STUDY OF...
IAEME Publication
 
A MULTIPLE – CHANNEL QUEUING MODELS ON FUZZY ENVIRONMENT
IAEME Publication
 

Recently uploaded (20)

PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 

An efficient sorting algorithm increcomparision sort 2

  • 1. International INTERNATIONAL Journal of Advanced JOURNAL Research OF in Engineering ADVANCED and Technology RESEARCH (IJARET), IN ISSN ENGINEERING 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME AND TECHNOLOGY (IJARET) ISSN 0976 - 6480 (Print) ISSN 0976 - 6499 (Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME: www.iaeme.com/IJARET.asp Journal Impact Factor (2014): 7.8273 (Calculated by GISI) www.jifactor.com AN EFFICIENT SORTING ALGORITHM: INCRECOMPARISION SORT Ms. Geeta1, Ms. AnubhootiPapola2 1M.Tech, 2nd year, Dept. Computer Science and Engineering, Uttarakhand Technical University, India 2Assistant Professor, Dept. Computer Science and Engineering, Uttarakhand Technical University, India 10 ABSTRACT Data Structure is a logical organization of data which subsume of a number of operations, sorting is one of them. Sorting facilitate some other operation such as searching, merging and normalization.[6] There are many sorting algorithm that has being used in practical life as well as in computation. A sorting algorithm includes comparison, swapping, and assignment operations. There are numerous of the sorting algorithm like Selection Sort, Double Ended Selection Sort, Max-Min Sort which takes O(n2) time in its best case and perform unnecessary number of comparisons.[2,3,4,9] In this paper we proposed an algorithm Increcomparision Sort (ICS) which does not execute unnecessary number of comparisons. This paper shows enhancement of those algorithm which has complexity n2 in their best case. Keywords: Algorithm, Max-Min Sort, Double-Ended Selection Sort, Complexity, Increcomparision Sort. INTRODUCTION An algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function In this computational world, sorting plays an important role. Sorting is an arrangement of data items either in 1. Statistical Order:- Order the data based on their numerical values. This is performed in the form-a) Ascending Order:- Smallest item is in first place and largest item is in last place. Or we can say smallest item sorted first. b) Descending Order:- Largest item is in first place and smallest item is in last place. Or we can say largest item sorted first. IJARET © I A E M E
  • 2. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 2. Lexicographical Order:-Alphabetical value like addressee key There are many well known sorting algorithms for unsorted list, such as selection sort, Quick sort, Insertion sort, Merge sort, Bubble sort and so on. There are many factors to evaluate the performance of the sorting algorithms which are given below. [1] 1. Computational complexity (worst, average and best behavior) (n). 2. Usage of memory and other computer resources. 3. Stability 4. Number of swaps (for in-place algorithms). 5. Number of comparisons The common sorting algorithms can be divided into two classes by the difficulty of their algorithms. There is a direct correlation between the complexity of an algorithm and its relative effectiveness. Complexity of an algorithm is calculated by asymptotic notations and in three cases. There are three types of asymptotic notations- 1. O notation:- O(g(n)) = { f(n) : $ positive constants c and n0, such that n ³ n0, we have 11 0 £ f(n) £ cg(n) } 2. Q notation:- Q(g(n)) = { f(n) : $ positive constants c1, c2, and n0, such that n ³ n0, We have 0 £ c1g(n) £ f(n) £ c2g(n) } 3. W-notation: W(g(n))={ f(n):$ positive constants c and n0, such that n ³ n0, we have 0 £ cg(n) £ f(n) } The three cases are- 1. Best case:- minimum time taken by an algorithm. 2. Average case:- average time or mean time taken by an algorithm. 3. Worst Case:- Maximum time taken by an algorithm. Double ended selection sort and max-min sort perform unnecessary comparisons and swaps in case of sorted array. To improve this we proposed an algorithm in which there is no need of unnecessary swaps which improve the complexity of algorithm. Increcomparision Sort:- Sorting is one of the profound research area. For any sorting algorithm its minimum complexity shows its good performance. Increcomparision Sort does not perform nonessential number of comparisons in its best case. Increcomparision Sort comprises the steps- 1. i=0; 2. while(in-1) 3. if(a[i]=a[i+1]) 4. i=i+1; 5. else count++; 6. for j=n-1to 0 7. if(a[j]a[j-1]) 8. exchange a[j] to a[j-1]; 11. else 12. if(i=j) or (count=j) 13. break; 14. i++; In this algorithm first we initialize i as 0. n is number of element in given array.
  • 3. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME Working of Increcomparision Sort:- In this sorting algorithm it is based on value of array whether simply increase the index value or swap the array value. If the previous array value less than next one, we simply increase the index value .otherwise start swapping from backward. Suppose we have an array A which have 8 elements. 12 1 2 3 8 7 6 4 5 After 1st iteration 1 2 3 8 7 6 4 5 After 2nd iteration 1 2 3 8 7 6 4 5 After 3rd iteration 1 2 3 8 7 6 4 5 After 4th iteration 1 2 3 4 8 7 6 5 After 5th iteration 1 2 3 4 5 8 7 6 After 6th iteration 1 2 3 4 5 6 8 7 After 7th iteration 1 2 3 4 5 6 8 7 The sorted array is 1 2 3 4 5 6 8 7 Fig 1: Working of Increcomparision Sort
  • 4. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME Complexity of Increcomparision Sort:-Complexity of any algorithm is represents as - Time Complexity, which calculates time taken by any algorithm where as Sapce complexity defines, how much space or memory required for any algorithm. Table 1: Complexity of Increcomparision Sort Algorithm Cost Time i=0 C1 1 while(in-1) C2 n if(a[i]a[i+1]) C3 n-1 i=i+1 C4 (n-1).ti else count++ C5 te for j=n-1 to 0 C6 te.n if(a[j]a[j-1]) C7 te.(n-1) exchange a[j] to a[j-1] C8 te.(n-1). tj Else if(count=j) or(i=j) C9 tee break; C10 tee.tci i++ C11 te In above table cost defines a constant amount of time is required to execute each line of our algorithm. One line may take a different amount of time than another line but we shall assume that each execution of the ith line takes time ci, where ci is a constant. Time defines how much time each line executes in the given algorithm.[16] We can say complexity of any algorithm is sum of multiplication of cost with time of each line. Complexity of Algorithm T(n)= C1*1+C2*n+C3*(n-1)+C4*(n-1).ti+ C5*te+C6* te.n+C7* te.(n-1)+C8*te.(n-1).tj+ C9* tee+C10* tee.tci+C11* te 13 Where te=(n-1)-(n-1). ti tee= te.(n-1)-te.(n-1).tj ti=1 if condition is true otherwise 0. Similarly, tj,tci=1 if condition is true otherwise 0. In Best case:- te=0 and ti=1so T(n)=C1.1+C2.n+C3.(n-1)+ C4.(n-1)+ C5.0+ C6.0+ C7.0+ C8.0+ C9.0+ C10.0+ C11.0 T(n)=C1 + nC2 + nC3 –C3 + nC4 - C4 T(n)= n(C2 + C3+ C4 ) – (C3+C4) + C1
  • 5. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 14 So complexity in best case T(n)=O(n) In Worst case:- ti=0 and te=n-1 T(n)=C1*1+C2*n+C3*n-1+C4*(n-1).0+ C5*(n-1)+ C6*(n-1).n +C7* (n-1)(n-1) +C8. (n-1).(n- 1).tj+C9*(n-1).(n-1).tj+C10.((n-1).(n-1)-(n-1)(n-1).tj)tci+C11.(n-1) For the worst case complexity of any algorithm depends on its inner most loop. In this sorting algorithm complexity is depends on C6*(n-1)n . So worst case complexity T(n)=O(n2) Comparison With other algorithm:- Increcomparision sort takes minimum time in its best case. It is better than selection sort, merge sort, heap sort etc. in its best case . But in its worst case it also produces O(n2) time like some other algorithms insertion sort, cocktail sort.[7,8] Table 2: Comparison with different sorting algorithms Algorithm Best Case Average Case Worst Case Selection Sort O(n2) O(n2) O(n2) Bubble Sort O(n2) O(n2) O(n2) Insertion Sort O(n) O(n2) O(n2) Merge Sort O(nlogn) O(nlogn) O(nlogn) Heap Sort O(nlogn) O(nlogn) O(nlogn) Quick Sort O(nlogn) O(nlogn) O(n2) Cocktail Sort O(n) O(n2) O(n2) Max Min Sort O(n2) O(n2) O(n2) Double Ended Selection Sort O(n2) O(n2) O(n2) Increcomparision Sort O(n) O(n2) O(n2) CONCLUSION AND FUTURE SCOPE In computer science, a sorting is an efficient way which is used to puts elements of a list in a certain order or arranges a collection of items into a particular order. Sorting data has been developed to arrange the array values in various ways for a database. In this paper we introduce the Increcomparision sort, how it is work, what its complexity and how better it is than other algorithms. Increcomparision Sort is an algorithm which is good for small amount of data. It produces faster result on that data and it is easy to understand for everyone. It is a straightforward approach and has a lot of future scope. Sorting algorithm based on divide and conquers approach produces very fast result. Most of these algorithm takes O(nlogn) time. So there is a chance we can improve Increcomparision Sort. We can employ this approach in Quick Sort to improve its worst case complexity in case when array is already sorted. This approach is problem oriented so it is a possibility to make it global oriented. This algorithm is implemented using static data structure, so it may be prospect we will implement using dynamic data structure.
  • 6. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME At last we want to say there is a vast scope of sorting algorithm in future and to find an 15 optimal sorting algorithm in future. REFERENCES [1] Mrs. P. Sumathi, Mr. V. V. Karthikeyan, “A New Approach for Selection Sorting”, In International Journal of Advanced Research in Computer Engineering Technology (IJARCET) Volume 2, Issue 10, October 2013. [2] Md. Khairullah “Enhancing Worst Sorting Algorithms”, In International Journal of Advanced Science and Technology Vol. 56, July 2013. [3] Aayush Agarwal,Vikash Pardesi ,Namita Agarwal, “A new Approach to Sorting: Min-Max Sorting Algorithms”, In International Journal of Engineering Research and Technology, May 2013. [4] Surender Lakra, Divya, “Improving the performance of selection sort using a modified double-ended selection sorting”, In International Journal of Application or Innovation in Engineering Management, May 2013. [5] Surmeet Kaur, Tarundeep Singh Sodhi, Parveen Kumar, “Enhanced Insertion Sort Algorithm”, In International Journal of Computer Applications, Volume 64– No.21, February 2013. [6] Oyelami Olufemi Moses, “Bidirectional Bubble Sort Approach to Improving the Performance of Introsort in the Worst Case for Large Input Size”, In International Journal of Experimental Algorithms (IJEA), Volume (4) : Issue (2), 2013. [7] D.T.V Dharmajee Rao,B.Ramesh, “Experimental Based Selection of Best Sorting Algorithm “, In International Journal of Modern Engineering Research, July 2012. [8] Surmeet Kaur, Tarundeep Singh Sodhi, Parveen Kumar, “Freezing Sort”, In International Journal of Applied Information Systems (IJAIS) Volume 2– No.4, May 2012. [9] E. Kapur, P. Kumar and S. Gupta, “Proposal of a two way sorting algorithm and performance comparison with existing algorithms”, In International Journal of Computer Science, Engineering and Applications (IJCSEA), vol. 2, no. 3, (2012). [10] V. Mansotra and Kr. Sourabh “Implementing Bubble Sort Using a New Approach”, In Proceedings of the 5th National Conference; INDIACom-2011, March 10 – 11, 2011. [11] Sultanullah Jadoon , Salman Faiz Solehria, Prof. Dr. Salim ur Rehman, Prof. Hamid Jan , “Design and Analysis of Optimized Selection Sort Algorithm”, In International Journal of Electric Computer Sciences IJECS-IJENS Vol: 11 No: 01, February 2011. [12] S. Chand, T. Chaudhary and R. Parveen, “Upgraded Selection Sort”, In International Journal on Computer Science and Engineering (IJCSE), ISSN: 0975-3397, vol. 3, no. 4, 2011. [13] Jehad Alnihoud and Rami Mansi, “An Enhancement of Major Sorting Algorithms”, In The International Arab Journal of Information Technology, Vol. 7, No. 1, January 2010. [14] Dr. D. E. Knuth, The Art of Computer Programming, 3rd volume, Sorting and Searching”, second edition. [15] E. Horowitz, S. Sahni and S. Rajasekaran, Computer Algorithms, Galgotia Publications. [16] Introduction to Algorithm, Thomas H. Coremen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, Page no 23-39. [17] http://en.wikipedia.org/wiki/Sort ing_algorithm. [18] http:// www.algolist.net/ Algorithms/ Sorting/ Selection_sort. [19] www.algorithmist.com/index.php/Stable _Sort. [20] www.geeksforgeeks.org/forums/topic/inplace-sorting.
  • 7. International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 – 6480(Print), ISSN 0976 – 6499(Online) Volume 5, Issue 9, September (2014), pp. 10-16 © IAEME 16 ABOUT AUTHOR Ms. Geeta student of M.Tech in Uttarakhand Technical University. She did her B.tech. from Uttar Pradesh Technical University in 2007. She did M.Techs from Karnataka State Open University in 2011. She did teaching in different institution. Her area of interest is data structure, design and analysis of algorithms and image processing. Ms. Anubhooti Papola presently working as an assistant professor in Uttarakhand Technical University. Before that she works in different institutions. She did her B.tech. from H.N.B Garhwal University in 2009 and M.Tech from Graphic Era University, Dehradun in 2012. Her area of interest is data structure and image processing.