Solving Systems of Difference Constraints Incrementally

Abstract. Difference constraints systems consisting of inequalities of the form xi - xj $ \leq $ bi,j occur in many applications, most notably those involving temporal reasoning. Often, it is necessary to maintain a solution to such a system as constraints are added, modified, and deleted. Existing algorithms handle modifications by solving the resulting system anew each time, which is inefficient. The best known algorithm to determine if a system of difference constraints is feasible (i.e., if it has a solution) and to compute a solution runs in Θ (mn) time, where n is the number of variables and m is the number of constraints. This paper presents a new efficient incremental algorithm for maintaining a solution to a system of difference constraints. As constraints are added, modified, or deleted, the algorithm determines if the new system is feasible and updates its solution. When the system becomes infeasible, the algorithm continues to process changes until it becomes feasible again, at which point a feasible solution will be produced. The algorithm processes the addition of a constraint in time O(m + n log n) and the removal of a constraint in constant time when the original system is feasible. More precisely, additions are processed in time O( || Δ || + |Δ| log|Δ| ) , where |Δ| is the number of variables whose values are changed to compute the new feasible solution, and || Δ || is the number of constraints involving the variables whose values are changed. When the original system is infeasible, the algorithm processes any change in O(m + n log n)amortized time. The new algorithm can also be used to check for the existence of negative cycles in dynamic graphs.

[1]  Richard Gerber,et al.  Compiling real-time programs into schedulable code , 1993, PLDI '93.

[2]  Richard M. Karp,et al.  Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems , 1972, Combinatorial Optimization.

[3]  Satish K. Tripathi,et al.  Language support for the Maruti real-time system , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[4]  Robert E. Tarjan,et al.  Relaxed heaps: an alternative to Fibonacci heaps with applications to parallel computation , 1988, CACM.

[5]  Thomas W. Reps,et al.  An Incremental Algorithm for a Generalization of the Shortest-Path Problem , 1996, J. Algorithms.

[6]  Robert E. Tarjan,et al.  Data structures and network algorithms , 1983, CBMS-NSF regional conference series in applied mathematics.

[7]  Bowen Alpern,et al.  Incremental evaluation of computational circuits , 1990, SODA '90.

[8]  R. Tarjan Amortized Computational Complexity , 1985 .

[9]  Robert E. Shostak,et al.  Deciding Linear Inequalities by Computing Loop Residues , 1981, JACM.

[10]  Rina Dechter,et al.  Temporal Constraint Networks , 1989, Artif. Intell..

[11]  Itay Meiri,et al.  Combining Qualitative and Quantitative Constraints in Temporal Reasoning , 1991, Artif. Intell..

[12]  Michael J. Maher,et al.  Beyond Finite Domains , 1994, PPCP.

[13]  Thomas W. Reps,et al.  On the Computational Complexity of Dynamic Graph Problems , 1996, Theor. Comput. Sci..

[14]  Daniele Frigioni,et al.  Incremental Algorithms for the Single-Source Shortest Path Problem , 1994, FSTTCS.

[15]  Michelle Y. Kim,et al.  Multimedia documents with elastic time , 1995, MULTIMEDIA '95.

[16]  G. Ramalingam Bounded Incremental Computation , 1996, Lecture Notes in Computer Science.

[17]  Junehwa Song,et al.  Interactive authoring of multimedia documents , 1996, Proceedings 1996 IEEE Symposium on Visual Languages.

[18]  Insup Lee,et al.  Language Constructs for Distributed Real-Time Programming , 1985, RTSS.

[19]  Michael L. Fredman,et al.  Trans-dichotomous algorithms for minimum spanning trees and shortest paths , 1990, Proceedings [1990] 31st Annual Symposium on Foundations of Computer Science.

[20]  Joseph Naor,et al.  Simple and Fast Algorithms for Linear and Integer Programs With Two Variables per Inequality , 1994, SIAM J. Comput..

[21]  Daniele Frigioni,et al.  Fully dynamic output bounded single source shortest path problem , 1996, SODA '96.

[22]  Claude Le Pape Des systèmes d'ordonnancement flexibles et opportunistes , 1988 .