The \emph{Skorokhod distance} is a natural metric on traces of continuous and hybrid systems. For two traces, from $[0,T]$ to values in a metric space $O$, it measures the best match between the traces when allowed continuous bijective timing distortions. Formally, it computes the infimum, over all timing distortions, of the maximum of two components: the first component quantifies the {\em timing discrepancy} of the timing distortion, and the second quantifies the mismatch (in the metric space $O$) of the values under the timing distortion. Skorokhod distances appear in various fundamental hybrid systems analysis concerns: from definitions of hybrid systems semantics and notions of equivalence, to practical problems such as checking the closeness of models or the quality of simulations. Despite its popularity and extensive theoretical use, the \emph{computation} problem for the Skorokhod distance between two finite sampled-time hybrid traces has remained open.
We address in this work the problem of computing the Skorokhod distance between two polygonal traces (these traces arise when sampled-time traces are completed by linear interpolation between sample points). We provide the first algorithm to compute the exact Skorokhod distance when trace values are in $\reals^n$ for the $L_1$, $L_2$, and $L_{\infty}$ norms. Our algorithm, based on a reduction to Frechet distances, is fully polynomial-time, and incorporates novel polynomial-time procedures for a set of geometric primitives in $\reals^n$ over the three norms.
[1]
A. Skorokhod.
Limit Theorems for Stochastic Processes
,
1956
.
[2]
Albert Benveniste,et al.
Toward an Approximation Theory for Computerised Control
,
2002,
EMSOFT.
[3]
M. Broucke,et al.
Regularity of solutions and homotopic equivalence for hybrid systems
,
1998,
Proceedings of the 37th IEEE Conference on Decision and Control (Cat. No.98CH36171).
[4]
Erin W. Chambers,et al.
Homotopic Fréchet distance between curves or, walking your dog in the woods in polynomial time
,
2010,
Comput. Geom..
[5]
Carola Wenk,et al.
Shape matching in higher dimensions
,
2003
.
[6]
Rupak Majumdar,et al.
Edit distance for timed automata
,
2014,
HSCC.
[7]
David M. Bloom,et al.
Linear Algebra and Geometry
,
1979
.
[8]
Meinard Müller,et al.
Dynamic Time Warping
,
2008
.
[9]
Philip Chan,et al.
Toward accurate dynamic time warping in linear time and space
,
2007,
Intell. Data Anal..
[10]
Johannes Bisschop,et al.
AIMMS - Optimization Modeling
,
2006
.
[11]
Donald J. Berndt,et al.
Finding Patterns in Time Series: A Dynamic Programming Approach
,
1996,
Advances in Knowledge Discovery and Data Mining.