1: \begin{abstract} We consider space functions $s(n)$ of finitely presented groups
2: $G =\langle A\mid R\rangle .$ (These functions have a natural geometric analog.) To define $s(n)$ we start with a word $w$ over $A$ of length at most $n$ equal to $1$ in $G$ and use relations from $R$ for elementary transformations to obtain the empty word; $s(n)$ bounds from above the tape space (or computer memory) one needs to transform any word of length at most $n$ vanishing in $G$ to the empty word.
3: One of the main results obtained is the following criterion:
4: A finitely generated group $H$ has decidable word problem of polynomial space complexity if and only if $H$ is a subgroup of a finitely presented group $G$ with a polynomial space function.
5: \end{abstract}