# What does this equation imply?

I am reading a paper on seam carving to implement, and got stuck in understanding the convention used in the equation below.

1) I understand, $$\{ ( x ( i ) , i ) \} _ { i = 1 } ^ { n } , \text { s.t. } \forall i , | x ( i ) - x ( i - 1 ) | \leq 1$$ part, but unable to understand, why he calls them $$\bf{s}^{\bf{x}}$$. What does the author indicate here?

2) Also I did not understand the last line about mapping.

I tried to search for hours one whole day online, but could not find any thing to understand this notation. Kindly help. The stanza extends as below, but I could not find anything relevant under 8-connected path also as noted there.

paper

• Images of text are discouraged, because they cannot be found by searching. – GEdgar Feb 14 at 12:50

By $$s^x$$, the author is making up a new shorthand meaning "this is a seam" (that's the letter "s") based on the sequence called $$x$$.

The $$[1,\ldots n] \to [1, \ldots m]$$ means a function from the set of integers $$\{1, 2, 3, \ldots, n\}$$ to the integers $$\{1, 2, \ldots, m\}$$.

So for a $$4 \times 5$$ image, $$x$$ is a function from $$\{1,2,3, 4\}$$ to $$\{1,2,3,4,5\}$$. The number $$x(i)$$ tells you, for row $$i$$, where in column $$i$$ the "seam" is passing.

It might be defined by, say $$x(1) = 2\\ x(2) = 3\\ x(3) = 2\\ x(4) = 1$$

Within a computer program, it'd probably be stored in an array: int x[4].

Drawing a picture, we have

OpOOO
OOpOO
OpOOO
pOOOO


where the pixels marked "p" are the ones described by the "seam data" 2, 3, 2, 1 because they lie (reading top to bottom) in columns 2, then 3, then 2, then 1.

In defining the sequence $$s^x$$, the author is trying to get at the following idea: for a sequence like $$x$$ (which is meant to indicate column-coordinates), you can make a sequence of pixel-coordinates that looks like this:

$$sx(1) = (2, 1)\\ sx(2) = (3, 2)\\ sx(3) = (2, 3)\\ sx(4) = (1, 4)$$

This is slightly odd, because in the author's pixel coordinates, the ROW coordinate appears second, and the column coordinate appears first. That's probably an attempt to make it match the usual cartesian coordinates, in which we place x-coordinates first, and y-coordinates second.

Anyhow, that's what the author's trying to say.

• thank you for detailed answer :), but why does he use power notation? that confuses me. why $s$ to the power of $x$? is that a proper convention at all? – Parthiban Rajendran Feb 14 at 14:27
• He's just trying to express an idea in a compact notation. He could have written $S(x)$, or $[s:x]$, or any of a number of other things, but power notation is easy in LaTeX, and very compact. I personally don't like this choice, but it really is just a way of saying something in a typographically compact fashion. Note that $x^i$ doesn't always refer to powers, either -- we sometimes write $x^i_j$ to indicate the $ij$-element of a matrix $X$. Math overuses notation constantly! :( – John Hughes Feb 14 at 21:26