Mathematics (Jun 2023)

The Longest (<i>s</i>, <i>t</i>)-Path Problem on <i>O</i>-Shaped Supergrid Graphs

  • Fatemeh Keshavarz-Kohjerdi,
  • Ruo-Wei Hung

DOI
https://doi.org/10.3390/math11122712
Journal volume & issue
Vol. 11, no. 12
p. 2712

Abstract

Read online

The longest (s,t)-path problem on supergrid graphs is known to be NP-complete. However, the complexity of this problem on supergrid graphs with or without holes is still unknown.In the past, we presented linear-time algorithms for solving the longest (s,t)-path problem on L-shaped and C-shaped supergrid graphs, which form subclasses of supergrid graphs without holes. In this paper, we will determine the complexity of the longest (s,t)-path problem on O-shaped supergrid graphs, which form a subclass of supergrid graphs with holes. These graphs are rectangular supergrid graphs with rectangular holes. It is worth noting that O-shaped supergrid graphs contain L-shaped and C-shaped supergrid graphs as subgraphs, but there is no inclusion relationship between them. We will propose a linear-time algorithm to solve the longest (s,t)-path problem on O-shaped supergrid graphs. The longest (s,t)-paths of O-shaped supergrid graphs have applications in calculating the minimum trace when printing hollow objects using computer embroidery machines and 3D printers.

Keywords