SlideShare a Scribd company logo
KUVEMPU UNIVERSITY  Department of Computer Science Jnana Sahyadri Shankarghatta Seminar on “ PRAM ALGORITHMS ” Presented by :   Deepika R, 2 nd  sem , M.Sc, Dept. Of Computer Science, Shankarghatta. Under the Guidance of : Suresh M,   Dept. Of Computer Science, Shankarghatta.
Contents: Introduction Computational Model Merging Sorting Computing the Convex Hull Applications Conclusion  Bibliography
Introduction:   There are many application in day to day life that demand real time solution to problem. For example weather forecasting has to done in a timely fashion etc.. If an expert system is used to aid a physician in surgical procedures ,decisions have to be made within seconds. And so on. Programs written for such applications have to perform an enormous amount of computation. Even the fastest single-processor machine may not be able to come up with solutions within tolerable time limits. Parallel Random Access Machines (PRAM) offer the potential of decreasing the solution times enormously .
Example:- Say there are 100 numbers to be added and there are two persons A and B. Person A can add the first 50 numbers. At the same time B can add the next 50 numbers. When they are done, one of them can add two individual sums to get the final answer. So two people can add the 100 numbers in almost half the time required by one.
Computational model:- In the RAM (Random Access Machine) we assume that any of the following operation can be done in one unit of time: addition, subtraction, multiplication, division, comparison, memory access, assignment, and so on. This model widely accepted as a  valid sequential model. An important feature of parallel computing that is absent in sequential computing is need for  interprocessor  communication .  For example given any problem, the processor have to communicate among themselves and agree on the subproblems  each will work on. Also they need to communicate to see whether every one has finished its task so on.
Contd…  Parallel models can be broadly categorized into 2 types: Fixed  connection machines Shared memory machines
Fixed connection machines A fixed connection network is a graph whose nodes represent processor and edges represent communication links between processors. Here communication time depends on the lengths of these path. Ex:-
Shared memory model Here a number of processor work synchronously. They communicate with each other using common block of global memory that is accessible by all. This global memory is called  common  or  shared memory.
Memory Access in PRAM Exclusive Read (ER):  p  processors can simultaneously read the content of  p  distinct memory locations.  Concurrent Read (CR):  p  processors can simultaneously read the content of  p’  memory locations, where  p’ < p . Exclusive Write (EW):  p  processors can simultaneously write the content of  p  distinct memory locations. Concurrent Write (CW):  p  processors can simultaneously write the content of  p’  memory locations, where  p’ < p .
Odd-Even Merge Odd-even merge is a merging algorithm based on divide-and conquer that yield itself to efficient parallelization. Step 1. Partition X 1  and X 2  into their odd and even parts. That is, partition X 1 odd  =k 1 ,k 3 ,…..,k m-1  and X 1 even  =k 2 ,k 4 ,…..,k m . Similarly, partition  X 2  into X 2 odd   and  X 2 even Step 2. Recursively  merge X 1 odd  with X 2 odd  using m processors. Let L 1 =l 1 ,l 2 ,……..l m  be the result. Note that X 1 odd  , X 1 even  , X 2 odd  and X 2 even  using other m processors to get L 2 =l m+1 ,l m+2 ,……..l 2m   Step 3.Shuffle L 1  and L 2  ; that is, form the sequence L=l 1 ,l m+1 ,l 2 ,l m+2 ,……..l m ,l 2m  . Compare every pair and inter change them if they are out of order. That is, compare l m+1  with l 2  and interchange them if need be, compare l m+2  with l 3  and interchange them if need be, so on, Output the resultant sequence.
X1=2,5,8,11,13,16,21,25  X2=4,9,12,18,23,27,31,34 2,8,13,21 5,11,16,25   4,12,23,31  9,18,27,34 L 1 = 2,4,8,12,13,21,23,31   L 2 =5,9,11,16,18,25,27,34 L=2,  5,4  9,8  11,12  16,13  18,21  25,23  27,31  ,34 2,4,5,8,9,11,12,13,16,18,21,23,25,31,34 Compare and exchange Shuffle   Merge   Merge X 1 odd   X 1 even   X 2 odd   X 2 even
Sorting Sorting is the task of arranging an unordered collection (sequence) of elements into monotonically increasing (or decreasing) order. Odd-Even Merge Sort Odd even merge sort employs the classical divide and conquer strategy. If X=k 1 ,k 2 ,…..,k n   is the given sequence of n keys, it is partitioned into two subsequences X 1 1  =k 1 ,k 2 ,…..,k n/2   and X 2 1  =k n/2+1 ,k n/2+2 ,…..,k n  of equal length. X 1 1  and X 2 1  are sorted recursively assigning n/2 processor to each. The two sorted subsequences are then finally merged.
 
Computing the Convex Hull Take the set of points and divide the set into two halves Assume that recursive call computes the convex hull of the two halves Conquer stage: take the two convex hulls and merge it to obtain the convex hull for the entire set
 
Application:- PRAM on chip
Conclusions PRAM algorithm is the source of most fundamental ideas It’s a source of inspiration for algorithms PRAM is simple and easy to understand
Bibliography: Fundamentals of Computer Algorithms Ellis Horowitz   Sartaj Sahai   Sangunathevar Rajasekaran
Any Queries?????
Thank you…

More Related Content

PPTX
Parallel algorithms
PPT
Parallel algorithms
PPTX
Parallel sorting algorithm
PPTX
Parallel algorithm in linear algebra
PDF
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
PDF
Parallel Algorithms
DOCX
Parallel searching
PPTX
Matrix multiplication
Parallel algorithms
Parallel algorithms
Parallel sorting algorithm
Parallel algorithm in linear algebra
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms
Parallel searching
Matrix multiplication

What's hot (20)

PDF
Parallel quicksort cz. 1
PPT
Parallel algorithms
PDF
Chapter 4: Parallel Programming Languages
PDF
Parallel Algorithms
PDF
Elementary Parallel Algorithms
PPT
Parallel algorithms
DOCX
Matrix Multiplication Report
PPTX
Optimal Chain Matrix Multiplication Big Data Perspective
PDF
Parallel Algorithms
PPT
Chap12 slides
PPT
Chap8 slides
PPT
Chap9 slides
PPT
Chap10 slides
PDF
Cost optimal algorithm
PPT
Chap4 slides
PPTX
Multi layered perceptron (mlp)
PDF
Parallel Algorithms
PPT
Chap5 slides
PPT
Introduction to data structures and Algorithm
PPT
Parallel Algorithms- Sorting and Graph
Parallel quicksort cz. 1
Parallel algorithms
Chapter 4: Parallel Programming Languages
Parallel Algorithms
Elementary Parallel Algorithms
Parallel algorithms
Matrix Multiplication Report
Optimal Chain Matrix Multiplication Big Data Perspective
Parallel Algorithms
Chap12 slides
Chap8 slides
Chap9 slides
Chap10 slides
Cost optimal algorithm
Chap4 slides
Multi layered perceptron (mlp)
Parallel Algorithms
Chap5 slides
Introduction to data structures and Algorithm
Parallel Algorithms- Sorting and Graph
Ad

Viewers also liked (13)

PPT
Part III E Commerce Course Power Point
PPT
Part IV E Commerce Course Power Point
PPTX
Basics of ecommerce part1
PDF
E payment_system1_257091537
PPTX
Electronic Payment Method
PPT
E-Payment methods
PPT
Electronic payment system for e-commerce
PPT
Parallel Algorithm Models
PPTX
Electronic Payment Systems (EPS)
PPT
E Payment
PPT
E payment
PPTX
The electronic payment systems
Part III E Commerce Course Power Point
Part IV E Commerce Course Power Point
Basics of ecommerce part1
E payment_system1_257091537
Electronic Payment Method
E-Payment methods
Electronic payment system for e-commerce
Parallel Algorithm Models
Electronic Payment Systems (EPS)
E Payment
E payment
The electronic payment systems
Ad

Similar to PRAM algorithms from deepika (20)

PDF
cis97003
PPTX
HOME ASSIGNMENT (0).pptx
PPTX
HOME ASSIGNMENT omar ali.pptx
PDF
Paper id 24201464
DOCX
Introduction to complexity theory assignment
PDF
Modeling the dynamics of molecular concentration during the diffusion procedure
PDF
Recurrent Instance Segmentation (UPC Reading Group)
PDF
Kernal based speaker specific feature extraction and its applications in iTau...
PDF
Skiena algorithm 2007 lecture18 application of dynamic programming
PDF
Computational Intelligence Assisted Engineering Design Optimization (using MA...
PDF
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
PDF
B02402012022
PPTX
Design and analysis of algorithms-PRAM Alg
PDF
CMSI計算科学技術特論A (2015) 第13回 Parallelization of Molecular Dynamics
PDF
Solution(1)
PDF
The International Journal of Engineering and Science (The IJES)
PPTX
DYNAMIC PROGRAMMING AND GREEDY TECHNIQUE
PPTX
design and analysis of algorithm (Longest common subsequence)
PDF
第13回 配信講義 計算科学技術特論A(2021)
DOCX
Master of Computer Application (MCA) – Semester 4 MC0079
cis97003
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT omar ali.pptx
Paper id 24201464
Introduction to complexity theory assignment
Modeling the dynamics of molecular concentration during the diffusion procedure
Recurrent Instance Segmentation (UPC Reading Group)
Kernal based speaker specific feature extraction and its applications in iTau...
Skiena algorithm 2007 lecture18 application of dynamic programming
Computational Intelligence Assisted Engineering Design Optimization (using MA...
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
B02402012022
Design and analysis of algorithms-PRAM Alg
CMSI計算科学技術特論A (2015) 第13回 Parallelization of Molecular Dynamics
Solution(1)
The International Journal of Engineering and Science (The IJES)
DYNAMIC PROGRAMMING AND GREEDY TECHNIQUE
design and analysis of algorithm (Longest common subsequence)
第13回 配信講義 計算科学技術特論A(2021)
Master of Computer Application (MCA) – Semester 4 MC0079

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
01-Introduction-to-Information-Management.pdf
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Microbial disease of the cardiovascular and lymphatic systems
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
UNIT III MENTAL HEALTH NURSING ASSESSMENT
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
STATICS OF THE RIGID BODIES Hibbelers.pdf
Weekly quiz Compilation Jan -July 25.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
Final Presentation General Medicine 03-08-2024.pptx
History, Philosophy and sociology of education (1).pptx
A systematic review of self-coping strategies used by university students to ...
Complications of Minimal Access Surgery at WLH
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
01-Introduction-to-Information-Management.pdf
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
Microbial disease of the cardiovascular and lymphatic systems

PRAM algorithms from deepika

  • 1. KUVEMPU UNIVERSITY Department of Computer Science Jnana Sahyadri Shankarghatta Seminar on “ PRAM ALGORITHMS ” Presented by : Deepika R, 2 nd sem , M.Sc, Dept. Of Computer Science, Shankarghatta. Under the Guidance of : Suresh M, Dept. Of Computer Science, Shankarghatta.
  • 2. Contents: Introduction Computational Model Merging Sorting Computing the Convex Hull Applications Conclusion Bibliography
  • 3. Introduction: There are many application in day to day life that demand real time solution to problem. For example weather forecasting has to done in a timely fashion etc.. If an expert system is used to aid a physician in surgical procedures ,decisions have to be made within seconds. And so on. Programs written for such applications have to perform an enormous amount of computation. Even the fastest single-processor machine may not be able to come up with solutions within tolerable time limits. Parallel Random Access Machines (PRAM) offer the potential of decreasing the solution times enormously .
  • 4. Example:- Say there are 100 numbers to be added and there are two persons A and B. Person A can add the first 50 numbers. At the same time B can add the next 50 numbers. When they are done, one of them can add two individual sums to get the final answer. So two people can add the 100 numbers in almost half the time required by one.
  • 5. Computational model:- In the RAM (Random Access Machine) we assume that any of the following operation can be done in one unit of time: addition, subtraction, multiplication, division, comparison, memory access, assignment, and so on. This model widely accepted as a valid sequential model. An important feature of parallel computing that is absent in sequential computing is need for interprocessor communication . For example given any problem, the processor have to communicate among themselves and agree on the subproblems each will work on. Also they need to communicate to see whether every one has finished its task so on.
  • 6. Contd… Parallel models can be broadly categorized into 2 types: Fixed connection machines Shared memory machines
  • 7. Fixed connection machines A fixed connection network is a graph whose nodes represent processor and edges represent communication links between processors. Here communication time depends on the lengths of these path. Ex:-
  • 8. Shared memory model Here a number of processor work synchronously. They communicate with each other using common block of global memory that is accessible by all. This global memory is called common or shared memory.
  • 9. Memory Access in PRAM Exclusive Read (ER): p processors can simultaneously read the content of p distinct memory locations. Concurrent Read (CR): p processors can simultaneously read the content of p’ memory locations, where p’ < p . Exclusive Write (EW): p processors can simultaneously write the content of p distinct memory locations. Concurrent Write (CW): p processors can simultaneously write the content of p’ memory locations, where p’ < p .
  • 10. Odd-Even Merge Odd-even merge is a merging algorithm based on divide-and conquer that yield itself to efficient parallelization. Step 1. Partition X 1 and X 2 into their odd and even parts. That is, partition X 1 odd =k 1 ,k 3 ,…..,k m-1 and X 1 even =k 2 ,k 4 ,…..,k m . Similarly, partition X 2 into X 2 odd and X 2 even Step 2. Recursively merge X 1 odd with X 2 odd using m processors. Let L 1 =l 1 ,l 2 ,……..l m be the result. Note that X 1 odd , X 1 even , X 2 odd and X 2 even using other m processors to get L 2 =l m+1 ,l m+2 ,……..l 2m Step 3.Shuffle L 1 and L 2 ; that is, form the sequence L=l 1 ,l m+1 ,l 2 ,l m+2 ,……..l m ,l 2m . Compare every pair and inter change them if they are out of order. That is, compare l m+1 with l 2 and interchange them if need be, compare l m+2 with l 3 and interchange them if need be, so on, Output the resultant sequence.
  • 11. X1=2,5,8,11,13,16,21,25 X2=4,9,12,18,23,27,31,34 2,8,13,21 5,11,16,25 4,12,23,31 9,18,27,34 L 1 = 2,4,8,12,13,21,23,31 L 2 =5,9,11,16,18,25,27,34 L=2, 5,4 9,8 11,12 16,13 18,21 25,23 27,31 ,34 2,4,5,8,9,11,12,13,16,18,21,23,25,31,34 Compare and exchange Shuffle Merge Merge X 1 odd X 1 even X 2 odd X 2 even
  • 12. Sorting Sorting is the task of arranging an unordered collection (sequence) of elements into monotonically increasing (or decreasing) order. Odd-Even Merge Sort Odd even merge sort employs the classical divide and conquer strategy. If X=k 1 ,k 2 ,…..,k n is the given sequence of n keys, it is partitioned into two subsequences X 1 1 =k 1 ,k 2 ,…..,k n/2 and X 2 1 =k n/2+1 ,k n/2+2 ,…..,k n of equal length. X 1 1 and X 2 1 are sorted recursively assigning n/2 processor to each. The two sorted subsequences are then finally merged.
  • 13.  
  • 14. Computing the Convex Hull Take the set of points and divide the set into two halves Assume that recursive call computes the convex hull of the two halves Conquer stage: take the two convex hulls and merge it to obtain the convex hull for the entire set
  • 15.  
  • 17. Conclusions PRAM algorithm is the source of most fundamental ideas It’s a source of inspiration for algorithms PRAM is simple and easy to understand
  • 18. Bibliography: Fundamentals of Computer Algorithms Ellis Horowitz Sartaj Sahai Sangunathevar Rajasekaran