1 / 17

Study of the algorithms for parallel machines Many applications in day to day life

PRAM ALGORITHM Presented by Priyadarshini Panda IT200157071 Under the guidance of Mr. Anisur Rahman. INTRODUCTION. Study of the algorithms for parallel machines Many applications in day to day life demand real time solutions. Eg: Weather forecasting, severe

sissy
Download Presentation

Study of the algorithms for parallel machines Many applications in day to day life

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PRAM ALGORITHMPresented byPriyadarshini PandaIT200157071Under the guidance ofMr. Anisur Rahman

  2. INTRODUCTION • Study of the algorithms for parallel machines • Many applications in day to day life demand real time solutions. • Eg: Weather forecasting, severe hurricanes or snowstorms ,surgical procedures. • Parallel machines offer the potential of decreasing the solution time enormously.

  3. PARALLEL COMPUTING…….. • The idea of parallel computing specifies that we partition the problem into many subproblems. • Each processor work on a subproblem and when all the processors are done, the partial solutions are combined to arrive at the final answer. • The algorithm designed for a multiprocessor is called as parallel algorithm.

  4. SPEEDUP Let  be the given problem for which the best known sequential algorithm has a run time of S’ (n) , where n is the problem size. If a parallel algorithm on a p-processor machine runs in time T’ (n,p), then the speedup of the parallel algorithm is defined to be S’ (n) / T’ (n, p)

  5. COMPUTATIONAL MODEL • The processors 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, and so on. Parallel models can be broadly categorized into two: • Fixed Connection • Shared Connection

  6. FIXED CONNECTION….. • It is a is a graph G(V,E) whose nodes • represent processors and whose edges • represent communication links between • processors. • Examples: • Mesh, Hypercube, Butterfly

  7. SHARED CONNECTION • In these models, also called PRAMSs (Parallel Random Access Machines), a number (say p) of processors work synchronously. They communicate with each other using a common block of global memory that is accessible by all. • This global memory is also called common or shared memory. Communication is performed by writing to and/or reading from the common memory.

  8. FUNDAMENTAL TECHNIQUES AND ALGORITHM • Prefix Computation: It can be solved by a CREW PRAM algorithm that uses n/logn processors and run in O(logn) time. • List Ranking: The input to the problem is a list given in the form of an array of nodes. The problem is to compute for each node in the list the number of nodes to its right (rank of the node).

  9. SELECTION • This problem takes as input a sequence of n keys and as integer i , 1<=i<=n, and outputs the ith smallest key from the sequence. • The parallel complexity of selection gives O’ (log n) time n/logn processor common CRCW PRAM algorithm. • The work done by the algorithm is O(n) and it is work optimal.

  10. MERGING • Logarithm time algorithm: Theorem: Merging of two sorted sequences each of length m can be completed in O (log m) time using m CREW PRAM processors. • Odd-Even Merge: Theorem: Two sorted sequences of length m each can be merged in O (log m). Thus using 2m CREW PRAM processors.

  11. MERGING (Contd…) • A work optimal Algorithm: Theorem: Two sorted sequences of length m each can be merged in O (log m) time using 2m/log m CREW PRAM processors. • An O (log log m) –Time Algorithm: Theorem: Two sorted sequences of length m each can be merged in O(log log m) time using 2m CREW PRAM processors.

  12. SORTING ODD-EVEN MERGE: Theorem: We can sort n arbitrary keys in O (log2 n) time using n EREW PRAM processors. ALTERNATIVE RANDOMIZED ALGORITHM: Theorem: Sorting n keys can be performed in O(log2 n) time using n CREW PRAM processors. PREPARATA’S ALGORITHM: Theorem: Any n arbitrary keys can be sorted in O (log n) time using n log n CREW PRAM processors.

  13. GRAPH PROBLEM Theorem: The transitive closure matrix of an n-vertex directed graph can be computed in O (log n) time using n3+e common CRCW PRAM processors. Theorem: A minimum spanning tree for an n-vertex weighted graph G (V,E) can be computed in O (log n) time using n3+e common CRCW PRAM processors. Theorem: The transitive closure of an n-node directed graph can be computed in O(log2 n) time using n3/log n CREW PRAM processors.

  14. COMPUTING THE CONVEX HULL • The parallel algorithm will have a run time of O (log n) using n CREW PRAM processors. • The points with the minimum and maximum x coordinate values are identified. This can be done using the prefix computation algorithm in O (log n ) time and n/logn processors. • Sort the input points according to their x coordinate values. This can be done in O’ (log N ) time using N processors. • This sorting is done only once in the computation of the upper hull. • An upper hull is maintained in clockwise order as a list

  15. CONCLUSION • We studied the algorithm for the parallel machines. • In PRAM algorithm a number of processors work synchronously and communicate with each other using a common block of memory.

  16. THANK YOU !!

More Related