arXiv:2610.25578cs.DSOct 2026

Manuscript Offprint

arXiv:2610.25578

Searching subgraphs

Dariusz Dereniowski, Boting Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We consider graph search models, in which an invisible, omniscient and fast intruder can hide anywhere in the graph, and the goal is to design a search strategy composed of a sequence of movements of searchers that guarantees the capture of the intruder regardless of its actions. Our point of departure is the connected search model in which the cleared subgraph is always connected during the search process. In this paper, we initiate the study of the subgraph searching problems which arise from the following question: what happens if the number of searchers available is not sufficient to clear a given graph GG? We propose an approach in which one wants to clear in a connected way as large subgraph as possible with the given kk searchers. In this context we study two problems: one problem, called the subgraph search, is to find the maximum-sized subgraph whose search number is at most kk, and the other one, called the protected subgraph search, is to perform a partial search on GG leading to as many cleared edges as possible. Informally speaking, the difference lies in the fact that in the latter a recontamination may come from an edge never to be cleared and hence the partial search strategy needs to avoid such recontaminations. Having proved that both problems are computationally hard in general, we give efficient algorithms for nn-vertex trees: an O(min⁡{kn,nlog⁡n})\mathcal{O}(\min\{kn, n \log n\}) time algorithm for the subgraph search and an O(min⁡{26kkn,n8.571log⁡n})\mathcal{O}(\min\{2^{6k}kn, n^{8.571} \log n\}) time algorithm for the protected subgraph search.

Keywords: graph search, subgraph search, connected search, trees, pathwidth

1 Introduction

Graph searching was introduced by Parsons in a setting of continuous functions on graphs [20], and the discrete version of this problem, called edge searching, was introduced later by Megiddo et al. [18]. The problem was of interest to spelunkers even in the 1960s [7]. The original problem was about finding a lost spelunker in a cave system, but the problem has much wider applications. We are interested in searching as a problem in network security, looking for methods to clean a network infected by a computer virus or methods to capture a mobile intruder using software agents. In the literature, graph searching has been linked to graph width parameters (e.g., treewidth [21, 1] and pathwidth [16, 22]), to ensuring privacy when using bugged channels [13], and to VLSI circuit design [11]. A survey of results can be found in [12, 6].

Throughout this paper, we only deal with finite graphs with no loops or multiple edges. Let G=(V,E)G = (V, E) be a graph with vertex set VV and edge set EE. The vertex set and edge set of GG are denoted as V(G)V(G) and E(G)E(G), respectively. An edge with endpoints uu and vv is denoted by uvuv. The degree of a vertex v∈V(G)v \in V(G), denoted deg⁡G(v)\deg_G(v), is the number of edges incident on vv.

Let G be a graph that contains an intruder hiding somewhere on an edge or vertex (G can be considered as an embedding in the three dimensional Euclidean space). The intruder is invisible to searchers, and he can move arbitrarily fast from one location to another along a path that contains no searchers. An edge e is called contaminated if there exists a path that is free of searchers and connects an endpoint of e with an endpoint of an edge occupied by the intruder. The searchers want to capture the intruder, or we also say that they want to clear the graph.

Formally, in the edge search model introduced by Megiddo et al. [18], G initially does not contain searchers, which means that all edges and vertices of G are contaminated. There are three actions for searchers: (i) place a searcher on a vertex, (ii) remove a searcher from a vertex, and (iii) slide a searcher along an edge from one endpoint to the other. An edge search strategy for G is a sequence of actions that clear G after the final action, that is, all edges and vertices become clear according to the following rules of clearing them. An edge uv∈E(G)uv \in E(G) is cleared in one of the following two ways by a sliding action:

• two searchers are located on the vertex u, and one of them slides along uv from u to v; or

  • a searcher is located on vertex u where all edges incident with u except uv are already cleared, and the searcher slides from u to v.

Let DiD_i be the set of contaminated edges at the end of the ii-th action. Initially D0=E(G)D_0 = E(G) prior to the first action. Given DiD_i, the set Di+1D_{i+1} consists of exactly those edges ee such that (1) e∈Die \in D_i and ee is not cleared by the (i+1)(i+1)-th action, or (2) e∉Die \notin D_i but there is a path of length at least two in the graph whose last edge is ee, the first edge is in DiD_i which is not cleared by the (i+1)(i+1)-th action, and no internal vertex of the path is occupied by a searcher. A search strategy is called monotonic if Di+1⊆DiD_{i+1} \subseteq D_i for all i≥0i \geq 0.

In the edge search model, the minimum number of searchers required to clear all edges of G is called the edge search number of G, denoted es(G)\text{es}(G). An edge search strategy for G is optimal if this strategy clears G using es(G)\text{es}(G) searchers. Megiddo et al. [18] showed that the edge search problem is NP-hard. Membership in NP follows from the monotonicity result of LaPaugh [17], where it is shown that for any graph G, there is always a monotonic edge search strategy that clears G using es(G)\text{es}(G) searchers. Bienstock and Seymour [5] significantly simplified LaPaugh's proof of monotonicity.

In this paper, we consider the connected search model, which has the same setting as the edge search model except an additional condition for the cleared area: the subgraph formed by cleared edges is connected after every action. For convenience, throughout this paper we assume that all searchers are initially placed on a single vertex, which is called the homebase. We write GxG^{x} for a graph G whose homebase is x.

In the connected search model, since we only consider connected graphs and all searchers are initially stationed on the homebase, placing actions and removing actions can be avoided without increasing the number of searchers. So there will be no placing actions and no removing actions in our connected search strategies. Thus, we define a connected search strategy for GxG^{x} as a sequence of sliding actions (or moves) that clear all edges of GxG^{x}. We want to find the minimum number of searchers that can clear all edges of GxG^{x}. This minimum number is called the connected search number of GxG^{x}, denoted cs(Gx)\text{cs}(G^{x}). A connected search strategy for GxG^{x} is optimal if this strategy clears GxG^{x} using cs(Gx)\text{cs}(G^{x}) searchers. Unlike the edge searching where any graph G has a monotonic edge search strategy using es(G)\text{es}(G) searchers, Yang et al. [23] showed that there are graphs where the connected search number is strictly less than the monotonic connected search number, which means that the connected search is not monotonic. Dereniowski [10] showed that any connected search strategy using k searchers can be converted into a monotonic connected search strategy that uses 2k+32k + 3 searchers and starts at an arbitrary homebase. The monotonic connected search number of a graph GxG^x is denoted by mcs(Gx)\text{mcs}(G^x). We recall an interesting open question that asks whether the connected search is in NP or not.