I assume that

is a language and we are talking about the complexity of a Turing machine that decides membership in this language.

Suppose a machine

with no input has

states and works on at most

cells. Also, assume that

terminates. How long can it run? If there are

symbols in the tape alphabet, then the number of all possible tapes is

. Therefore, the number of all possible configurations (state, tape) is

. If a machine encounters the same configuration twice, then it will loop forever. Thus, the running time is at most

.

Now assume that a machine

with

states decides a language

and uses at most space

on inputs of length

. Let's assume for simplicity that

is to the base

, which is the size of the tape alphabet. Then on an input of size

the running time of

is at most

. So the time complexity is polynomial in

.

For TRIPLE = {xxx}, do you mean that TRIPLE is a language with a single word? Then I believe it would take constant space and time to decide if a given word is xxx or not, and constant space is also logarithmic.