Note that the sequence numbers associated with the data bytes in the
th packet of
are
and these are within a single packet so that
.
The same is true for the sequence numbers and time stamps of
.
The deviation for
from
is defined only if the total data size of
is larger than that of
, so we can assume that
.
A deviation is a measurement of how far the graph of a packet stream
differs from the graph of a given packet stream
.
It is basically the average horizontal distance between the two graphs computed along the vertical range of graph
.
But we have to consider the position of graph
against
so that the average distance between the two is the minimum when computing the deviation.
Since we do not know in advance in what range of
be best matched to
, we have to try every range of
.
This means we move
vertically to find out the vertical position where the average distance between the two graph is the minimum.
The
of (1) treats this minimization.
We also have to consider the horizontal position.
Because if the shapes of the two graphs are almost identical but the horizontal distance between the two graphs is large (due to for example long propagation delays), the deviation would be large, which is obviously not desired.
So we move
horizontally as well as vertically to find out the position where the average distance between the two is the minimum.
There are two directions for moving
horizontally since
cannot cross
.
One is to move from left to right and the other is from right to left.
The
of (1) treats the minimization of the horizontal position moving from right to left and the
of (1) treats the minimization of the horizontal position moving from left to right.