Abstract. We consider a compressed form of the word problem for finitely presented monoids, where the input consists of two compressed representations of words over the generators of a monoid M, and we ask whether these two words represent the same monoid element of M. Words are compressed using straight-line programs, i.e., context-free grammars that generate exactly one word. For several classes of finitely presented monoids we obtain completeness results for complexity classes in the range from P to EXPSPACE. As a by-product of our results on compressed word problems we obtain a fixed deterministic context-free language with a PSPACE-complete compressed membership problem. The existence of such a language was open so far. Finally, we will investigate the complexity of the compressed membership problem for various circuit complexity classes.Key words. grammar-based compression, word problems for monoids, context-free languages, complexity AMS subject classifications. 20F10, 68Q17, 68Q421. Introduction. During the last decade, the massive increase in the volume of data has motivated the investigation of algorithms on compressed data, like for instance compressed strings, trees, or pictures. The general goal is to develop algorithms that directly work on compressed data without prior decompression. Let us mention here the work on compressed pattern matching, see, e.g., [19,23,49,60].In this paper we investigate two classes of computational problems on compressed data that are of central importance in theoretical computer science since its very beginning: the word problem and the membership problem.In its most general form, the word problem asks whether two terms over an algebraic structure represent the same element of the structure. Here, we restrict to the word problem for finitely presented monoids, i.e., monoids that are given by a finite set of generators and defining relations. In this case the input consists of two finite words over the set of generators and we ask whether these two words represent the same monoid element. The undecidability results concerning the word problem for finitely presented monoids [47,56] and finitely presented groups [12,51] are among the first undecidability results that touched "real mathematics". Moreover, these negative results motivated a still ongoing investigation of decidable subclasses of word problems and their computational complexity. In particular, monoids that can be presented by terminating and confluent semi-Thue systems (i.e., string rewriting systems where every word can be rewritten in a finite number of steps to a unique irreducible word), see [11,33], received a lot of attention: these monoids have decidable word problems, and if the restriction to terminating systems is suitably sharpened, then precise complexity bounds can be deduced [10,41,42]. All relevant definitions concerning semi-Thue systems and finitely presented monoids are collected in Section 3.3.In its compressed variant, the input to the word problem for a (finitely presented) monoid consists...