Associativity of concatenation of closed curves from $I$ to some topological spaces $X$ I'm looking for  some example of closed curve such that $f*(g*h)=(f*g)*h,$ in some topological space $X$. 
I tried to use $X$ like the Sierpinski space, but I can't find such closed curve. 
 A: It depends on your definition of $f * g$ (indeed for Moore loops every triplet satisfies the equation), but let's use the most common definition: for $f, g : [0,1] \to X$,
$$(f*g)(t) := \begin{cases}
f(2t), & 0 \le t \le \frac{1}{2}; \\
g(2t-1), & \frac{1}{2} \le t \le 1.
\end{cases}$$
If you allow your space to not be Hausdorff, weird things can happen. Let $X = \{0,1\}$ with the indiscrete topology (ie. the only open sets are $\emptyset$ and $X$). Let $f = g = h = \gamma : I \to X$ be defined by
$$\gamma(t) = \begin{cases}
1, & t = p/2^n \text{ for some } p \in \mathbb{N}; \\
0, & \text{otherwise}.
\end{cases}$$
This is continuous because every map to an indiscrete space is continuous. And you can check directly from the definition that $\gamma*(\gamma*\gamma) = (\gamma*\gamma)*\gamma$ (simply because $x$ is a dyadic number iff $2x$ is iff $2x - 1$ is), but of course $\gamma$ isn't the constant loop.

However, when your space is Hausdorff, the situation is considerably simpler. The condition $(f*g)*h = f*(g*h)$ pointwise (ie. you literally have $((f*g)*h)(t) = (f*(g*h))(t)$ for all $t$) is equivalent to $$f = f*g \text{ and } h = g*h,$$ just by inspecting the definition.
So when is it possible to have $f = f*g$ for example? Let $t \in [0,1]$, then:
$$f\left(\frac{t+1}{2}\right) = (f * g)\left(\frac{t+1}{2}\right) = g(t).$$
But then $f = f*g = (f*g)*g$, so $f\left(\frac{t+1}{4}\right)$ is again equal to $g(t)$. Here is a picture if it can help:

By induction, $$g(t) = f\left(\frac{t+1}{2^n}\right),$$ which converges to $f(0)$ (remember that $f$ is continuous). Thus $g$ is the constant loop, if your space is Hausdorff (because a sequence can only have one limit). Now using again the same trick $f = f*g = (f*g)*g = \dots$, you can deduce that $f(t) = f(1)$ for all $t$ (divide $[0,1]$ into intervals of the type $(1/2^{n+1}, 1/2^n]$). Thus $f$ is the constant loop too.
The same argument (with minor modifications) shows that $h = g*h \implies h = \text{cst}$. In conclusion, the only triplet of loops $(f,g,h)$ such that $f*(g*h) = (f*g)*h$ "on the nose" is the triplet $(\text{cst}, \text{cst}, \text{cst})$ of three constant loops if your space is Hausdorff.
