Strings: X^0 confusion

70 Views Asked by At

I've been given the set of string:

                                X = {2,00}.

I've been asked to perform various concatenation operations on it.

For example; X^3 - Which I put: X^3 = XXX = {(2,00),(2,00),(2,00)}

and so on.

One of the questions is: X^0 (that looks dodgy, that's X to the power of zero)

To my knowledge anything which is ^0 = 1. So my answer is that

 X^0 = X = {2,00}

But my friend says it's an empty string?

X^0 = null = {}

Could anyone tell me who's right, if either, and more importantly why?

Many thanks

2

There are 2 best solutions below

0
On BEST ANSWER

Usually, in a monoid, we define $x^0$ to be the identity element of the monoid, that is, the element $e$ such that $ex = x = xe$ for all $x$. This is so that the standard "exponent rules" such as $x^{a+b} = x^a \cdot x^b$ hold even when $a$ or $b=0$. In your case, since the operation is concatenation, it makes sense for $x^0$ to mean the empty string, since concatenating nothing does nothing.

More generally, given any starting set, the construction of words on that set by concatenation is called a free monoid.

4
On

As you said, for any $x$, $x^0=1$.

What is said here is actually that an element of a set to the power $0$ is the neutral element of this set for the "product" operation.

In your case the set is the set of strings and the "product" operation is concatenation. Thus the neutral string is the string which, when you concatenate it with another string is still equal to this other string. If you call this string $N$ (for neutral :)), you have for any string $X$:

$$N\times X=X\times N=X$$

In your case this string $N$ is the empty string.

What you wrote is actually equivalent to saying that $x^0=x$ which is wrong, it is $x^1$ that equals $x$.