•Download as PPTX, PDF•

14 likes•6,048 views

divide and conquer , Example , benefits, Quick sort algorithm, complexity of quick sort, merits of quick sort

Report

Share

Report

Share

Backtracking & branch and bound

Backtracking & branch and bound

Data Structures- Part5 recursion

Data Structures- Part5 recursion

Tree and graph

Tree and graph

Stressen's matrix multiplication

Stressen's matrix multiplication

Algorithm: Quick-Sort

Algorithm: Quick-Sort

Dinive conquer algorithm

Dinive conquer algorithm

Regular Languages

Regular Languages

Heaps & priority queues

Heaps & priority queues

trees in data structure

trees in data structure

Branch and bound

Branch and bound

Priority Queue in Data Structure

Priority Queue in Data Structure

10.m way search tree

10.m way search tree

Quick sort

Quick sort

Elements of dynamic programming

Elements of dynamic programming

Lecture optimal binary search tree

Lecture optimal binary search tree

Merge Sort

Merge Sort

N queen problem

N queen problem

Top down parsing

Top down parsing

Greedy Algorithms

Greedy Algorithms

Regular expressions

Regular expressions

Insertion Sort Algorithm

Insertion Sort Algorithm

Safe laparoscopy

Safe laparoscopy

Quicksort: illustrated step-by-step walk through

Quicksort: illustrated step-by-step walk through

3.8 quicksort

3.8 quicksort

Insertion and merge sort

Insertion and merge sort

Insertion sort

Insertion sort

Quick sort Algorithm Discussion And Analysis

Quick sort Algorithm Discussion And Analysis

module2_dIVIDEncONQUER_2022.pdf

module2_dIVIDEncONQUER_2022.pdf

Merge sort

Merge sort

5.5 back tracking 02

5.5 back tracking 02

Divide and Conquer - Part II - Quickselect and Closest Pair of Points

Divide and Conquer - Part II - Quickselect and Closest Pair of Points

presentation_mergesortquicksort_1458716068_193111.ppt

presentation_mergesortquicksort_1458716068_193111.ppt

MergesortQuickSort.ppt

MergesortQuickSort.ppt

Unit 7 sorting

Unit 7 sorting

Lecture -16-merge sort (slides).pptx

Lecture -16-merge sort (slides).pptx

Cis435 week02

Cis435 week02

quick sort by deepak.pptx

quick sort by deepak.pptx

Lecture 3 data structures & algorithms - sorting techniques - http://techiem...

Lecture 3 data structures & algorithms - sorting techniques - http://techiem...

Divide and conquer

Divide and conquer

Quick Sort

Quick Sort

Daa chapter 2

Daa chapter 2

algorithm Unit 2

algorithm Unit 2

Unit 2 in daa

Unit 2 in daa

Data analysis and algorithms - UNIT 2.pptx

Data analysis and algorithms - UNIT 2.pptx

DAA-Divide and Conquer methodology, DAA 2024

DAA-Divide and Conquer methodology, DAA 2024

ECE 565 FInal Project

ECE 565 FInal Project

Data structure 8.pptx

Data structure 8.pptx

Internet of Things (IoT)

Internet of Things (IoT)

Digital logic

Digital logic

Operating system

Operating system

Greedy Algorithm - Knapsack Problem

Greedy Algorithm - Knapsack Problem

GRAPH APPLICATION - MINIMUM SPANNING TREE (MST)

GRAPH APPLICATION - MINIMUM SPANNING TREE (MST)

GPRS Technology

GPRS Technology

Algorithm - Introduction

Algorithm - Introduction

4G technology

4G technology

Data structure - Graph

Data structure - Graph

Smoothing Filters in Spatial Domain

Smoothing Filters in Spatial Domain

Our CPM guide includes everything you need to get started in the Critical Path Method - with step-by-step examples, solutions, as well as schedules to help get your next project done faster and easier. The Critical Path Method (CPM) is a simple but powerful technique for analyzing, planning, and scheduling large, complex projects. It is used to determine a project’s critical path—the longest sequence of tasks that must be finished for the entire project to be complete.
CPM, also known as Critical Path Analysis (CPA), identifies dependencies between tasks, and shows which tasks are critical to a project. The Critical Path Method (CPM) is one of the most important concepts in project management, and certainly among the most enduring. But what is the Critical Path Method, exactly? This beginner-friendly guide will help you understand the Critical Path Method and apply it in your projects.
Early iterations of the Critical Path Method can be traced all the way back to the Manhattan Project in the early 1940s. Given the ambition, scale, and importance of this world-altering project, scientists - and the managers behind them - developed a number of techniques to make sure that the project delivered results on time. For a project management technique, the Critical Path Method has quite an illustrious history. One of these techniques was to map out the most important tasks in any project and use that to estimate the project completion date.
The Critical Path Method in project management is a cornerstone of project planning even to this day. How long a project takes often depends on the most important tasks that constitute it.Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...

Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Lovely Professional University

"United Nations Park" Site Visit Report.

"United Nations Park" Site Visit Report.

EMPLOYEE MANAGEMENT SYSTEM FINAL presentation

EMPLOYEE MANAGEMENT SYSTEM FINAL presentation

Introduction to Artificial Intelligence and History of AI

Introduction to Artificial Intelligence and History of AI

NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024

NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024

ChatGPT Prompt Engineering for project managers.pdf

ChatGPT Prompt Engineering for project managers.pdf

Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...

Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...

Research Methodolgy & Intellectual Property Rights Series 1

Research Methodolgy & Intellectual Property Rights Series 1

15-Minute City: A Completely New Horizon

15-Minute City: A Completely New Horizon

How to Design and spec harmonic filter.pdf

How to Design and spec harmonic filter.pdf

ALCOHOL PRODUCTION- Beer Brewing Process.pdf

ALCOHOL PRODUCTION- Beer Brewing Process.pdf

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...

Research Methodolgy & Intellectual Property Rights Series 2

Research Methodolgy & Intellectual Property Rights Series 2

Online crime reporting system project.pdf

Online crime reporting system project.pdf

Online book store management system project.pdf

Online book store management system project.pdf

Theory for How to calculation capacitor bank

Theory for How to calculation capacitor bank

Circuit Breaker arc phenomenon.pdf engineering

Circuit Breaker arc phenomenon.pdf engineering

Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...

Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...

Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf

Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf

Electrostatic field in a coaxial transmission line

Electrostatic field in a coaxial transmission line

5G and 6G refer to generations of mobile network technology, each representin...

5G and 6G refer to generations of mobile network technology, each representin...

- 1. QUICK SORT DIVIDE AND CONQUER 1
- 2. DIVIDE AND CONQUER An algorithm is only called divide and conquer if it contains two or more recursive calls The divide and conquer strategy used to make a more efficient search algorithm can also be applied to sorting 2
- 3. DIVIDE AND CONQUER (CONT.) Divide : Divide the problem P into P1 , P2,……Pk sub problems until P is smaller one Conquer : the sub-problems by solving them recursively Combine : the solutions of sub problems to create a solution to the original problem 3
- 4. 4 A problem size n Sub problem 1 of size n/2 Sub problem 2 of size n/2 A solution to sub problem 1 A solution to sub problem 2 A solution to the original problem DIVIDE AND CONQUER (CONT.)
- 5. DIVIDE AND CONQUER - EXAMPLE Sorting: merge sort and quicksort Binary tree traversals Binary search Multiplication of large integers Matrix multiplication: Strassen’s algorithm Closest-pair and convex-hull algorithms 5
- 6. MERITS OF DIVIDE AND CONQUER 6 Time spent on executing the problem using divide and conquer is smaller than others. Provides efficient algorithm. Suited for parallel computation in which each sub problem can be solved simultaneously by its own processor.
- 7. Quick sort The main idea is to partition the array into two regions: small items are moved to the left side of the array large items are moved to the right side After partitioning, repeat the sort on the left and right sides each region is a sub-problem, a smaller version of the original problem 7
- 8. Quick sort 8 Main question: how do we decide which items are “small” and which are “large”? A common technique: use the first item in the region as a pivot everything less than the pivot ends up in the left region items greater than or equal to the pivot go in the right region
- 9. Quick sort 1. Divide: partition A[p..r] into two sub arrays A[p..q-1] and A[q+1..r] such that each element of A[p..q-1] is ≤ A[q], and each element of A[q+1..r] is ≥ A[q]. Compute q as part of this partitioning. 2. Conquer: sort the sub arrays A[p..q-1] and A[q+1..r] by recursive calls to QUICKSORT. 3. Combine: the partitioning and recursive sorting leave us with a sorted A[p..r] 9
- 10. Quick sort algorithm QUICKSORT(A[p,…r]) Input: A[p,….r] Output: the sub array A[1…r] stored in non decreasing order If p<r q= PARTITION(A,p,r) QUICKSORT(A[p,q-1]) QUICKSORT(A[q+1, r]) 10 v v S1 S2 S
- 11. Quick sort algorithm (Cont.) 11 PARTITION(A[p…r]) Initialization P=A[p] i=p j=r+1
- 12. Quick sort algorithm (Cont.) 12 Repeat Repeat i=i+1 until A[i]≥P Repeat j=j-1 until A[j]≤P Swap(A[i],A[j]) Until i ≥ j Swap(A[p],a[j]); Return j
- 13. Quick sort algorithm (Cont.) 13 Void swap( int *a, int *b) { int t; t=*a; *a=*b; *b=t; }
- 14. COMPLEXITY OF QUICK SORT 14 Space complexity Time complexity Choosing pivot element
- 15. 15 Space complexity: Space for quick sort: Each and every recursive call require stack space for an array that is q. Space for partition: Space for an array A=‘n’ locations Space for control variable= 3 location (i,j,pivot) COMPLEXITY OF QUICK SORT (Cont.)
- 16. 16 Time complexity Best case : n log2n Worst case : n2 Average case : 1.38 n log2n COMPLEXITY OF QUICK SORT (Cont.)
- 17. 17 Choosing pivot element Selection of proper pivot, improve the efficiency of an algorithm. Median of three partition method uses pivot as the median of left most, right most, and middle element of the array. COMPLEXITY OF QUICK SORT (Cont.)
- 18. BENEFITS OF QUICK SORT 18 Sorting time is very less when comparing with all other sorts. Idea of partitioning can be useful in many applications.