  We consider space functions $s(n)$ of finitely presented groups $G =< A\mid
R> .$ (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.
One of the main obtained results is the following criterion: 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.
