SlideShare a Scribd company logo
1 of 22
IMPLEMENTING MERGE-SORT
OUTLINE
 INTRODUCTION
 Divide & Conquer approach
 Illustration
 LITERATURE REVIEW
 PROBLEM STATEMENT
 CONCLUSION
 REFERENCES
2
INTRODUCTION
3
 Merge Sort:
 "Break the data to sort in half, sort each half separately using
merge sort, and merge the halves back together into a single
sorted list."
 It employs a common algorithmic paradigm based on
recursion, i.e. divide-and-conquer paradigm.
 Divide-and-conquer algorithm works in three steps:
 Divide
 Conquer
 Combine
DIVIDE & CONQUER APPROACH
4
Fig. 1: Divide & Conquer view of one
step[3]
Here's how to view one step, assuming that each divide step
creates two subproblems:
ILLUSTRATION
5
Here is a diagrammatic example for how merge sort works:
Fig. 2: Merge Sort Working[5]
LITERATURE-REVIEW
6
LITERATURE-REVIEW(1/2)
7
 Title: ” Formal Model Merging Applied to Class
Diagram Integration”[1]
Authors: Artur Boronat, Jose A. C., Isidro Ramos, Patrico Letelier
 Objective: The definition of Merge operator is applied on class
diagrams integration to present an automated approach for
generic model merging providing support for conflict
resolution and traceability between software artifacts.
Keywords: Model-Driven Engineering, Model Management, model
merging, conflict resolution.
LITERATURE-REVIEW(1/2 Cont..)
8
 Introduction:
 Models are the main assets in the software
development process.
 Models collect the information that describes the
information system at a high abstraction level, which
permits the development of the application in an
automated way.
 In this process, models constitute software artifacts
that experience refinements from the problem space to
the solution space.
CASE STUDY
9
 Use Case Analysis using Partial Class
Diagrams:
 Case Study - To illustrate how Merge operator can be
used effectively to deal with the required needs like
inconsistencies or conflicts among partial models
which often arises, etc.
 Here, part of a system for managing submissions that
are received in a conference is presented.
 In this example, the focus is on the fragment of the
Use-Case Model (Fig. 3).
USE CASE MODEL
10
Software development methodologies based on UML propose an approach where
the process is Use Case Driven, which means that all artifacts have traceability
links from Use Cases (The artifacts are refined through several transformation
steps).
The Use Case Model must sacrifice precision to facilitate readability and
validation. So, the analysis of use cases is mainly a manual activity.
Fig. 3: Use Case Model[1]
GENERIC SEMANTICS
11
 Merge Operator:
 The Merge operator takes two models as input and
produces a third one.
 If A and B are models in a specific meta-model
algebraic specification, the application of the Merge
operator on them produces a model C, which consists
the union of A and B.
 Taking into account that duplicates are not allowed in a
model, the union is disjoint.
LITERATURE-REVIEW(1/2 Cont..)
12
 Semantics of the Merge operator needs to introduce three
concepts:
 The equivalence relation;
 The conflict resolution strategy;
 The refreshment of a construct.
UML CASE tools permit the arrangement of Use Cases and their
corresponding partial Class Diagram into the same package, i.e. no option
is provided to obtain the global Class Diagram from the partial ones.
The Rational Rose Model Integration tool provides an ad-hoc solution to
merge UML models.
Once the merged model is generated, there is no way to relate the
obtained model to the partial source models in order to keep some degree
of traceability.
LITERATURE-REVIEW(2/2)
13
 Title: “Heuristic and pattern based Merge Sort”[2]
Author: Manouchehr Zadahmaf jafarlou, Parisa Yousefzadeh fard
 Objective: The aim of this study is to present a stable and
adaptable Merge Sort algorithm that uses the design
patterns to reduce computational complexity of swaps and
memory usage.
 Keywords: Merge sort, Design patterns, computational complexity.
LITERATURE-REVIEW(2/2 Cont..)
14
 Introduction:
 Although many consider that sorting algorithm is a solved
problem, useful new sorting algorithms are still being
invented (for example, library sort was first published in
2004).
 Sorting algorithms are prevalent in introductory computer
science classes, where the abundance of algorithms for the
problem provides a gentle introduction to a variety of core
algorithm concepts, such as big O notation, divide and
conquer algorithms, data structures, best, worst and average
case analysis, etc.
15
 Sorting algorithms used in computer science are often
classified as:
 Computational complexity.
 Memory usage.
 Recursion.
 Stability: stable sorting algorithms maintain the relative order of
records with equal values.
 Whether or not they are a comparison sort. A comparison sort
examines the data only by comparing two elements with a
comparison operator.
 General method: insertion, exchange, selection, merging, etc.
 Adaptability: Whether or not the pre sorted-ness of the input
affects the running time.
CLASSIFICATION
LITERATURE-REVIEW(2/2 Cont..)
16
 Heuristic and pattern based Merge Sort implementation:
Fig. 4. Heuristic and pattern based Merge Sort implementation[2]
LITERATURE-REVIEW(2/2 Cont..)
17
 First algorithm:
 First element of status is the index of first element of next partial
array and the second one represent "the number of elements of
partial array“ (+1) for ascending partial array or (-1) for
descending partial array.
 Used when the numbers of arrays are so many that cannot move
to volatile memory.
 Ex.: Given array -4, -3, 0, 1, 3, 8, 9, 14, 5, 6, 8, 14, 2, 1, -3, 1 ..
 if the (-4, -3, 0, 1, 3, 8, 9, 14) be the part of array that sorted
before with stMS, (5, 6, 8, 14) will be the next partial ordered
array and so the status array is (8, +4).
LITERATURE-REVIEW(2/2 Cont..)
18
 Second algorithm:
 “The first index of first entry of partial arrays" (+1) for
ascending arrays and "the first index of first entry of partial
arrays" (-1) for descending arrays.
 Causes a high performance by eliminating of first steps of merge
sort algorithm.
 For example for array -8, -4, 0, 4, 3, 1, 0, -2, 5, 7, 9, 10, 5, 4, 2,
1, 3
 For status: +1, -4, +8, -12, +15; Partial arrays are indexed as 0->3
(ascending), 4->7 (descending), 8->11 (ascending), 12->14
(descending), 15->15 (ascending). Then status send as argument
to stgMS and partial arrays will be the building blocks for stgM
algorithm.
LITERATURE-REVIEW(2/2 Cont..)
19
 Third algorithm:
 “The number of partial arrays " (+1) for ascending arrays
and "the number of partial arrays" (-1) for descending
arrays.
 Here, stgMS is a Huffman coding algorithm used to Optimize the
merging process by choosing two partial arrays, that sum of
elements of them is less than others before each merging.
 Then these two partial arrays send as argument to stgM
algorithm and merged.
PROBLEM STATEMENT
20
 When the Use Case Model has many use cases,
managing traceability between each use case and the
corresponding elements in the resulting class diagram
can be a difficult task.
 Regarding traceability, this strategy is a sensible
solution, but when several team members work in
parallel with different use cases, inconsistencies or
conflicts among partial models often arise, which must
be solved when obtaining the integrated model.
CONCLUSION
21
 Merge sort is an appropriate algorithm with O(nlgn)
Computational complexity, but petitioning of array to one
element partial arrays and then merging them cause
increasing complexity in time order, system software and
hardware work.
 The presented algorithm eliminates these extra work using
patterns.
REFERENCES
22
1. Artur Boronat, Jose A. C., Isidro Ramos, Patrico Letelier,” Formal Model Merging
Applied to Class Diagram Integration”, © 2006-Elsevier.
2. Manouchehr Zadahmaf jafarlou, Parisa Yousefzadeh fard,” Heuristic and pattern
based Merge Sort”, © 2010-Elsevier.
3. https://www.khanacademy.org/computing/computer-science/algorithms/merge-
sort/a/divide-and-conquer-algorithms [09/12/2015, 22:33]
4. http://computationaltales.blogspot.in/2011/10/merge-sort-and-lines-of-
kindergarteners.html [09/12/2015, 22:13]
5. http://coding-geek.com/how-databases-work/ [09/12/2015, 22:28]

More Related Content

What's hot (20)

Presentation-Merge Sort
Presentation-Merge SortPresentation-Merge Sort
Presentation-Merge Sort
 
Heap sort
Heap sortHeap sort
Heap sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Queue in Data Structure
Queue in Data Structure Queue in Data Structure
Queue in Data Structure
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplication
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
Divide and conquer - Quick sort
Divide and conquer - Quick sortDivide and conquer - Quick sort
Divide and conquer - Quick sort
 
Sorting
SortingSorting
Sorting
 
Merge sort
Merge sortMerge sort
Merge sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation
 
Mergesort
MergesortMergesort
Mergesort
 
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
 
Linked list
Linked listLinked list
Linked list
 
Binary search
Binary searchBinary search
Binary search
 
Bubble sort | Data structure |
Bubble sort | Data structure |Bubble sort | Data structure |
Bubble sort | Data structure |
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
 
Optimal binary search tree dynamic programming
Optimal binary search tree   dynamic programmingOptimal binary search tree   dynamic programming
Optimal binary search tree dynamic programming
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 

Viewers also liked

Merge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk throughMerge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk throughYoshi Watanabe
 
Algorithms lecture 3
Algorithms lecture 3Algorithms lecture 3
Algorithms lecture 3Mimi Haque
 
A Cost-Effective and Scalable Merge Sort Tree on FPGAs
A Cost-Effective and Scalable Merge Sort Tree on FPGAsA Cost-Effective and Scalable Merge Sort Tree on FPGAs
A Cost-Effective and Scalable Merge Sort Tree on FPGAsTakuma Usui
 
Lecture 3 insertion sort and complexity analysis
Lecture 3   insertion sort and complexity analysisLecture 3   insertion sort and complexity analysis
Lecture 3 insertion sort and complexity analysisjayavignesh86
 
Java presentation on insertion sort
Java presentation on insertion sortJava presentation on insertion sort
Java presentation on insertion sort_fahad_shaikh
 
Intro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortIntro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortNicholas Case
 
Insertion Sort Demo
Insertion Sort DemoInsertion Sort Demo
Insertion Sort Demorentjen
 
Intersection Study - Algorithm(Sort)
Intersection Study - Algorithm(Sort)Intersection Study - Algorithm(Sort)
Intersection Study - Algorithm(Sort)Jea Hyeun Jung
 
Data Structure Insertion sort
Data Structure Insertion sort Data Structure Insertion sort
Data Structure Insertion sort Mahesh Dheravath
 
Merge sort
Merge sortMerge sort
Merge sortKumar
 
Insertion sort
Insertion sortInsertion sort
Insertion sortaditya raj
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort AlgorithmGail Carmichael
 

Viewers also liked (19)

Merge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk throughMerge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk through
 
Merge sort
Merge sortMerge sort
Merge sort
 
05 dc1
05 dc105 dc1
05 dc1
 
Algorithms lecture 3
Algorithms lecture 3Algorithms lecture 3
Algorithms lecture 3
 
A Cost-Effective and Scalable Merge Sort Tree on FPGAs
A Cost-Effective and Scalable Merge Sort Tree on FPGAsA Cost-Effective and Scalable Merge Sort Tree on FPGAs
A Cost-Effective and Scalable Merge Sort Tree on FPGAs
 
Lecture 3 insertion sort and complexity analysis
Lecture 3   insertion sort and complexity analysisLecture 3   insertion sort and complexity analysis
Lecture 3 insertion sort and complexity analysis
 
Java presentation on insertion sort
Java presentation on insertion sortJava presentation on insertion sort
Java presentation on insertion sort
 
Insertion sort
Insertion sort Insertion sort
Insertion sort
 
Intro to Sorting + Insertion Sort
Intro to Sorting + Insertion SortIntro to Sorting + Insertion Sort
Intro to Sorting + Insertion Sort
 
Insertion Sort Demo
Insertion Sort DemoInsertion Sort Demo
Insertion Sort Demo
 
Insertion Sort
Insertion SortInsertion Sort
Insertion Sort
 
Intersection Study - Algorithm(Sort)
Intersection Study - Algorithm(Sort)Intersection Study - Algorithm(Sort)
Intersection Study - Algorithm(Sort)
 
Data Structure Insertion sort
Data Structure Insertion sort Data Structure Insertion sort
Data Structure Insertion sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
 
MSc_thesis
MSc_thesisMSc_thesis
MSc_thesis
 
Merge sort
Merge sortMerge sort
Merge sort
 
Insertion and merge sort
Insertion and merge sortInsertion and merge sort
Insertion and merge sort
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort Algorithm
 

Similar to Implementing Merge Sort

Parallel Machine Learning
Parallel Machine LearningParallel Machine Learning
Parallel Machine LearningJanani C
 
Modularizing Arcihtectures Using Dendrograms1
Modularizing Arcihtectures Using Dendrograms1Modularizing Arcihtectures Using Dendrograms1
Modularizing Arcihtectures Using Dendrograms1victor tang
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)stanbridge
 
Data clustering using map reduce
Data clustering using map reduceData clustering using map reduce
Data clustering using map reduceVarad Meru
 
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...IJCI JOURNAL
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...KIIT
 
Data Analysis – Technical learnings
Data Analysis – Technical learningsData Analysis – Technical learnings
Data Analysis – Technical learningsInvenkLearn
 
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...Alicia Edwards
 
mapReduce for machine learning
mapReduce for machine learning mapReduce for machine learning
mapReduce for machine learning Pranya Prabhakar
 
UML2SAN: Toward A New Software Performance Engineering Approach
UML2SAN: Toward A New Software Performance Engineering ApproachUML2SAN: Toward A New Software Performance Engineering Approach
UML2SAN: Toward A New Software Performance Engineering Approachijseajournal
 
A comparative study of three validities computation methods for multimodel ap...
A comparative study of three validities computation methods for multimodel ap...A comparative study of three validities computation methods for multimodel ap...
A comparative study of three validities computation methods for multimodel ap...IJECEIAES
 
Adapted Branch-and-Bound Algorithm Using SVM With Model Selection
Adapted Branch-and-Bound Algorithm Using SVM With Model SelectionAdapted Branch-and-Bound Algorithm Using SVM With Model Selection
Adapted Branch-and-Bound Algorithm Using SVM With Model SelectionIJECEIAES
 
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYSCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYijcseit
 
Intruction to Algorithms.pptx
Intruction to Algorithms.pptxIntruction to Algorithms.pptx
Intruction to Algorithms.pptxSayantamalHalder
 
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYSCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYijcseit
 
Scimakelatex.93126.cocoon.bobbin
Scimakelatex.93126.cocoon.bobbinScimakelatex.93126.cocoon.bobbin
Scimakelatex.93126.cocoon.bobbinAgostino_Marchetti
 
Efficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent EnvironmentEfficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent EnvironmentEditor IJCATR
 
A Framework For Unifying Problem-Solving Knowledge And Workflow Modelling
A Framework For Unifying Problem-Solving Knowledge And Workflow ModellingA Framework For Unifying Problem-Solving Knowledge And Workflow Modelling
A Framework For Unifying Problem-Solving Knowledge And Workflow ModellingAndrew Parish
 

Similar to Implementing Merge Sort (20)

Parallel Machine Learning
Parallel Machine LearningParallel Machine Learning
Parallel Machine Learning
 
Modularizing Arcihtectures Using Dendrograms1
Modularizing Arcihtectures Using Dendrograms1Modularizing Arcihtectures Using Dendrograms1
Modularizing Arcihtectures Using Dendrograms1
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)
 
Data clustering using map reduce
Data clustering using map reduceData clustering using map reduce
Data clustering using map reduce
 
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
BARRACUDA, AN OPEN SOURCE FRAMEWORK FOR PARALLELIZING DIVIDE AND CONQUER ALGO...
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
 
Data Analysis – Technical learnings
Data Analysis – Technical learningsData Analysis – Technical learnings
Data Analysis – Technical learnings
 
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...
Analytic Hierarchy Process And Multilayer Network-Based Method For Assembly L...
 
mapReduce for machine learning
mapReduce for machine learning mapReduce for machine learning
mapReduce for machine learning
 
UML2SAN: Toward A New Software Performance Engineering Approach
UML2SAN: Toward A New Software Performance Engineering ApproachUML2SAN: Toward A New Software Performance Engineering Approach
UML2SAN: Toward A New Software Performance Engineering Approach
 
A comparative study of three validities computation methods for multimodel ap...
A comparative study of three validities computation methods for multimodel ap...A comparative study of three validities computation methods for multimodel ap...
A comparative study of three validities computation methods for multimodel ap...
 
Adapted Branch-and-Bound Algorithm Using SVM With Model Selection
Adapted Branch-and-Bound Algorithm Using SVM With Model SelectionAdapted Branch-and-Bound Algorithm Using SVM With Model Selection
Adapted Branch-and-Bound Algorithm Using SVM With Model Selection
 
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYSCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
 
Intruction to Algorithms.pptx
Intruction to Algorithms.pptxIntruction to Algorithms.pptx
Intruction to Algorithms.pptx
 
Chapitre 08
Chapitre 08Chapitre 08
Chapitre 08
 
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERYSCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
SCIENTIFIC WORKFLOW CLUSTERING BASED ON MOTIF DISCOVERY
 
Scimakelatex.93126.cocoon.bobbin
Scimakelatex.93126.cocoon.bobbinScimakelatex.93126.cocoon.bobbin
Scimakelatex.93126.cocoon.bobbin
 
Efficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent EnvironmentEfficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent Environment
 
A Framework For Unifying Problem-Solving Knowledge And Workflow Modelling
A Framework For Unifying Problem-Solving Knowledge And Workflow ModellingA Framework For Unifying Problem-Solving Knowledge And Workflow Modelling
A Framework For Unifying Problem-Solving Knowledge And Workflow Modelling
 

More from smita gupta

Mimicking Human Brain Process
Mimicking Human Brain ProcessMimicking Human Brain Process
Mimicking Human Brain Processsmita gupta
 
Experimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing ProtocolExperimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing Protocolsmita gupta
 
Enlightening Society On The Alert
Enlightening Society On The AlertEnlightening Society On The Alert
Enlightening Society On The Alertsmita gupta
 
Distributed System Security Aspects
Distributed System Security AspectsDistributed System Security Aspects
Distributed System Security Aspectssmita gupta
 

More from smita gupta (6)

Web Testing
Web TestingWeb Testing
Web Testing
 
Mimicking Human Brain Process
Mimicking Human Brain ProcessMimicking Human Brain Process
Mimicking Human Brain Process
 
GSM Security
GSM SecurityGSM Security
GSM Security
 
Experimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing ProtocolExperimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing Protocol
 
Enlightening Society On The Alert
Enlightening Society On The AlertEnlightening Society On The Alert
Enlightening Society On The Alert
 
Distributed System Security Aspects
Distributed System Security AspectsDistributed System Security Aspects
Distributed System Security Aspects
 

Recently uploaded

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 

Recently uploaded (20)

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 

Implementing Merge Sort

  • 2. OUTLINE  INTRODUCTION  Divide & Conquer approach  Illustration  LITERATURE REVIEW  PROBLEM STATEMENT  CONCLUSION  REFERENCES 2
  • 3. INTRODUCTION 3  Merge Sort:  "Break the data to sort in half, sort each half separately using merge sort, and merge the halves back together into a single sorted list."  It employs a common algorithmic paradigm based on recursion, i.e. divide-and-conquer paradigm.  Divide-and-conquer algorithm works in three steps:  Divide  Conquer  Combine
  • 4. DIVIDE & CONQUER APPROACH 4 Fig. 1: Divide & Conquer view of one step[3] Here's how to view one step, assuming that each divide step creates two subproblems:
  • 5. ILLUSTRATION 5 Here is a diagrammatic example for how merge sort works: Fig. 2: Merge Sort Working[5]
  • 7. LITERATURE-REVIEW(1/2) 7  Title: ” Formal Model Merging Applied to Class Diagram Integration”[1] Authors: Artur Boronat, Jose A. C., Isidro Ramos, Patrico Letelier  Objective: The definition of Merge operator is applied on class diagrams integration to present an automated approach for generic model merging providing support for conflict resolution and traceability between software artifacts. Keywords: Model-Driven Engineering, Model Management, model merging, conflict resolution.
  • 8. LITERATURE-REVIEW(1/2 Cont..) 8  Introduction:  Models are the main assets in the software development process.  Models collect the information that describes the information system at a high abstraction level, which permits the development of the application in an automated way.  In this process, models constitute software artifacts that experience refinements from the problem space to the solution space.
  • 9. CASE STUDY 9  Use Case Analysis using Partial Class Diagrams:  Case Study - To illustrate how Merge operator can be used effectively to deal with the required needs like inconsistencies or conflicts among partial models which often arises, etc.  Here, part of a system for managing submissions that are received in a conference is presented.  In this example, the focus is on the fragment of the Use-Case Model (Fig. 3).
  • 10. USE CASE MODEL 10 Software development methodologies based on UML propose an approach where the process is Use Case Driven, which means that all artifacts have traceability links from Use Cases (The artifacts are refined through several transformation steps). The Use Case Model must sacrifice precision to facilitate readability and validation. So, the analysis of use cases is mainly a manual activity. Fig. 3: Use Case Model[1]
  • 11. GENERIC SEMANTICS 11  Merge Operator:  The Merge operator takes two models as input and produces a third one.  If A and B are models in a specific meta-model algebraic specification, the application of the Merge operator on them produces a model C, which consists the union of A and B.  Taking into account that duplicates are not allowed in a model, the union is disjoint.
  • 12. LITERATURE-REVIEW(1/2 Cont..) 12  Semantics of the Merge operator needs to introduce three concepts:  The equivalence relation;  The conflict resolution strategy;  The refreshment of a construct. UML CASE tools permit the arrangement of Use Cases and their corresponding partial Class Diagram into the same package, i.e. no option is provided to obtain the global Class Diagram from the partial ones. The Rational Rose Model Integration tool provides an ad-hoc solution to merge UML models. Once the merged model is generated, there is no way to relate the obtained model to the partial source models in order to keep some degree of traceability.
  • 13. LITERATURE-REVIEW(2/2) 13  Title: “Heuristic and pattern based Merge Sort”[2] Author: Manouchehr Zadahmaf jafarlou, Parisa Yousefzadeh fard  Objective: The aim of this study is to present a stable and adaptable Merge Sort algorithm that uses the design patterns to reduce computational complexity of swaps and memory usage.  Keywords: Merge sort, Design patterns, computational complexity.
  • 14. LITERATURE-REVIEW(2/2 Cont..) 14  Introduction:  Although many consider that sorting algorithm is a solved problem, useful new sorting algorithms are still being invented (for example, library sort was first published in 2004).  Sorting algorithms are prevalent in introductory computer science classes, where the abundance of algorithms for the problem provides a gentle introduction to a variety of core algorithm concepts, such as big O notation, divide and conquer algorithms, data structures, best, worst and average case analysis, etc.
  • 15. 15  Sorting algorithms used in computer science are often classified as:  Computational complexity.  Memory usage.  Recursion.  Stability: stable sorting algorithms maintain the relative order of records with equal values.  Whether or not they are a comparison sort. A comparison sort examines the data only by comparing two elements with a comparison operator.  General method: insertion, exchange, selection, merging, etc.  Adaptability: Whether or not the pre sorted-ness of the input affects the running time. CLASSIFICATION
  • 16. LITERATURE-REVIEW(2/2 Cont..) 16  Heuristic and pattern based Merge Sort implementation: Fig. 4. Heuristic and pattern based Merge Sort implementation[2]
  • 17. LITERATURE-REVIEW(2/2 Cont..) 17  First algorithm:  First element of status is the index of first element of next partial array and the second one represent "the number of elements of partial array“ (+1) for ascending partial array or (-1) for descending partial array.  Used when the numbers of arrays are so many that cannot move to volatile memory.  Ex.: Given array -4, -3, 0, 1, 3, 8, 9, 14, 5, 6, 8, 14, 2, 1, -3, 1 ..  if the (-4, -3, 0, 1, 3, 8, 9, 14) be the part of array that sorted before with stMS, (5, 6, 8, 14) will be the next partial ordered array and so the status array is (8, +4).
  • 18. LITERATURE-REVIEW(2/2 Cont..) 18  Second algorithm:  “The first index of first entry of partial arrays" (+1) for ascending arrays and "the first index of first entry of partial arrays" (-1) for descending arrays.  Causes a high performance by eliminating of first steps of merge sort algorithm.  For example for array -8, -4, 0, 4, 3, 1, 0, -2, 5, 7, 9, 10, 5, 4, 2, 1, 3  For status: +1, -4, +8, -12, +15; Partial arrays are indexed as 0->3 (ascending), 4->7 (descending), 8->11 (ascending), 12->14 (descending), 15->15 (ascending). Then status send as argument to stgMS and partial arrays will be the building blocks for stgM algorithm.
  • 19. LITERATURE-REVIEW(2/2 Cont..) 19  Third algorithm:  “The number of partial arrays " (+1) for ascending arrays and "the number of partial arrays" (-1) for descending arrays.  Here, stgMS is a Huffman coding algorithm used to Optimize the merging process by choosing two partial arrays, that sum of elements of them is less than others before each merging.  Then these two partial arrays send as argument to stgM algorithm and merged.
  • 20. PROBLEM STATEMENT 20  When the Use Case Model has many use cases, managing traceability between each use case and the corresponding elements in the resulting class diagram can be a difficult task.  Regarding traceability, this strategy is a sensible solution, but when several team members work in parallel with different use cases, inconsistencies or conflicts among partial models often arise, which must be solved when obtaining the integrated model.
  • 21. CONCLUSION 21  Merge sort is an appropriate algorithm with O(nlgn) Computational complexity, but petitioning of array to one element partial arrays and then merging them cause increasing complexity in time order, system software and hardware work.  The presented algorithm eliminates these extra work using patterns.
  • 22. REFERENCES 22 1. Artur Boronat, Jose A. C., Isidro Ramos, Patrico Letelier,” Formal Model Merging Applied to Class Diagram Integration”, © 2006-Elsevier. 2. Manouchehr Zadahmaf jafarlou, Parisa Yousefzadeh fard,” Heuristic and pattern based Merge Sort”, © 2010-Elsevier. 3. https://www.khanacademy.org/computing/computer-science/algorithms/merge- sort/a/divide-and-conquer-algorithms [09/12/2015, 22:33] 4. http://computationaltales.blogspot.in/2011/10/merge-sort-and-lines-of- kindergarteners.html [09/12/2015, 22:13] 5. http://coding-geek.com/how-databases-work/ [09/12/2015, 22:28]