A linear time and space algorithm for detecting path intersection in Zd

  • Authors:
  • Sreko Brlek;Michel Koskas;Xavier Provençal

  • Affiliations:
  • Laboratoire de Combinatoire et dInformatique Mathématique, Université du Québec à Montréal, C. P. 8888 Succursale Centre-Ville, Montréal (QC), Canada H3C 3P8;UMR AgroParisTech/INRA 518, 16 rue Claude Bernard 75 231 Paris Cedex 05, France;LAMA, CNRS UMR 5127, Université de Savoie, 73376 Le Bourget-du-lac cedex, France

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2011

Quantified Score

Hi-index 5.23

Visualization

Abstract

The Freeman chain code is a common and useful way for representing discrete paths by means of words such that each letter encodes a step in a given direction. In the discrete plane Z^2 such a coding is widely used for representing connected discrete sets by their contour which forms a closed and intersection free path. In this paper, we use a multidimensional radix tree like data structure for storing paths in the discreted-dimensional space Z^d. It allows to design a simple and efficient algorithm for detecting path intersection. Even though an extra initialization is required, the time and space complexities remain linear for any fixed dimension d. Several problems that are solved by adapting our algorithm are also discussed.