Mesh connected networks. Sorting algorithms Efficient Parallel Algorithms COMP308.

Slides:



Advertisements
Similar presentations
Lecture 19: Parallel Algorithms
Advertisements

Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Optimal PRAM algorithms: Efficiency of concurrent writing “Computer science is no more about computers than astronomy is about telescopes.” Edsger Dijkstra.
Parallel Sorting Sathish Vadhiyar. Sorting  Sorting n keys over p processors  Sort and move the keys to the appropriate processor so that every key.
Batcher’s merging network Efficient Parallel Algorithms COMP308.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
CIS December '99 Introduction to Parallel Architectures Dr. Laurence Boxer Niagara University.
Efficient Parallel Algorithms COMP308
CSC 2300 Data Structures & Algorithms March 16, 2007 Chapter 7. Sorting.
Section 1.7: Coloring Graphs
Numerical Algorithms Matrix multiplication
Advanced Topics in Algorithms and Data Structures Lecture pg 1 Recursion.
Parallel Sorting Algorithms Comparison Sorts if (A>B) { temp=A; A=B; B=temp; } Potential Speed-up –Optimal Comparison Sort: O(N lg N) –Optimal Parallel.
Greedy vs Dynamic Programming Approach
Introduction Sorting permutations with reversals in order to reconstruct evolutionary history of genome Reversal mutations occur often in chromosomes where.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Advanced Topics in Algorithms and Data Structures An overview of the lecture 2 Models of parallel computation Characteristics of SIMD models Design issue.
1 Tuesday, November 14, 2006 “UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever.
Overview Efficient Parallel Algorithms COMP308. COMP 308 Exam Time allowed : 2.5 hours Answer four questions (out of six). If you attempt to answer more.
Chapter 10 in textbook. Sorting Algorithms
1 Lecture 8 Architecture Independent (MPI) Algorithm Design Parallel Computing Fall 2007.
1 Lecture 25: Parallel Algorithms II Topics: matrix, graph, and sort algorithms Tuesday presentations:  Each group: 10 minutes  Describe the problem,
Lecture 21: Parallel Algorithms
Parallel Routing Bruce, Chiu-Wing Sham. Overview Background Routing in parallel computers Routing in hypercube network –Bit-fixing routing algorithm –Randomized.
CSCI 4440 / 8446 Parallel Computing Three Sorting Algorithms.
1 Parallel Algorithms III Topics: graph and sort algorithms.
Models of Parallel Computation Advanced Algorithms & Data Structures Lecture Theme 12 Prof. Dr. Th. Ottmann Summer Semester 2006.
Sorting Algorithms Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text ``Introduction to Parallel Computing'', Addison Wesley,
Sorting networks Efficient Parallel Algorithms COMP308.
1 Lecture 24: Parallel Algorithms I Topics: sort and matrix algorithms.
Topic Overview One-to-All Broadcast and All-to-One Reduction
CHE/ME 109 Heat Transfer in Electronics LECTURE 8 – SPECIFIC CONDUCTION MODELS.
Bitonic and Merging sorting networks Efficient Parallel Algorithms COMP308.
CSCI-455/552 Introduction to High Performance Computing Lecture 22.
Maximal Independent Set Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Copyright 2008 Koren ECE666/Koren Part.6a.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
1 Sorting Algorithms - Rearranging a list of numbers into increasing (strictly non-decreasing) order. ITCS4145/5145, Parallel Programming B. Wilkinson.
Parallel Programming in C with MPI and OpenMP
Lecture 12: Parallel Sorting Shantanu Dutt ECE Dept. UIC.
COMP308 Efficient Parallel Algorithms
1 Parallel Sorting Algorithms. 2 Potential Speedup O(nlogn) optimal sequential sorting algorithm Best we can expect based upon a sequential sorting algorithm.
CALTECH CS137 Winter DeHon 1 CS137: Electronic Design Automation Day 12: February 6, 2006 Sorting.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Lecture 6 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
An Optimal Cache-Oblivious Priority Queue and Its Applications in Graph Algorithms By Arge, Bender, Demaine, Holland-Minkley, Munro Presented by Adam Sheffer.
1. 2 Sorting Algorithms - rearranging a list of numbers into increasing (strictly nondecreasing) order.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
1 Parallel Sorting Algorithm. 2 Bitonic Sequence A bitonic sequence is defined as a list with no more than one LOCAL MAXIMUM and no more than one LOCAL.
+ Even Odd Sort & Even-Odd Merge Sort Wolfie Herwald Pengfei Wang Rachel Celestine.
Basic Communication Operations Carl Tropper Department of Computer Science.
Unit-8 Sorting Algorithms Prepared By:-H.M.PATEL.
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
Sorting: Parallel Compare Exchange Operation A parallel compare-exchange operation. Processes P i and P j send their elements to each other. Process P.
Decision Trees DEFINITION: DECISION TREE A decision tree is a tree in which the internal nodes represent actions, the arcs represent outcomes of an action,
Mesh connected networks. Sorting algorithms
The minimum cost flow problem
Parallel Sorting Algorithms
Lecture 22: Parallel Algorithms
Lectures on Graph Algorithms: searching, testing and sorting
High Performance Computing & Bioinformatics Part 2 Dr. Imad Mahgoub
Parallel Sorting Algorithms
Bitonic and Merging sorting networks
Lecture 6 Algorithm Analysis
Calendar like the Periodic Table
Parallel Sorting Algorithms
Lecture 6 Algorithm Analysis
Sorting Algorithms - Rearranging a list of numbers into increasing (strictly non-decreasing) order. Sorting number is important in applications as it can.
Parallel Sorting Algorithms
Presentation transcript:

Mesh connected networks. Sorting algorithms Efficient Parallel Algorithms COMP308

Any nontrivial problem has no NC-algorithm on the mesh, since the diameter is too large. The problem of size n = k*k can be solved in time at least 2k-1, since this is the number of steps for communication between opposite corners For example we cannot compute on a mesh minimum of n numbers in polylogarithmic time since the communication between opposite corners of the mesh takes more time than that

Sorting on the 1-dimensional mesh Algorithms on meshes can be considered as "systolic" algorithms, systolic means very regular and well synchronized Sorting on the 1-dimensional mesh k phases, –in the first phase compare-exchange (1,2) (3,4), (5,6),... –In the second phase compare-exchange (2,3) (4,5) (6,7)... etc.

Sorting on 2-dim mesh The first attempt to sort 2-dim mesh is to sort all rows simultaneously then sort all columns simultaneously However the whole table is not sorted in the sense that elements of lower rows are all larger than elements of upper rows.

Shearsort Algorithm

Correctness of Shearsort Applying 0-1 principle, consider only 0-1 sequences Define the row to be dirty iff it contains at least one 0 and at least on 1, other rows are called clean

Main property

Correctness of Shearsort Consider two adjacent dirty rows, assume w.l.o.g that the first is an odd row the second an even row after sorting these 2 rows according to their order we have the following 3 possibilities Start sorting columns by first comparing-exchanging between of dirty rows decreases by half (one row per each pair) these 2 rows, then one of them becomes clean, so the number. Then these two rows will become (3 cases)

independently how we sort columns later the number of dirty rows does not increase, the final result of sorting columns does not depend of the way of sorting them, the result always the same so we could started with making exchanges between these 2 rows.