Definition:
Let
x
be a string over
S
.
For
i
³
0,
the
i
-th
power
of
x
,
x
i
, is defined as
1)
x
0
=
e
2)
if
i
³
1 then
x
i
=
xx
i
-1
Note:
x
i
x
j
=
x
j
x
i
=
x
i
+
j
,
where
i
,
j
³
0
Example:
Consider
x
=10
Task:
x
3
x
3
=
xx
2
=
10
x
2
x
0
=
e
x
2
=
xx
1
=
10
x
1
x
1
=
xx
0
=
10
x
0
x
1
=
10
e
=
10
x
2
=
1010
x
3
=
101010
Power of String
Gist:
x
i
= xx…x
i
-times
6/20