## Abstract

Embedding an interconnection network into another network is one of the important problems in parallel processing. In this paper, we study embedding of linear arrays (paths) of maximum length in *O*-shaped meshes (*O*-shaped grid graphs). This is equal to finding a longest path in an *O*-shaped mesh (grid graph). An *O*-shaped mesh is a 2D mesh that a smaller 2D mesh is removed from it. The removed nodes can be considered as faulty processor. We give a linear-time parallel algorithm for this problem. To show the algorithm finds an optimal path, first we prove some upper bounds on the length of the longest paths, then we show that how our algorithm meets these upper bounds.

### Similar content being viewed by others

## References

Asgharian-Sardroud A, Bagheri A (2016) An approximation algorithm for the longest path problem in solid grid graphs. Optim Methods Softw 31(3):47–493

Abuelrub EM (1993) Interconnection networks embeddings and efficient parallel computations, Louisiana State University and Agricultural & Mechanical College, PhD Thesis

Björklund A, Husfeldt T (2003) Finding a path of superlogarithmic length, SIAM. J Comput 32:1395–1402

Chen SD, Shen H, Topor R (2002) An efficient algorithm for constructing Hamiltonian paths in meshes. Parallel Comput 28:1293–1305

Chang RY, Hsu CH, Peng S (2012) The longest path problem on permutation graphs, The 29th Workshop on Combinatorial Mathematics and Computation Theory, pp. 294–297

Cohen Y, Stern R, Felner A (2020) Solving the Longest Simple Path Problem with Heuristic Search, Proceedings of the Thirtieth International Conference on Automated Planning and Scheduling (ICAPS 2020), pp. 75–79

Fieger K, Balyo T, Schulz C, Schreiber D (2019) Finding optimal longest paths by dynamic programming in parallel, In Proceedings of the Twelfth International Symposium on Combinatorial Search (SoCS 2019), Napa, California, AAAI Press, pp. 61–69

Ghosh E, Narayanaswamy NS, Rangan CP (2011) A polynomial time algorithm for longest paths in biconvex graphs, International Workshop on Algorithms and Computation WALCOM 2011: WALCOM: Algorithms and Computation, pp. 191–201

Guo YL, Ho CW, Ko MT (2013) The longest path problem on distance-hereditary graphs. Adv Intell Syst Appl 1:69–77

Gutin G (1993) Finding a longest path in a complete multipartite digraph. SIAM J. Discrete Math. 6:270–273

Ioannidou K, Mertzios GB, Nikolopoulos SD (2009) The longest path problem is polynomial on interval graphs, International Symposium on Mathematical Foundations of Computer Science MFCS 2009: Mathematical Foundations of Computer Science, pp. 403–414

Itai A, Papadimitriou CH, Szwarcfiter JL (1982) Hamiltonian paths in grid graphs, SIAM. J Comput 11:676–686

Karger D, Montwani R, Ramkumar GDS (1997) On approximating the longest path in a graph. Algorithmica 18:82–98

Keshavarz-Kohjerdi F, Bagheri A, Asgharian-Sardroud A (2012) A linear-time algorithm for the longest path problem in rectangular grid graphs. Discrete Appl Math 160:210–217

Keshavarz-Kohjerdi F, Bagheri A (2013) An efficient parallel algorithm for the longest path problem in rectangular grid graphs. J Supercomput 65:723–741

Keshavarz-Kohjerdi F, Bagheri A (2016) Hamiltonian paths in \(L\)-shaped grid graphs. Theor Comput Sci 621:37–56

Keshavarz-Kohjerdi F, Bagheri A (2018) Longest \((s, t)\)-paths in \(L\)-shaped grid graphs. Optim Methods Softw 34:797–826

Keshavarz-Kohjerdi F, Bagheri A (2017) A linear-time algorithm for finding Hamiltonian \((s, t)\)-paths in even-sized rectangular grid graphs with a rectangular hole. Theor Comput Sci 690:26–58

Keshavarz-Kohjerdi F, Bagheri A (2017) A linear-time algorithm for finding Hamiltonian \((s, t)\)-paths in odd-sized rectangular grid graphs with a rectangular hole. J Supercomput 73:3821–3860

Keshavarz-Kohjerdi F, Bagheri A (2020) Linear-time algorithms for finding Hamiltonian and longest \((s, t)\)-paths in \(C\)-shaped grid graphs. Discrete Optim. https://doi.org/10.1016/j.disopt.2019.100554

Mertzios GB, Corneil DG (2013) The longest path problem is polynomial on cocomparability graphs. Algorithmica 65:177–205

Rahman MS, Kaykobad M (2005) On Hamiltonian cycles and Hamiltonian paths. Inf Process Lett 94:37–41

Uehara R, Uno Y (2007) On computing longest paths in small graph classes. Int J Found Comput Sci 18:911–930

Xu JM, Ma M (2009) Survey on path and cycle embedding in some networks. Front Math China 4:217–252

Zhang Z, Li H (2007) Algorithms for long paths in graphs. Theor Comput Sci 377:25–34

Zhang WQ, Liu YJ (2011) Approximating the longest paths in grid graphs. Theor Comput Sci 412:5340–5350

Du ZZ, Xu JM (2011) A note on cycle embedding in hypercubes with faulty vertices. Inf Process Lett 111(12):557–560

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

## About this article

### Cite this article

Keshavarz-Kohjerdi, F. Embedding linear arrays of the maximum length in *O*-shaped meshes.
*J Supercomput* **78**, 884–918 (2022). https://doi.org/10.1007/s11227-021-03895-1

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s11227-021-03895-1