Compression of Partially Ordered Strings

  • Rajeev Alur
  • Swarat Chaudhuri
  • Kousha Etessami
  • Sudipto Guha
  • Mihalis Yannakakis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2761)


We introduce the problem of compressing partially ordered strings: given string σεΣ* and a binary independence relation I over Σ, how can we compactly represent an input if the decompressor is allowed to reconstruct any string that can be obtained from σ by repeatedly swapping adjacent independent symbols? Such partially ordered strings are also known as Mazurkiewicz traces, and naturally model executions of concurrent programs. Compression techniques have been applied with much success to sequential program traces not only to store them compactly but to discover important profiling patterns within them. For compression to achieve similar aims for concurrent program traces we should exploit the extra freedom provided by the independence relation.

Many popular string compression schemes are grammar-based schemes that produce a small context-free grammar generating uniquely the given string. We consider three classes of strategies for compression of partially-ordered strings: (i) we adapt grammar-based schemes by rewriting the input string σ into an “equivalent” one before applying grammar-based string compression, (ii) we represent the input by a collection of projections before applying (i) to each projection, and (iii) we combine (i) and (ii) with relabeling of symbols. We present some natural algorithms for each of these strategies, and present some experimental evidence that the extra freedom does enable extra compression. We also prove that a strategy of projecting the string onto each pair of dependent symbols can indeed lead to exponentially more succinct representations compared with only rewriting, and is within a factor of |Σ|2 of the optimal strategy for combining projections with rewriting.


Partial Order Compression Algorithm Concurrent Program Input String Graph Grammar 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BJR97]
    Booch, G., Jacobson, I., Rumbaugh, J.: Unified Modeling Language User Guide. Addison Wesley, Reading (1997)Google Scholar
  2. [BL00]
    Ball, T., Larus, J.: Using paths to measure, explain, and enhance program behavior. IEEE Computer 33(7), 57–65 (2000)Google Scholar
  3. [CLL+02]
    Charikar, M., Lehman, E., Liu, D., Panigrahy, R., Prabhakaran, M., Rasala, A., Sahai, A., Shelat, A.: Approximating the smallest grammar: Kolmogorov complexity in natural models. In: Proceedings of the 34th ACM Symposium on Theory of Computing, pp. 792–801 (2002)Google Scholar
  4. [CP85]
    Cori, R., Perrin, D.: Sur la Reconnaissabilite dans les monoides partiellement commutatifs libres. R.A.I.R.O.-Informatique Thorique et Applications 19, 21–32 (1985)zbMATHMathSciNetGoogle Scholar
  5. [DM97]
    Diekert, V., Metivier, Y.: Partial commutation and traces. In: Handbook of Formal Languages: Beyond Words, pp. 457–534. Springer, Heidelberg (1997)Google Scholar
  6. [Eng97]
    Engelfriet, J.: Context-free graph grammars. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. 3. Springer, Heidelberg (1997)Google Scholar
  7. [GRM03]
    Goel, A., Roychoudhury, A., Mitra, T.: Compactly representing parallel program executions. In: Proceedings of the ACM Symposium on Principles and Practice of Parallel Programming (2003)Google Scholar
  8. [Hol97]
    Holzmann, G.J.: The model checker SPIN. IEEE Transactions on Software Engineering 23(5), 279–295 (1997)CrossRefMathSciNetGoogle Scholar
  9. [KY00]
    Kieffer, J., Yang, E.: Grammar-based codes: a new class of universal lossless source codes. IEEE Transactions on Information Theory 46, 737–754 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  10. [Lam78]
    Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21, 558–565 (1978)zbMATHCrossRefGoogle Scholar
  11. [Lar99]
    Larus, J.: Whole program paths. In: Proceedings of the ACM Conference on Programming Languages Design and Implementation, pp. 259–269 (1999)Google Scholar
  12. [LS02]
    Lehman, E., Shelat, A.: Approximation algorithms for grammar-based compression. In: Proceedings of the 13th ACM-SIAM Symposium on Discrete Algorithms, pp. 205–212 (2002)Google Scholar
  13. [Maz87]
    Mazurkiewicz, A.: Trace theory. In: Brauer, W., Reisig, W., Rozenberg, G. (eds.) APN 1986. LNCS, vol. 255, pp. 279–324. Springer, Heidelberg (1987)Google Scholar
  14. [NW97]
    Nevill-Manning, C., Witten, I.: Identifying hierarchical structure in sequences: A linear-time algorithm. Journal of Artificial Intelligence Research 7, 67–82 (1997)zbMATHGoogle Scholar
  15. [Pra86]
    Pratt, V.R.: Modeling concurrency with partial orders. International Journal of Parallel Programming 15(1) (1986)Google Scholar
  16. [Sav03a]
    Savari, S.: Concurrent processes and interchange entropy. In: IEEE Int. Symp. on Information Theory (2003) (to appear)Google Scholar
  17. [Sav03b]
    Savari, S.: On compressing interchange classes of events in a concurrent system. In: IEEE Data Compression Conference (2003)Google Scholar
  18. [SS82]
    Storer, J., Szymanski, T.G.: Data compression via textual substitution. Journal of the ACM 29, 928–951 (1982)zbMATHCrossRefMathSciNetGoogle Scholar
  19. [ZL77]
    Ziv, J., Lempel, A.: A universal algorithm for sequential data compression. IEEE Transactions on Information Theory 23(3), 337–343 (1977)zbMATHCrossRefMathSciNetGoogle Scholar
  20. [ZL78]
    Ziv, J., Lempel, A.: Compression of individual sequences via variablerate coding. IEEE Transactions on Information Theory 24(5), 530–536 (1978)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Rajeev Alur
    • 1
  • Swarat Chaudhuri
    • 1
  • Kousha Etessami
    • 2
  • Sudipto Guha
    • 1
  • Mihalis Yannakakis
    • 3
  1. 1.Department of Computer and Information ScienceUniversity of Pennsylvania 
  2. 2.School of InformaticsUniversity of Edinburgh 
  3. 3.Department of Computer ScienceStanford University 

Personalised recommendations