Uniform Linked Lists Contraction
Abstract
We present a parallel algorithm (EREW PRAM algorithm) for linked lists contraction. We show that when we contract a linked list from size n to size n/c for a suitable constant c we can pack the linked list into an array of size n/d for a constant 1 < d≤ c in the time of 3 coloring the list. Thus for a set of linked lists with a total of n elements and the longest list has l elements our algorithm contracts them in O(n i/p+((i)n+ i ) l+ l) time, for an arbitrary constructible integer i, with p processors on the EREW PRAM, where (1) n = n and (t)n= (t-1) n and *n= \ i|(i) n < 10\. When i is a constant we get time O(n/p+(i)n l+ l). Thus when l= ((c)n) for any constant c we achieve O(n/p+ l) time. The previous best deterministic EREW PRAM algorithm has time O(n/p+ n) and best CRCW PRAM algorithm has time O(n/p+ n/ n+ l). Keywords: Parallel algorithms, linked list, linked list contraction, uniform linked list contraction, EREW PRAM.