A Linear Time and Space Algorithm for Detecting Path Intersection

  • Srečko Brlek
  • Michel Koskas
  • Xavier Provençal
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5810)

Abstract

For discrete sets coded by the Freeman chain describing their contour, several linear algorithms have been designed for determining their shape properties. Most of them are based on the assumption that the boundary word forms a closed and non-intersecting discrete curve. In this article, we provide a linear time and space algorithm for deciding whether a path on a square lattice intersects itself. This work removes a drawback by determining efficiently whether a given path forms the contour of a discrete figure. This is achieved by using a radix tree structure over a quadtree, where nodes are the visited grid points, enriched with neighborhood links that are essential for obtaining linearity.

Keywords

Freeman code lattice paths self-intersection radix tree discrete figures data structure 

References

  1. 1.
    Freeman, H.: On the encoding of arbitrary geometric configurations. IRE Trans. Electronic Computer 10, 260–268 (1961)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Freeman, H.: Boundary encoding and processing. In: Lipkin, B., Rosenfeld, A. (eds.) Picture Processing and Psychopictorics, pp. 241–266. Academic Press, New York (1970)Google Scholar
  3. 3.
    Brlek, S., Labelle, G., Lacasse, A.: A note on a result of Daurat and Nivat. In: De Felice, C., Restivo, A. (eds.) DLT 2005. LNCS, vol. 3572, pp. 189–198. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Brlek, S., Labelle, G., Lacasse, A.: Properties of the contour path of discrete sets. Int. J. Found. Comput. Sci. 17(3), 543–556 (2006)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Debled-Rennesson, I., Rémy, J.L., Rouyer-Degli, J.: Detection of the discrete convexity of polyominoes. Discrete Appl. Math. 125(1), 115–133 (2003)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Brlek, S., Lachaud, J.O., Provençal, X.: Combinatorial view of digital convexity. In: Coeurjolly, D., Sivignon, I., Tougne, L., Dupont, F. (eds.) DGCI 2008. LNCS, vol. 4992, pp. 57–68. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. 7.
    Brlek, S., Lachaud, J.O., Provençal, X., Reutenauer, C.: Lyndon+Christoffel = digitally convex. Pattern Recognition 42, 2239–2246 (2009)CrossRefMATHGoogle Scholar
  8. 8.
    Brlek, S., Provençal, X., Fédou, J.M.: On the tiling by translation problem. Discr. Appl. Math. 157, 464–475 (2009)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Provençal, X.: Combinatoire des mots, géométrie discrète et pavages. PhD thesis, D1715, Université du Québec à Montréal (2008)Google Scholar
  10. 10.
    Finkel, R., Bentley, J.: Quad trees: A data structure for retrieval on composite keys. Acta Informatica 4(1), 1–9 (1974)CrossRefMATHGoogle Scholar
  11. 11.
    Knuth, D.E.: The Art of Computer Programming, Sorting and Searching, vol. 3. Addison-Wesley, Reading (1998)MATHGoogle Scholar
  12. 12.
    Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press, Cambridge (2005)CrossRefMATHGoogle Scholar
  13. 13.
    Labbé, S.: Personal communication (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Srečko Brlek
    • 1
  • Michel Koskas
    • 2
  • Xavier Provençal
    • 3
    • 4
  1. 1.Laboratoire de Combinatoire et d’Informatique MathématiqueUniversité du Québec à MontréalMontréalCanada
  2. 2.UMR AgroParisTech/INRA 518Paris Cedex 05France
  3. 3.LAMAUniversité de SavoieLe Bourget du LacFrance
  4. 4.LIRMMUniversité Montpellier IIMontpellierFrance

Personalised recommendations