# Upper Bounds on the Time Complexity of Temporal CSPs

University essay from Linköpings universitet/Institutionen för datavetenskap

Keywords: CSP; Algorithms;

Abstract: The temporal constraint satisfaction problem (CSP) offers a formalized way to reason about in which order tasks should be accomplished. Using this we can model a wide set of specific problems from scheduling to AI. In this thesis we present two algorithms, Algorithm A and Algorithm B, to solve temporal CSPs focused on improving the worst case time complexity. The first algorithm solves temporal CSPs by an exhaustive search of all weak orderings. The time complexity is in $\mathcal{O}((0.53n)^{n} \cdot poly(n))$, thus within a polynomial factor of the corresponding Ordered Bell Number. We also show that it can solve CSP in Allen’s algebra within a polynomial factor of the corresponding number of relations between intervals on a line, thus in $\mathcal{O}((0.75n)^{2n} \cdot poly(n))$  time. The second algorithm also solves temporal CSPs but where the constraints have a bounded number of disjuncts. It will assume some order and then make a backtracking search guided by the constraints. In this case the time complexity will be in $\mathcal{O}(n! \cdot poly(n)) = \mathcal{O}((0.37n)^{n} \cdot poly(n))$. Finally we will show that this also improves the time complexity of CSP in Allen’s to $\mathcal{O}((2n)! \cdot poly(n)) = \mathcal{O}((0.74n)^{2n} \cdot poly(n))$.