Two Graph Algorithms On an Associative Computing Model

Similar documents
COMP108 Algorithmic Foundations

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

Minimum Spanning Trees

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

(a) v 1. v a. v i. v s. (b)

CS 461, Lecture 17. Today s Outline. Example Run

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

1 Introduction to Modulo 7 Arithmetic

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

CS 241 Analysis of Algorithms

Planar Upward Drawings

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

12. Traffic engineering

Formal Concept Analysis

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Problem solving by search

Present state Next state Q + M N

Constructive Geometric Constraint Solving

Garnir Polynomial and their Properties

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

CS September 2018

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata

QUESTIONS BEGIN HERE!

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Weighted Matching and Linear Programming

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Research Scholar, Vinoba Bhave University, Hazaribag, Jharkhand

HIGHER ORDER DIFFERENTIAL EQUATIONS

Numbering Boundary Nodes

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

CSCI Compiler Design

Outline. Binary Tree

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Chapter 16. 1) is a particular point on the graph of the function. 1. y, where x y 1

Instructions for Section 1

Seven-Segment Display Driver

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

CIVL 8/ D Boundary Value Problems - Rectangular Elements 1/7

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

UNCORRECTED SAMPLE PAGES 4-1. Naming fractions KEY IDEAS. 1 Each shape represents ONE whole. a i ii. b i ii

Last time: introduced our first computational model the DFA.

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

QUESTIONS BEGIN HERE!

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

Analysis for Balloon Modeling Structure based on Graph Theory

0.1. Exercise 1: the distances between four points in a graph

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

A Low Noise and Reliable CMOS I/O Buffer for Mixed Low Voltage Applications

GREEDY TECHNIQUE. Greedy method vs. Dynamic programming method:

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

Section 10.4 Connectivity (up to paths and isomorphism, not including)

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture:

Fundamental Algorithms for System Modeling, Analysis, and Optimization

CSI35 Chapter 11 Review

10/30/12. Today. CS/ENGRD 2110 Object- Oriented Programming and Data Structures Fall 2012 Doug James. DFS algorithm. Reachability Algorithms

The Plan. Honey, I Shrunk the Data. Why Compress. Data Compression Concepts. Braille Example. Braille. x y xˆ

CS553 Lecture Register Allocation 1

Minimum Spanning Trees

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

EE1000 Project 4 Digital Volt Meter

Graph Contraction and Connectivity

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

, between the vertical lines x a and x b. Given a demand curve, having price as a function of quantity, p f (x) at height k is the curve f ( x,

Aquauno Video 6 Plus Page 1

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

Multi-Section Coupled Line Couplers

Preview. Graph. Graph. Graph. Graph Representation. Graph Representation 12/3/2018. Graph Graph Representation Graph Search Algorithms

Transcription:

Two Grph Algorithms On n Assoitiv Computing Modl Mingxin Jin Dprtmnt of Mthmtis nd Computr Sin Fyttvill Stt Univrsity, Fyttvill, NC 801 Emil: mjin@unfsu.du Astrt - Th MASC (for Multipl Assoitiv Computing) modl is SIMD modl nhnd with ssoitiv proprtis nd multipl synhronous instrution strms (). A numr of lgorithms hv n dvlopd for this modl nd som hv n implmntd using its ssoitiv progrmming lngug. In this ppr, w prsnt two grph lgorithms for th rstritd MASC modl with on (lld th ASC modl). Ths r n ASC vrsion of Kruskl lgorithm for th minimum spnning tr (MST) prolm nd n ASC vrsion of Dijsktr lgorithm for th singl sour shortst pth (SSSP) prolm. Both of our lgorithms hv worst s tim of O(n) whih provid spdups of t lst n ovr thir squntil vrsions. Also, our sond lgorithm is ost optiml. Ths lgorithms hv dvntgs of ing sy to progrm, highly sll nd hving smll ovrhd osts. Thy provid ttr undrstnding out th powr of th ASC/MASC modl in trms of fftivnss of lgorithms it supports. Kywords: Prlll lgorithms, ssoitiv omputing, SIMD lgorithms, minimum spnning tr, singl sour shortst pth 1. Introdution Th MASC (for Multipl Assoitiv Computing) modl is SIMD modl nhnd with ssoitiv proprtis nd multipl synhronous instrution strms tht n xut nd oordint dt prlll thrds (i.., multi-simd modl). It ws proposd y Pottr nd Bkr in 199 [1], motivtd y th STARAN omputr uilt in 1970s y Goodyr Arosp. It hs n tivly studid t Knt Stt Univrsity s prtil modl for yrs. Th MASC modl posssss rtin onstnt tim glol proprtis suh s onstnt tim rodsting, onstnt tim glol rdution oprtions, nd onstnt tim ssoitiv srh, ll of whih hv n justifid in [9]. Ths proprtis mk it distinguishl from numr of othr prlll modls, in tht it solvs not only gnrl prlll prossing prolms fftivly ut lso solvs prolms in spil Johnni W. Bkr Dprtmnt of Computr Sin Knt Stt Univrsity Knt, OH Emil: jkr@s.knt.du rs suh s rl-tim ir trffi ontrol in n xtrmly ffiint mnnr [1]. Th MASC modl hs n omprd using simultions to othr wll-known prlll modls []. A stndrd ssoitiv lngug tht supports th on vrsion of MASC, lld ASC, hs n implmntd ross numr of pltforms. A numr of MASC lgorithms hv n dvlopd to solv prolms in vrious rs [1,, 1]. In this ppr, w prsnt two grph lgorithms for th ASC modl, nmly on for Kruskl lgorithm for th minimum spnning tr (MST) prolm, nd on for Dijkstr lgorithm for th singl sour shortst pth (SSSP) prolm. By tking dvntgs of onstnt tim ssoitiv oprtions on th modl, oth of our ASC vrsions of th lgorithms tk O(n) tim, whih is optiml nd provids n O(n) spdup whn omprd to thir squntil vrsions in worst s. Sin th MST nd SSSP prolms oth hv numrous prtil pplitions, this work provids dditionl informtion out th powr of th ASC nd MASC modl in trms of fftivnss of lgorithms thy support. Th ppr is orgnizd s following. Stion rviws th squntil lgorithms for Kruskl lgorithm nd Dijkstr lgorithm. Stion outlins th ASC/MASC modl nd its proprtis. Stions nd prsnt th ASC vrsion of Kruskl lgorithm for th MST prolm nd th ASC vrsion of Dijkstr lgorithm for SSSP prolm. Stion provids summry.. Prolms nd Thir Squntil Algorithms.1 Th MST Prolm Th MST prolm is dsrid s follows. Givn n wightd, undirtd onntd grph G=(V, E) whil V is th st of vrtis nd E is th st of dgs. Th prolm is to find tr T= (V, E ) suh tht E E nd th wight of T is minimizd. Clssil lgorithms to solv this prolm r Prim lgorithm nd Kruskl lgorithm, s dsrid in

[]. An ASC vrsion of Prim lgorithm hs n dvlopd prviously [1]. In this ppr, w prsnt n ASC vrsion of Kruskl lgorithm in Stion. As dsrid in [], th squntil vrsion of Kruskl lgorithm uss th disjoint-st oprtions to itrtivly xmin ll dgs whih r pr-sortd in non-drsing ordr y wight. Initilly h of vrtis is md st. Th lgorithm slts n dg (u, v) with th smllst wight nd hks if it is sf dg. A sf dg is dfind to n dg tht n sfly ddd to th minimum spnning tr without mking yl or rking its proprty of prsrving minimum wight. If th dg (u, v) is sf, th st ontining u nd th st ontining v r mrgd to lrgr st. If th dg is not sf, thn it is disrdd. This produr is itrtd until ll dgs r xmind. Th squntil Kruskl lgorithm rquirs sorting ll dgs. Th running tim of th lgorithm is O( E log E ). Sin E V, this tim is qul to O( E log V ). If n = V nd m = E, this is O(m log n) or O(n log n) in worst s. Prlll vrsions of this lgorithm on diffrnt modls hv n studid. Most of thm r on th PRAM modl nd mny still rquir sorting dgs, unlss thy us nothr mthod [17]. For xmpls, th uthor of [10] dvlopd prlll Kruskl lgorithm on CRCW PRAM in O(log m) with mn prossors. Th uthors of [18] gv nothr prlll vrsion of this lgorithm on CRCW PRAM in O(log m) using O(m+n) prossors. Although our lgorithm tks mor tim, its ovrll ost is lss thn th ov xmpls, prtiulrly in worst s, s w us fwr prossors. Also, unlik othr vrsions of th lgorithms, our lgorithm limints nd of sorting dgs du to onstnt tim ssoitiv oprtions of th MASC modl.. Th SSSP Prolm Th SSSP prolm is dsrid s follows. Givn wightd, dirtd grph G = (V, E) whr V is th st of vrtis nd E is th st of dgs. Th wight of pth from vrtx u to vrtx v is dfind to th sum of th wights of ll inludd dgs from u to v. A pth is shortst pth if its wight is miniml. Th prolm is to find shortst pth from givn sour vrtx s V to h othr vrtx v V. Dijkstr lgorithm is lssil lgorithm to solv this prolm. As dsrid in [], th si id is th us of th grdy strtgy. Whil th lgorithm prods, th distn of h vrtx from th sour vrtx s is updtd. Th urrnt shortst distn from sour s to vrtx u is dnotd to d(u). Initilly d(u) for h vrtx u is st to infinit xpt d(s) is zro. A priority quu is usd to slt th nxt vrtx u with th shortst distn to s mong ll of th vrtis in th quu. Aftr u is xtrtd from th quu, d(v) for h djnt vrtx v of u is xmind. If th wight of th dg (u, v) is w(u, v) nd d(v) > d(u) + w(u, v) thn d(v) is st to d(u)+w(u, v), whih rprsnts th updtd urrnt shortst distn from s to v. Th produr is itrtd until th quu is mpty. Th running tim of Dijkstr lgorithm is O( V log V + E ) or O(n log n + m) if n = V nd m= E. This is O(n ) tim in worst s whn m = n. Howvr, using MASC, w do not nd to mintin th priority quu to find th minimum vlu. Instd, th MASC ssoitiv srh n find this dt itm in onstnt tim. Thrfor, th MASC vrsion of Dijkstr lgorithm tht will prsntd in Stion tks O(n) tim in worst s.. Th MASC Modl Th MASC modl is n nhnd multi-simd modl with ssoitiv oprtions. As shown in Figur 1, MASC onsists of n rry of prossing lmnts () nd on or mor instrution strms (s). A MASC with n nd j s is writtn s MASC(n, j). Sts of ssignd to h r disjoint nd form prtition of th st of ll. This prtition is dynmi in th sns tht th ssignmnt of to s n hng during xution. Eh PE, pird with its lol mmory, is lld ll. (In this ppr, w us th trms PE nd lls intrhngly whn thr is no onflit.) Instrutd y its ssignd, PE ts s n ALU to prform si rithmti nd logi oprtions. A PE nithr stors opy of th progrm nor prtiipts in doding this progrm. C E L L N E T W O R K Clls Mmory Mmory Mmory Th MASC modl hs thr ntworks; nmly, ll ntwork for ll ommunitions, n ntwork for ommunitions, nd rodst/rdution ntwork for ommunition twn n nd its st of lls. PE PE PE Brodst/rdution Ntwork Figur 1 Th MASC modl I S N E T W O R K

With its rodst/rdution ntwork, th MASC modl supports si ssoitiv oprtions in onstnt tim (ssuming word lngth is onstnt) nd rodst from n to its tiv lls in onstnt tim. Ths ssoitiv oprtions inlud th glol rdution oprtions of OR nd AND, th mximum nd minimum of intgr or rl vlus. In ddition, th MASC modl supports onstnt tim ssoitiv srh du to th ft tht dt in th lol mmoris of th r lotd y ontnt rthr thn y ddrss. Th lls whos dt vlu mths th srh pttrn r lld rspondrs nd th unsussful ons r lld non-rspondrs. Th n tivt ithr th rspondrs or th non-rspondrs. Eh n dtrmin if thr is rspondr ( ny rspondrs ) nd n slt (or pik on ) rspondr from th st of tiv lls in onstnt tim. An n instrut th sltd ll to pl vlu on th us nd ll othr lls in its st riv this vlu in onstnt tim. Th fsiility of ths ssumptions hs n justifid in [9] nd mor dtils n found thr. Th numr of s is nturlly smllr thn th numr of. s r oordintd using ontrol prlllism nd ommunit using th ntwork []. In this ppr, howvr, w only us th MASC modl with on instrution strm. A stndrd ssoitiv lngug tht supports th on vrsion of MASC, lso lld ASC, hs n implmntd ross numr of pltforms. It provids tru portility for prlll lgorithms [1]. As mntiond rlir, th MASC modl is l to support gnrl lgorithm dvlopmnt nd nlysis. A wid rng of diffrnt typ of ASC lgorithms nd svrl lrg progrms hs n implmntd using th ASC lngug. A fw xmpls r givn in [1,, 1]. Th MASC modl hs n omprd nd rltd to tht of othr wll-known prlll omputtionl modls suh s PRAM, MMB, nd RM. Som onstnt tim simultion rsults hv n otind []. Ths simultions nd omprisons provid mthods to vlut th powr of th MASC modl. On th othr hnd, it is lso usful to dvlop mor ffiint nd fftiv lgorithms for this modl, nd ths lgorithms provid informtion out its powr. A tulr rprsnttion is usd to stor dt for th MASC modl. Using n ssoitiv srh, dt n lotd y it ontnt rthr thn y its ddrss. For xmpl, Figur shows how dirtd grph n rprsntd in tulr form with h PE storing on vrtx of th grph. Th fiv prlll vrils,, 7 d 8 vrtx d PE 0 PE 0 7 PE 0 PE d 8 0 PE 0 Figur Grph rprsnttion on ASC -- on vrtx pr PE 7 8 d old_rp nw_rp dg u v stu_rp stv_rp sf Figur Grph rprsnttion on ASC -- on dg pr PE visitd PE Ys Ys PE 7 No No PE 8 d d No No PE d d No No PE No No PE d d No No PE No No PE d d No No PE Ys Ys intiv intiv intiv

, d, nd stor th wights of outgoing dgs from this vrtx, rsptivly. Figur shows how n undirtd grph n rprsntd with h PE storing on dg of th grph. Th vrils u nd v rprsnt th two vrtis of th dg. Othr vrils will disussd in ltr stions. Not tht sign is usd s suffix of prlll vril in ordr to distinguish it from n vril, whih is lso lld slr vril. Sin only on is usd in our lgorithms, w rfr to thm s ASC rthr thn MASC lgorithms. Ths ASC lgorithms r prsntd in th following stions.. ASC Vrsion of Kruskl Algorithm W us th grph rprsnttion illustrtd in Figur s th dt strutur in our lgorithm. Tht is, th informtion out h dg is stord on on PE. In ddition to th thr vrils (or filds) in Figur for th wight of th dg (dg) nd two nd vrtis (u nd v), four dditionl vrils r dfind, i.., stu_rp nd stv_rp for storing th rprsnttivs of th two disjoint-sts ontining u nd v, rsptivly, sf for idntifying sf dg, nd visitd for trking dgd tht hv n visitd. Initilly, ll stu_rp nd stv_rp r st to th sm vlus s u nd v, i.., stu_rp = u nd stv_rp = v. Th lgorithm follows th id of th squntil Kruskl lgorithm nd slts n dg with minimum wight, ut thr is no nd to first sort ll dgs in th MASC lgorithm. This is us th MASC modl n us its minimum fild oprtion to find n dg with th minimum wight in onstnt tim. Whn suh n dg is sltd, th two sts ontining its two djnt vrtis r hkd. If th two sts r diffrnt, th dg is sf nd n ddd to th rsulting tr. Th rds th vlus of th two st rprsnttivs, i., stu_rp or stv_rp. Th numrilly or lxiogrphilly smllr (i.., smllr using ditionry ordring) rprsnttiv is stord in th slr vril nw_rp, nd th othr rprsnttiv is stord in old_rp. Also, visitd is st to Ys for this dg. Th instruts ll to rpl ll th vlu of old_rp with th vlu of nw_rp in thir filds stu_rp nd stv_rp. Aftr updting, ll with stu_rp qul to stv_rp r dtivtd nd will not prtiipt in futur prossing. Th ov stps r itrtd until ll r intiv. At th lst stp, ll with visitd= Ys rprsnt th dgs of minimum spnning tr. Algorithm ASC-KRUSKAL-MST(G, T) Bgin 1. St ll to tiv. St stu_rp = u, stv_rp = v, sf = No, nd visitd = No. For ll, rpt th following stps until no PE is tiv.1. Find th minimum dg with visitd= No.. Pik on PE from rspondr(s) (if thr r multipl rspondrs).. St sf= Ys, st visitd= Ys.. Lt old_rp = Mx(stu_rp, stv_rp) nd nw_rp = Min(stu_rp, stv_rp).. Updt stu_rp nd stv_rp for ll y rpling th vlu of old_rp with th vlu of nw_rp.. Dtivt ll with stu_rp = stv_rp End. Th orrtnss of th lgorithm n justifid s follows. Initilly h vrtx mks n individul st. Eh round of itrtion xmins n dg with th minimum wight if its two djnt vrtis r in two diffrnt sts. If not, it is sf dg. Thn, w mrg th two sts nd st th nw st rprsnttiv to th vrtx tht hs smllr numr (or lxiogrphilly smllr). All ourrns of th old st rprsnttivs in th stu_rp nd stv_rp filds r updtd with th vlu of this nw st rprsnttiv. At th nd of th itrtion, ll with dgs hving two djnt vrtis in th sm st r dtivtd nd do not prtiipt futur prossing. This voids unnssry prossing. Figur shows vrils ftr two itrtions. Sin h itrtion tks onstnt tim, th running tim of th ov lgorithm is O( V ) or O(n) if V = n. It rprsnts spdup of O(m/n log n) omprd to th squntil vrsion of th lgorithm if E = m. In worst s, this is O(n log n), whih is sustntil. Morovr, w us m to stor dgs whil on dg pr PE. Thy n sily sld to lrg dt st without ny dditionl ovr hd osts.. ASC Vrsion of Dijkstr Algorithm W slightly modify th grph rprsntion in Figur for th dt strutur usd in our lgorithm. Th vrtis r still stord on pr PE. Instd of storing dt of its outgoing dgs, w stor dt of its inoming dgs. Th modifid dt strutur is shown in Figur. On h PE, in ddition to th n filds to rprsnt th grph (fiv filds in Figur ), thr

7 d 8 u dist_u sour vrtx d prnt visitd dist PE 0 Ys 0 PE 0 Ys PE 7 0 8 No PE d 0 No PE 0 Ys Figur Modifid grph rprsnttion in Figur vrils r dfind. Thy r, dist for th urrnt shortst distn from th sour, prnt for th prnt (or prdssor) vrtx in th shortst pth, nd visitd for trking vrtis tht hv n visitd. On th, thr slr vrils r dfind, i.., sour for th sour vrtx, u for th vrtx urrntly ing prossd, nd dist_u for th urrnt shortst distn from s to u. Th lgorithm initilly sts ll ut th sour with dist to th vlu in th sour s fild, prnt to th sour if dist is not infinit othrwis to, nd visitd to No. For th sour vrtx, st dist to 0, prnt to nd visitd to Ys. Thn loop is xutd until ll vrtis hv n visitd. During h round of itrtion, find vrtx with th minimum dist nd st it visitd to Ys. Th rds th vrtx to th slr vril u nd its dist vlu to nothr slr vril dist_u. Thn th rodsts ths two vlus to ll othr. All with visitd = No hk if its dist > dist_u + th vlu in u s fild. If ys, updt dist with dist_u + th vlu in th u s fild nd its prnt is st to u. Th loop ontinus until no mor vrtx with visitd = No. It n dsrid s follows. Algorithm ASC-DIJKSTRA-SSSP(G, s) Bgin 1. St ll tiv. St visitd = No. St dist to th vlu in th sour s fild. St prnt to sour if dist is not infinit othrwis to. St visitd of sour to Ys. Rpt th following stps until no PE rmins with visitd = No.1. Find th minimum dist with visitd= No.. Pik on PE from th rspondr(s) (if thr r multipl rspondrs).. Rd u nd dist_u from vrtx nd dist of th PE pikd in th ov stp.. St vistd of u to Ys.. Brodst th vlus of u nd dist_u to ll.. For ll with visitd = No, if dist > (dist_u + th vlu in th u s fild) thn..1. St dist to dist_u + th vlu in th u s fild... St prnt to u End. Th orrtnss of th lgorithm n justifid s follows. Strting from th sour s, w slt vrtx u with th shortst distn dist_u to s. Thn w ompr th urrnt shortst distn dist for h of its djnt vrtis with th distn if th pth would go through u (i.., dist_u + th wight of th djnt dg). Th urrnt shortst distns of its djnt vrtis r updtd ordingly. Indutivly, ssum tht during th kth itrtion, th shortst pth from th sour to h vrtx is found, sujt to th rstrition tht th pth n only go through th k losst vrtis to th sour. This grdy strtgy usd in this lgorithm ssurs th shortst pth from th sour to h vrtx is found, sujt to th rstrition tht th pth n go through ithr th initil k+1 losst points to th sour. This ssurs tht for k = n-1, th shortst pth from h vrtx to th sour is found sin this pth is llowd to go through ny of th othr points. Sin h itrtion tks onstnt tim, th totl run tim of th ov lgorithm is O(n) tim if n = V. This rprsnts spdup of O(log n + m/n) ovr th squntil vrsion of Dijkstr lgorithm if m = E. In worst s whn m= n, th spdup is n, whih is linr. Morovr, this lgorithm is ost optiml sin th optiml running tim for th squntil lgorithm in th worst s is n. Prlll vrsions of Dijkstr lgorithm hv lso n studid y othr rsrhrs. Howvr, in th litrtur w hv srhd, thy did not provid lr omplxity nlysis (s xmpls in [1, 17]). In ontrst, th omplxity of our lgorithm is lr. Similrly, our lgorithm uss n, whih is ost

optiml. It lso hs dvntgs of sy progrmming nd high slility.. Summrizing Rmrks W hv prsntd two grph lgorithms for th ASC modl, i.., th ASC vrsion of Kruskl lgorithm for th MST prolm nd th ASC vrsion of Dijkstr lgorithm for th SSSP prolm. Both of thm tk O(n) tim. Both hv hivd signifint spdup of t lst ftor of n in th worst s, omprd with thir squntil vrsions. Also, our ASC vrsion of th Dijsktr lgorithm is ost optiml. Th rsults n summrizd in Tl 1, long with th rsults of similr rsrh work on othr modls. Tl 1 Squntil vrsion vs. ASC vrsion of th lgorithms Squntil Kruskl Algo. Numr of prossors Running tim 1 O(m log n) ASC Kruskl Algo. 1 + m O(n) CRCW PRAM Kruskl Algo. in [ 10] CRCW PRAM Kruskl Ago. in [ 18] Squntil Dijkstr Algo. mn O(log m) O(m+n) O(log m) In ddition to th spdups gind, th ASC lgorithms hv dvntgs of sy progrmming, highly slility, nd hving smll ovrhd osts. By tking dvntgs of th onstnt tim ssoitiv oprtions on th ASC modl, w limint nd of sorting dgs in th MST lgorithm. Ths two lgorithms n lso ffiintly implmntd on othr typs of SIMD omputrs, though th running tim my inrs dpnding on th ffiiny with whih th SIMD n support th dditionl si oprtions ssumd for ASC. Our work provids ttr undrstnding of th ASC/MASC modl in trms of fftivnss of lgorithms it supports. It lso ontriuts mor ASC/MASC vrsions of lssil lgorithms to th olltion of lgorithms for this modl. Furthr intrsting work inluds using multipl s to s how muh th running tim for ths 1 O(m+log n) ASC Dijkstr Algo 1 + n O(n) lgorithms n improvd. A possil dirtion for futur work is to implmnt th ov lgorithms on n ASC simultor using th ASC lngug, on SIMD, or COTS SIMD (.g., WorldSp s CSX01). This would provid dt to furthr vlut th fftivnss of ths lgorithms. Rfrns [1] M. Atwh, J.Bkr, S. Akl. An Assoitiv Implmnttion of Clssil Convx Hull Algorithms ; Pro. of th 8th Int l Conf. on Prlll nd Distriutd Computing Systms, pp. -8, 199. [] J. Bkr, M. Jin. Simultion of Enhnd Mshs with MASC, MSIMD Modl, Pro. of th 11th IASTED Int l Conf. on Prlll nd Distriutd Computing Systms, pp. 11-1, 1999. [] W. Chntms, J. Bkr, nd M. Shrgr. Compilr Extnsion of th ASC Lngug to Support Multipl Instrution Strms in th MASC Modl using th Mngr-Workr Prdigm, Int l Conf. on Prlll nd Distriutd Prossing Thniqus nd Applitions (PDPTA 0), Ls Vgs, Jun 00 [] K. W. Chong, Y. Hn, T. W. Lm. Conurrnt thrds nd optiml prlll minimum spnning trs lgorithm, Journl of th ACM (JACM), Vol. 8 No. Mrh 001 [] T.H. Cormn, C. E. Lisrson, R.L. Rivst, nd C. Stin. Introdution of Algorithms, nd d., MGrw Hill Highr Edution, 00. [] M. Esnwin, J. Bkr. VLCD String Mthing for Assoitiv Computing nd Multipl Brodst Msh, Pro. of th 9th Int l Conf. on Prlll nd Distriutd Computing Systms, pp. 9-7, 1997. [7] A. Grm, A. Gupt, G. Krypis, nd V. Kumr. Introdution to Prlll Computing, nd d., Addison- Wsly, 00. [8] R. M. Hrln. Srhing in prlll: s study with th singl-sour shortst pth lgorithm, ACM SIGCSE Bulltin, Pro. of th twnty-sond SIGCSE thnil symposium on Computr sin dution SIGCSE '91, Vol. No. 1 Mrh 1991. [9] M. Jin, J. Bkr, nd K. Bthr. Timings of Assoitiv Oprtions on th MASC modl, Pro. of th 1th IPDPS (Workshop in Mssivly Prlll Prossing), CD-ROM, April 001. [10] L. Kur. Prlll omputtion nd onflits in mmory ss, Inf. Pross Lttr, 1, (0 Apr. 198) 9-9. [11] D. B. Johnson, P. Mtxs. A prlll lgorithm for omputing minimum spnning trs, Pro. of th

th ACM Symposium on Prlll Algorithms nd Arhitturs, Jun 199. [1] P. Mtti d N. Do. Prlll lgorithms for th singl sour shortst pth prolm, Computing, vol. 9, No. 1, pp. 1-9, 198. [1] U. Myr nd P. Sndrs. -Stpping: A Prlll Singl Sour Shortst Pth Algorithm, Prodings of ESA '98: th Annul Europn Symposium, Vni, Itly, Springr Brlin/Hidlrg, August 1998. [1] W.C. Milndr, M. Jin, J.W. Bkr. Trtl Rl-Tim Control Automtion, Pro. of th 1th IASTED Int'l Conf. on Prlll nd Distriutd Systms (PDCS 00), pp. 8-88. [1] J. Pottr. Assoitiv Computing: A Progrmming Prdigm for Mssivly Prlll Computrs, Plnum Prss, Nw York, 199. [1] J. Pottr, J. Bkr, S. Sott, A. Bnsl, C. Lngsuksun, nd C. Asthgiri, ASC: An Assoitiv- Computing Prdigm, Computr, 7(11), 19-, 199. [17] M. J. Quinn, N. Do. Prlll grph lgorithms, ACM Computing Survys (CSUR), Vol. 1 No. Sptmr 198. [18] F. Surwr, P.Bhtthry. A prlll lgorithm for th minimum spnning tr on n SIMD mhin, Pro. of th 199 ACM nnul onfrn on Communitions CSC '9, April 199.