Advertisement

An optimal parallel algorithm for dynamic expression evaluation and its applications

  • Alan Gibbons
  • Wojciech Rytter
Session 8 Parallel Algorithms
Part of the Lecture Notes in Computer Science book series (LNCS, volume 241)

Abstract

We describe a deterministic parallel algorithm to compute algebraic expressions in log n time using n/log(n) processors on a parallel random access machine without write conflicts (P-RAM) with no free preprocessing. The input to our algorithm is a string, given by an array, of the expression. Such a form for the input enables a consecutive numbering of the operands in the expression in log(n) time with n/log(n) processors. This corresponds to a consecutive numbering of leaves in the tree of the expression which further enables a suitable partitioning of the leaves into small segments. We improve the result of Miller and Reif (1985), who described an optimal parallel randomized algorithm. Our algorithm can be used to construct optimal parallel algorithms for the recognition of two nontrivial subclasses of context-free languages: bracket and input-driven languages. These languages are the most complicated context-free languages known to be recognizable in deterministic logarithmic space. This strengthens the result of Matheyses and Fiduccia (1982) who constructed an almost optimal parallel algorithm for Dyck languages, since Dyck languages are a proper subclass of input-driven languages.

Using our algorithm we show also that preorder and postorder numberings of the nodes of a tree (whose leaves are already consecutively numbered) can be computed by optimal parallel algorithms.

Keywords

Binary Tree Recognition Problem Algebraic Expression Parse Tree Input String 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. I. Bar-On, and U. Vishkin, (1985), Optimal parallel generation of a computation tree form. ACM trans.on Progr.Lang.and Systems 7,2,348–357Google Scholar
  2. B.Braunmuhl, and R.Verbeek (1983), Recognizing input-driven languages in l og n space, Fund.of Comp.Theory,Lect.Notes in Computer ScienceGoogle Scholar
  3. R.P. Brent (1974), The parallel evaluation of general arithmetic expressions. JACM 21,2,201–208Google Scholar
  4. R.Giancarlo, and W.Rytter (1985), Parallel recognition of input driven and parsing of bracket languages, manuscript, University of Salerno, Dept.of InformaticsGoogle Scholar
  5. G. Kindervater and J. Lenstra (1985), An introduction to parallelism in combinatorial optimization. Report OS-R8501, Centre for Mathematics and Computer Science, AmsterdamGoogle Scholar
  6. Ming-Deh A. Huang (1985), Solving some graph problems with optimal or near optimal speed up on mesh-of-trees networks. 26th IEEE Symp. on Found.of Comp.Science, 232–240Google Scholar
  7. R.Matheyses, and C.M.Fiduccia (1982), Parsing Dyck languages on parallel machines. 20th Allerton Conference on Comm.Control and ComputingGoogle Scholar
  8. G.L.Miller, and J.Reif (1985), Parallel tree contraction and its application. 26th IEEE Symp. on Found.of Comp.Science, 478–489Google Scholar
  9. W.Rytter (1984), An application of Mehlhorn's algorithm for bracket languages to log n space recognition of input driven languages, Berichte Theoretische Informatik, Fachb.Math.Informatik, Universitat Paderborn (to appear in Inf.Process.Letters, 1986)Google Scholar
  10. W.Rytter (1985a), Parallel time 0(log n) recognition of unambiguous cfl's. Fund.of Computation Theory, Lect.Notes in Comp.ScienceGoogle Scholar
  11. W.Rytter (1985b), The complexity of two way pushdown automata and recursive programs. Combinatorial algorithms on words (ed.A.Apostolica, Z.Galil), NATO ASI Series F:12, Springer VerlagGoogle Scholar
  12. W.Rytter (1985c), Remarks on pebble games on graphs. In Combinatorial Analysis and Its Applications (ed.M.Syslo), to appear in Lect.Notes in MathematicsGoogle Scholar
  13. W.Rytter (1985d), On the recognition of context free languages, Lect. Notes in Comp.Science 208Google Scholar
  14. R.E.Tarjan, and U.Vishkin (1984), Finding biconnected components and computing tree functions in logarithmic parallel time. 25th Symp.on Found.of Computer Science, IEEE, 12–22.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • Alan Gibbons
    • 1
  • Wojciech Rytter
    • 2
    • 3
  1. 1.Dept. of Computer Sc.University of WarwickCoventryUnited Kingdom
  2. 2.Dept. of Computer Sc.University of WarwickUK
  3. 3.Institute of InformaticsWarsaw UniversityPoland

Personalised recommendations