SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
Toqeer Ehsan et al Int. Journal of Engineering Research and Applications
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677

RESEARCH ARTICLE

www.ijera.com

OPEN ACCESS

Behavior Analysis of Memorized Sort on Randomly Colonized
Data Sets
Toqeer Ehsan*, M. Usman Ali**, Meer Qaisar Javed**
*(Department of Computer Science, University of Gujrat, Pakistan)
**( Department of Information Technology, University of Gujrat, Pakistan)

ABSTRACT
Memorized sort performs sorting by computing sorted sub-sequences of different sizes in a random data set.
Each sub-sequence can be considered as a data colony populated with random numbers. These colonies have
different population of elements due to their random nature. Increased population of colonies can give better
performance of memorized sort algorithm. The running time of memorized sort may vary as the entropy of the
colonized list is changed. This paper shows the behavior of memorized sort on colonized random data sets with
increased population.
Keywords – Colonization, Complexity, Hybrid Search, Memsort, Sub-sequence

I.

INTRODUCTION

Divide and conquer is an efficient technique
to sort the given set of elements because it divides the
problems into smaller sub-problems [2][10]. These
algorithms can be designed in top-down as well as
bottom-up fashion [5]. Memorized sort is a sorting
algorithm that solves the sorting problem in a bottomup mechanism [5]. It is a divide and conquer
algorithm based on dynamic programming [5].
Dynamic programming is used to solve optimization
problems by memorizing the solutions of overlapping
sub-problems [2][10]. Memorized sort computes the
pre-sorted sub-sequences and combines them by
using the memorizations [5]. Memorized sort
performs well on randomized data sets [5]. Random
data set can be further divided in the form of
independent data sets on the basis of their random
nature. We call these divisions as data colonies [4].
Data colonies are autonomous data sets that
could be treated independently [4]. We can apply any
sorting or searching technique to any data colony [4].
Memorized search is a searching technique that finds
elements from a list when data is colonized randomly
[4]. Colonies are computed only once and a method
of memorizations is introduced which is based on
dynamic programming [4]. It performs efficient
searching on random data. Memorized search can be
implemented in different fashions like sequential
memorized search, binary memorized search and
hybrid memorized search [4]. Same colonization
technique is used in memorized sort and it performs
better then merge sort [5]. Memorized sort is an
efficient sorting algorithm which performs sorting
efficiently on random data just like quick sort [5].
Unlike quick sort, worst case of memorized sort is
similar to merge sort algorithm [5]. The algorithm
may change its behavior when there is random data
with diverse density of colonies. This paper focuses
www.ijera.com

on the behavior analysis of memorized sort when data
is colonized randomly. Next section describes the
process of memorized sorting and memorized
searching in little more detail.

II.

PREVIOUS WORK

Before implementation of memorized sort on
colonized data, let’s have a look on the process of
memorized sort [5], colonization of data [4] and
memorized search [4].
2.1 MEMORIZED SORT
Memorized sort also known as Memsort, is
an algorithm which is based on dynamic
programming and works in divide and conquer nature
[5]. The implementation of the algorithm is of
bottom-up nature [5]. Steps of the algorithms are:
Step1: Compute the sorted sub-sequences and
memorize them.
Step2: Combine the sub-sequences with bottom-up
approach.
Step3: Repeat step2 until there is only one sequence.
First step computes the sorted sub-sequences
be checking every element with next element in the
array. If next element is greater than previous then
both elements belong to the same sub-sequence and
vice versa. All the computed sub-sequences are
memorized in a table, typically an array. Subsequences are not saved as a whole but the starting
and ending of the sequence. For example let’s
consider the follow array ‘A’ of elements.

After computing sorted sub-sequences we
have to memorize the indexes, so memorized sort
creates a new array ‘R’ for memorizations. After first
step, array ‘R’ would look like.
675 | P a g e
Toqeer Ehsan et al Int. Journal of Engineering Research and Applications
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677

www.ijera.com

it saves lot of comparisons due to the logarithmic
nature of binary search.
Starting value is ‘0’ which is obvious that
the first sequence starts with ‘0’ index. Ending of the
sequence is the next value of the array which is ‘2’ at
R[1]. It means there are three elements in first subsequence. The last element of the array is -1 which
shows the end of array. The length of the array ‘R’
depends on the size of the input array. If size of input
array is ‘n’ then the length of ‘R’ must be at least
n/2+2. Once all the sub-arrays are memorized,
algorithm starts combining them. In our example
there are four sub-sequences, [6,8,13], [2,6], [1,7,9]
and [5,8]. Memorized sort combines first two
sequences then last two sequences. After first
iteration, we would have half number of sequences.
Algorithm repeats this step until there is only one subsequence left which is actual array but sorted. Table.1
shows the values of ‘R’ after multiple iterations.
Table.1: Values of array ‘R’

Memorized sort is an efficient technique
which gives better performance on random data but
the complexity class remains similar as merge sort.
Upper bound to memorized sort is O(nlgn) but it
performs much less number of comparisons in
average case.
2.2 COLONIZATION OF DATA
The concept of colonization comes from the
sorted sub-sequences of a random array [4]. A subsequence can be considered as an independent data
colony whose address is saved in array ‘R’. In the
above example there are four colonies (6,8,13), (2,6),
(1,7,9) and (5,8). If there are more data colonies then
memorized sort takes more number of comparisons to
sort the array. After performing some pre-processing
on the data to have less number of colonies, the
performance of the memorized sort can be increased.
2.3 MEMORIZED SEARCH
Memorized search is a fast searching
approach and could be implemented on colonized
random data [4]. As each colony is an autonomous
unit, different searching techniques can be applied on
different colonies on the basis of the population. If
some colony has more population then binary search
gives optimal results. This kind of search is called
binary memorized search. To search a large number
of elements, we can perform multiple searching
methods on different colonies which is called hybrid
memorized search. Hybrid memorized search
performs binary search on large colonies and
sequential search on smaller colonies. Upper bound to
memorized search is still O(n) for random data set but
www.ijera.com

III.

PERFORMANCE OF MEMORIZED SORT
ON COLONIZED DATA

This section shows the performance of
memorized search when running on random data sets
with various numbers of colonies. The behavior of
random data set is totally unpredictable. Now we
study the performance behavior of memorized sort on
colonized data be decreasing the colonization density.
We start with the maximum number of colonies. Let’s
say there are 40% colonies in an array, it means most
of the elements are not sorted and are of minimum
size which is 2. When all the elements of the array are
sorted in reverse order, there are 50% colonies each
of size 2. But we are focused on randomized data we
will start the performance analysis with 40% colonies
in an array. Fig.1 shows the running time of Memsort,
Merge Sort and Quick Sort after running on random
data with different number of colonies.

Figure.1: Comparison of running times
Merge sort and quick sort are also efficient
sorting algorithms but they do not identify the sorted
sub-sequences of already sorted element but Memsort
does. Fig.1 is very self explanatory. As we decrease
the density of colonies, Memsort starts to take less
time to sort same random data set.

IV.

RESULTS

Results are computed after running three
sorting algorithms on an array of one hundred
thousands of elements. In first run, there are 40%
colonies of all number of elements. In next run we run
an iteration of colonization procedure and the number
of colonies decreased to be half. Fig.2 and fig.3 show
the behavior of Memsort, Merge sort and Quick sort
based on running times. It is very clear that Merge
sort and Quick sort algorithms show similar and
consistent behavior in running times even the
numbers of colonies are decreasing gradually. But
Memsort starts sorting the same random array in less
time.

676 | P a g e
Toqeer Ehsan et al Int. Journal of Engineering Research and Applications
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677

[6]
[7]

Figure.2: Behavior comparison of Memsort with
Merge sort.

[8]

[9]

[10]

[11]

Figure.3: Behavior comparison of Memsort with
Quick sort.

V.

www.ijera.com

Randomized Sorted Sub-sequences Based on
Dynamic
Programming,
International
Journal of Computer Science and Network
Security (IJCSNS), 13(9), September 2013,
51-57.
C. A. R. Hoare, Quicksort, Computer
Journal 5(1), 1962, 10-15.
Deepak Abhyankar, Maya Ingle, Elements of
Dynamic
Programming
in
Sorting,
International Journal of Engineering
Research and Applications (IJERA), 1(3),
446-448.
D. E. Knuth, The Art of Computer
Programming, Vol. 3, Pearson Education,
1998.
S. Baase and A. Gelder, Computer
Algorithms:Introduction to Design and
Analysis, Addison-Wesley, 2000.
Anany Levitin, Introduction to the Design
and Analysis of Algorithms, 2nd ed, Pearson
Education, 2007.
D. Abhyankar, M. Ingle, A Performance
Study of Some Sophisticated Partitioning
Algorithms, International Journal of
Advanced
Computer
Science
and
Applications (IJACSA), 2(5), 2011, 135-137.

CONCLUSION

As the degree of colonization is decreased,
Memsort starts showing more linear like behavior
which makes it a very efficient sorting algorithm for
random data. Worst case of Memsort is similar as the
worst case of Merge sort algorithm. Memsort does not
change the time complexity class from logarithmic to
linear. So the time complexity of the algorithm is still
O(nlgn). Running time of Merge sort and Quick sort
is directly proportional to the number of elements in
an array whereas the running time of Memsort is
directly proportional to the entropy of data.
REFERENCES
[1]
A. V. Aho, J. E. Hopcroft, J. D. Ullman, The
Design and Analysis of Computer
Algorithms, Addison-Wesley, 1974.
[2]
T. Cormen, C. Leiserson, R. Rivest, C. Stein,
Intoduction to Algorithms, 3rd ed, MIT Press,
2011.
[3]
Frederic H. Murphy, Edward A. Stohr, A
Dynamic Programming Algorithm for Check
Sorting, Management Science, 24(1),
September 1977, 59-70.
[4]
T. Ehsan, M. Usman, Q. Javed, An Efficient
Searching Technique by Colonization of
Random Data Set based on Dynamic
Programming, International Journal of
Engineering Research and Applications
(IJERA), 3(5), 2015-2020.
[5]
T. Ehsan, M. Usman, Q. Javed, An Efficient
Sorting
Algorithm
by
Computing
www.ijera.com

677 | P a g e

Mais conteúdo relacionado

Mais procurados

Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2Abbott
 
Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Taweh Beysolow II
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureRai University
 
Optimal feature selection from v mware esxi 5.1 feature set
Optimal feature selection from v mware esxi 5.1 feature setOptimal feature selection from v mware esxi 5.1 feature set
Optimal feature selection from v mware esxi 5.1 feature setijccmsjournal
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSGokul Hari
 
A fast clustering based feature subset selection algorithm for high-dimension...
A fast clustering based feature subset selection algorithm for high-dimension...A fast clustering based feature subset selection algorithm for high-dimension...
A fast clustering based feature subset selection algorithm for high-dimension...JPINFOTECH JAYAPRAKASH
 
Binary search algorithm
Binary search algorithmBinary search algorithm
Binary search algorithmmaamir farooq
 
Introduction of data structures and algorithms
Introduction of data structures and algorithmsIntroduction of data structures and algorithms
Introduction of data structures and algorithmsVinayKumarV16
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Hassan Ahmed
 
High dimesional data (FAST clustering ALG) PPT
High dimesional data (FAST clustering ALG) PPTHigh dimesional data (FAST clustering ALG) PPT
High dimesional data (FAST clustering ALG) PPTdeepan v
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introductionSugandh Wafai
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureRai University
 

Mais procurados (18)

INDEX SORT
INDEX SORTINDEX SORT
INDEX SORT
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2
 
Binary Search
Binary SearchBinary Search
Binary Search
 
A0310112
A0310112A0310112
A0310112
 
Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis Overview and Implementation of Principal Component Analysis
Overview and Implementation of Principal Component Analysis
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 
Optimal feature selection from v mware esxi 5.1 feature set
Optimal feature selection from v mware esxi 5.1 feature setOptimal feature selection from v mware esxi 5.1 feature set
Optimal feature selection from v mware esxi 5.1 feature set
 
Binary search
Binary searchBinary search
Binary search
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
 
A fast clustering based feature subset selection algorithm for high-dimension...
A fast clustering based feature subset selection algorithm for high-dimension...A fast clustering based feature subset selection algorithm for high-dimension...
A fast clustering based feature subset selection algorithm for high-dimension...
 
Binary search algorithm
Binary search algorithmBinary search algorithm
Binary search algorithm
 
Introduction of data structures and algorithms
Introduction of data structures and algorithmsIntroduction of data structures and algorithms
Introduction of data structures and algorithms
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
 
Data structure
Data structureData structure
Data structure
 
High dimesional data (FAST clustering ALG) PPT
High dimesional data (FAST clustering ALG) PPTHigh dimesional data (FAST clustering ALG) PPT
High dimesional data (FAST clustering ALG) PPT
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structure
 

Destaque (20)

Do36689702
Do36689702Do36689702
Do36689702
 
Dt36717722
Dt36717722Dt36717722
Dt36717722
 
Eb36777782
Eb36777782Eb36777782
Eb36777782
 
I365358
I365358I365358
I365358
 
Db36619623
Db36619623Db36619623
Db36619623
 
Cm36532538
Cm36532538Cm36532538
Cm36532538
 
Ce36484489
Ce36484489Ce36484489
Ce36484489
 
Co36544546
Co36544546Co36544546
Co36544546
 
Cj36511514
Cj36511514Cj36511514
Cj36511514
 
Bv36438443
Bv36438443Bv36438443
Bv36438443
 
De36636639
De36636639De36636639
De36636639
 
Dm36678681
Dm36678681Dm36678681
Dm36678681
 
Dh36649653
Dh36649653Dh36649653
Dh36649653
 
Dd36630635
Dd36630635Dd36630635
Dd36630635
 
Dj36661666
Dj36661666Dj36661666
Dj36661666
 
Df36640644
Df36640644Df36640644
Df36640644
 
Dg36645648
Dg36645648Dg36645648
Dg36645648
 
Makalah ip
Makalah ipMakalah ip
Makalah ip
 
Dk36667674
Dk36667674Dk36667674
Dk36667674
 
Dn36682688
Dn36682688Dn36682688
Dn36682688
 

Semelhante a Behavior of Memorized Sort on Randomly Colonized Data Sets

Ijcse13 05-01-048
Ijcse13 05-01-048Ijcse13 05-01-048
Ijcse13 05-01-048vital vital
 
Ijcse13 05-01-048
Ijcse13 05-01-048Ijcse13 05-01-048
Ijcse13 05-01-048vital vital
 
Algorithms.pptx
Algorithms.pptxAlgorithms.pptx
Algorithms.pptxjohn6938
 
ppt on arrays in c programming language.pptx
ppt on arrays in c programming language.pptxppt on arrays in c programming language.pptx
ppt on arrays in c programming language.pptxAmanRai352102
 
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...Waqas Tariq
 
Analysis and Comparative of Sorting Algorithms
Analysis and Comparative of Sorting AlgorithmsAnalysis and Comparative of Sorting Algorithms
Analysis and Comparative of Sorting Algorithmsijtsrd
 
SORTING techniques.pptx
SORTING techniques.pptxSORTING techniques.pptx
SORTING techniques.pptxDr.Shweta
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...ijsrd.com
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1Kumar
 
Searching,sorting
Searching,sortingSearching,sorting
Searching,sortingLavanyaJ28
 
Selection_Sort-CSI (For Sharing and General )
Selection_Sort-CSI (For Sharing and General )Selection_Sort-CSI (For Sharing and General )
Selection_Sort-CSI (For Sharing and General )phukak12345
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structuresSenthil Murugan
 
Ch 1 intriductions
Ch 1 intriductionsCh 1 intriductions
Ch 1 intriductionsirshad17
 
Different types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationDifferent types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationZakaria Hossain
 
ClustIII.ppt
ClustIII.pptClustIII.ppt
ClustIII.pptSueMiu
 

Semelhante a Behavior of Memorized Sort on Randomly Colonized Data Sets (20)

Ijcse13 05-01-048
Ijcse13 05-01-048Ijcse13 05-01-048
Ijcse13 05-01-048
 
Ijcse13 05-01-048
Ijcse13 05-01-048Ijcse13 05-01-048
Ijcse13 05-01-048
 
Algorithms.pptx
Algorithms.pptxAlgorithms.pptx
Algorithms.pptx
 
ppt on arrays in c programming language.pptx
ppt on arrays in c programming language.pptxppt on arrays in c programming language.pptx
ppt on arrays in c programming language.pptx
 
Sorting.pptx
Sorting.pptxSorting.pptx
Sorting.pptx
 
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
Bidirectional Bubble Sort Approach to Improving the Performance of Introsort ...
 
Analysis and Comparative of Sorting Algorithms
Analysis and Comparative of Sorting AlgorithmsAnalysis and Comparative of Sorting Algorithms
Analysis and Comparative of Sorting Algorithms
 
SORTING techniques.pptx
SORTING techniques.pptxSORTING techniques.pptx
SORTING techniques.pptx
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...
Improved Frequent Pattern Mining Algorithm using Divide and Conquer Technique...
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
 
Searching,sorting
Searching,sortingSearching,sorting
Searching,sorting
 
Selection_Sort-CSI (For Sharing and General )
Selection_Sort-CSI (For Sharing and General )Selection_Sort-CSI (For Sharing and General )
Selection_Sort-CSI (For Sharing and General )
 
Data structures
Data structuresData structures
Data structures
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
Ch 1 intriductions
Ch 1 intriductionsCh 1 intriductions
Ch 1 intriductions
 
Different types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationDifferent types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with Animation
 
CSE 443 (1).pptx
CSE 443 (1).pptxCSE 443 (1).pptx
CSE 443 (1).pptx
 
ClustIII.ppt
ClustIII.pptClustIII.ppt
ClustIII.ppt
 
Sorting algorithm
Sorting algorithmSorting algorithm
Sorting algorithm
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Behavior of Memorized Sort on Randomly Colonized Data Sets

  • 1. Toqeer Ehsan et al Int. Journal of Engineering Research and Applications ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677 RESEARCH ARTICLE www.ijera.com OPEN ACCESS Behavior Analysis of Memorized Sort on Randomly Colonized Data Sets Toqeer Ehsan*, M. Usman Ali**, Meer Qaisar Javed** *(Department of Computer Science, University of Gujrat, Pakistan) **( Department of Information Technology, University of Gujrat, Pakistan) ABSTRACT Memorized sort performs sorting by computing sorted sub-sequences of different sizes in a random data set. Each sub-sequence can be considered as a data colony populated with random numbers. These colonies have different population of elements due to their random nature. Increased population of colonies can give better performance of memorized sort algorithm. The running time of memorized sort may vary as the entropy of the colonized list is changed. This paper shows the behavior of memorized sort on colonized random data sets with increased population. Keywords – Colonization, Complexity, Hybrid Search, Memsort, Sub-sequence I. INTRODUCTION Divide and conquer is an efficient technique to sort the given set of elements because it divides the problems into smaller sub-problems [2][10]. These algorithms can be designed in top-down as well as bottom-up fashion [5]. Memorized sort is a sorting algorithm that solves the sorting problem in a bottomup mechanism [5]. It is a divide and conquer algorithm based on dynamic programming [5]. Dynamic programming is used to solve optimization problems by memorizing the solutions of overlapping sub-problems [2][10]. Memorized sort computes the pre-sorted sub-sequences and combines them by using the memorizations [5]. Memorized sort performs well on randomized data sets [5]. Random data set can be further divided in the form of independent data sets on the basis of their random nature. We call these divisions as data colonies [4]. Data colonies are autonomous data sets that could be treated independently [4]. We can apply any sorting or searching technique to any data colony [4]. Memorized search is a searching technique that finds elements from a list when data is colonized randomly [4]. Colonies are computed only once and a method of memorizations is introduced which is based on dynamic programming [4]. It performs efficient searching on random data. Memorized search can be implemented in different fashions like sequential memorized search, binary memorized search and hybrid memorized search [4]. Same colonization technique is used in memorized sort and it performs better then merge sort [5]. Memorized sort is an efficient sorting algorithm which performs sorting efficiently on random data just like quick sort [5]. Unlike quick sort, worst case of memorized sort is similar to merge sort algorithm [5]. The algorithm may change its behavior when there is random data with diverse density of colonies. This paper focuses www.ijera.com on the behavior analysis of memorized sort when data is colonized randomly. Next section describes the process of memorized sorting and memorized searching in little more detail. II. PREVIOUS WORK Before implementation of memorized sort on colonized data, let’s have a look on the process of memorized sort [5], colonization of data [4] and memorized search [4]. 2.1 MEMORIZED SORT Memorized sort also known as Memsort, is an algorithm which is based on dynamic programming and works in divide and conquer nature [5]. The implementation of the algorithm is of bottom-up nature [5]. Steps of the algorithms are: Step1: Compute the sorted sub-sequences and memorize them. Step2: Combine the sub-sequences with bottom-up approach. Step3: Repeat step2 until there is only one sequence. First step computes the sorted sub-sequences be checking every element with next element in the array. If next element is greater than previous then both elements belong to the same sub-sequence and vice versa. All the computed sub-sequences are memorized in a table, typically an array. Subsequences are not saved as a whole but the starting and ending of the sequence. For example let’s consider the follow array ‘A’ of elements. After computing sorted sub-sequences we have to memorize the indexes, so memorized sort creates a new array ‘R’ for memorizations. After first step, array ‘R’ would look like. 675 | P a g e
  • 2. Toqeer Ehsan et al Int. Journal of Engineering Research and Applications ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677 www.ijera.com it saves lot of comparisons due to the logarithmic nature of binary search. Starting value is ‘0’ which is obvious that the first sequence starts with ‘0’ index. Ending of the sequence is the next value of the array which is ‘2’ at R[1]. It means there are three elements in first subsequence. The last element of the array is -1 which shows the end of array. The length of the array ‘R’ depends on the size of the input array. If size of input array is ‘n’ then the length of ‘R’ must be at least n/2+2. Once all the sub-arrays are memorized, algorithm starts combining them. In our example there are four sub-sequences, [6,8,13], [2,6], [1,7,9] and [5,8]. Memorized sort combines first two sequences then last two sequences. After first iteration, we would have half number of sequences. Algorithm repeats this step until there is only one subsequence left which is actual array but sorted. Table.1 shows the values of ‘R’ after multiple iterations. Table.1: Values of array ‘R’ Memorized sort is an efficient technique which gives better performance on random data but the complexity class remains similar as merge sort. Upper bound to memorized sort is O(nlgn) but it performs much less number of comparisons in average case. 2.2 COLONIZATION OF DATA The concept of colonization comes from the sorted sub-sequences of a random array [4]. A subsequence can be considered as an independent data colony whose address is saved in array ‘R’. In the above example there are four colonies (6,8,13), (2,6), (1,7,9) and (5,8). If there are more data colonies then memorized sort takes more number of comparisons to sort the array. After performing some pre-processing on the data to have less number of colonies, the performance of the memorized sort can be increased. 2.3 MEMORIZED SEARCH Memorized search is a fast searching approach and could be implemented on colonized random data [4]. As each colony is an autonomous unit, different searching techniques can be applied on different colonies on the basis of the population. If some colony has more population then binary search gives optimal results. This kind of search is called binary memorized search. To search a large number of elements, we can perform multiple searching methods on different colonies which is called hybrid memorized search. Hybrid memorized search performs binary search on large colonies and sequential search on smaller colonies. Upper bound to memorized search is still O(n) for random data set but www.ijera.com III. PERFORMANCE OF MEMORIZED SORT ON COLONIZED DATA This section shows the performance of memorized search when running on random data sets with various numbers of colonies. The behavior of random data set is totally unpredictable. Now we study the performance behavior of memorized sort on colonized data be decreasing the colonization density. We start with the maximum number of colonies. Let’s say there are 40% colonies in an array, it means most of the elements are not sorted and are of minimum size which is 2. When all the elements of the array are sorted in reverse order, there are 50% colonies each of size 2. But we are focused on randomized data we will start the performance analysis with 40% colonies in an array. Fig.1 shows the running time of Memsort, Merge Sort and Quick Sort after running on random data with different number of colonies. Figure.1: Comparison of running times Merge sort and quick sort are also efficient sorting algorithms but they do not identify the sorted sub-sequences of already sorted element but Memsort does. Fig.1 is very self explanatory. As we decrease the density of colonies, Memsort starts to take less time to sort same random data set. IV. RESULTS Results are computed after running three sorting algorithms on an array of one hundred thousands of elements. In first run, there are 40% colonies of all number of elements. In next run we run an iteration of colonization procedure and the number of colonies decreased to be half. Fig.2 and fig.3 show the behavior of Memsort, Merge sort and Quick sort based on running times. It is very clear that Merge sort and Quick sort algorithms show similar and consistent behavior in running times even the numbers of colonies are decreasing gradually. But Memsort starts sorting the same random array in less time. 676 | P a g e
  • 3. Toqeer Ehsan et al Int. Journal of Engineering Research and Applications ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.675-677 [6] [7] Figure.2: Behavior comparison of Memsort with Merge sort. [8] [9] [10] [11] Figure.3: Behavior comparison of Memsort with Quick sort. V. www.ijera.com Randomized Sorted Sub-sequences Based on Dynamic Programming, International Journal of Computer Science and Network Security (IJCSNS), 13(9), September 2013, 51-57. C. A. R. Hoare, Quicksort, Computer Journal 5(1), 1962, 10-15. Deepak Abhyankar, Maya Ingle, Elements of Dynamic Programming in Sorting, International Journal of Engineering Research and Applications (IJERA), 1(3), 446-448. D. E. Knuth, The Art of Computer Programming, Vol. 3, Pearson Education, 1998. S. Baase and A. Gelder, Computer Algorithms:Introduction to Design and Analysis, Addison-Wesley, 2000. Anany Levitin, Introduction to the Design and Analysis of Algorithms, 2nd ed, Pearson Education, 2007. D. Abhyankar, M. Ingle, A Performance Study of Some Sophisticated Partitioning Algorithms, International Journal of Advanced Computer Science and Applications (IJACSA), 2(5), 2011, 135-137. CONCLUSION As the degree of colonization is decreased, Memsort starts showing more linear like behavior which makes it a very efficient sorting algorithm for random data. Worst case of Memsort is similar as the worst case of Merge sort algorithm. Memsort does not change the time complexity class from logarithmic to linear. So the time complexity of the algorithm is still O(nlgn). Running time of Merge sort and Quick sort is directly proportional to the number of elements in an array whereas the running time of Memsort is directly proportional to the entropy of data. REFERENCES [1] A. V. Aho, J. E. Hopcroft, J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, 1974. [2] T. Cormen, C. Leiserson, R. Rivest, C. Stein, Intoduction to Algorithms, 3rd ed, MIT Press, 2011. [3] Frederic H. Murphy, Edward A. Stohr, A Dynamic Programming Algorithm for Check Sorting, Management Science, 24(1), September 1977, 59-70. [4] T. Ehsan, M. Usman, Q. Javed, An Efficient Searching Technique by Colonization of Random Data Set based on Dynamic Programming, International Journal of Engineering Research and Applications (IJERA), 3(5), 2015-2020. [5] T. Ehsan, M. Usman, Q. Javed, An Efficient Sorting Algorithm by Computing www.ijera.com 677 | P a g e