Hostname: page-component-74656f9884-rngvg Total loading time: 0 Render date: 2026-11-06T08:01:34.922Z Has data issue: false hasContentIssue false

Colorful path detection in vertex-colored temporal

Published online by Cambridge University Press:  18 August 2023

Riccardo Dondi*
Affiliation:
University of Bergamo, Bergamo, Italy
Mohammad Mehdi Hosseinzadeh*
Affiliation:
University of Bergamo, Bergamo, Italy
*
Corresponding authors: Riccardo Dondi, Mohammad Mehdi Hosseinzadeh; Emails: riccardo.dondi@unibg.it, m.hosseinzadeh@unibg.it
Corresponding authors: Riccardo Dondi, Mohammad Mehdi Hosseinzadeh; Emails: riccardo.dondi@unibg.it, m.hosseinzadeh@unibg.it
Rights & Permissions [Opens in a new window]

Abstract

Finding paths is a fundamental problem in graph theory and algorithm design due to its many applications. Recently, this problem has been considered on temporal graphs, where edges may change over a discrete time domain. The analysis of graphs has also taken into account the relevance of vertex properties, modeled by assigning to vertices labels or colors. In this work, we deal with a problem that, given a static or temporal graph, whose vertices are colored graph looks for a path such that (1) the vertices of the path have distinct colors and (2) that path includes the maximum number of colors. We analyze the approximation complexity of the problem on static and temporal graphs, and we prove an inapproximability bound. Then, we consider the problem on temporal graphs, and we design a heuristic for it. We present an experimental evaluation of our heuristic, both on synthetic and real-world graphs. The experimental results show that for many instances of the problem, our method is able to return near-optimal solutions.

Information

Type
Research Article
Copyright
© The Author(s), 2023. Published by Cambridge University Press
Figure 0

Figure 1. An overview of the graph $G=(V, E,c)$ associated with $G_I$. Each box contains the set $V_i$ of vertices, with $0 \leq i \leq n+1$, and the path $p(V_i)$. For each vertex, its name is the left label, its colors are the right label. We assume that $\{ v_1, v_2 \} \in E_I$; hence, $c(v_{1,2})=c(v_{2,1})= c_{1,2}$, $\{ v_1, v_n \} \notin E_I$; hence, $c(v_{1,n}) = a_1^n$, $c(v_{n,1}) = a_n^1$, and $\{ v_2, v_n \} \in E_I$; hence, $c(v_{2,n})=c(v_{n,2})= c_{2,n}$.

Figure 1

Table 1. Performance of CTPLS on synthetic datasets, where the number of colors ranges from 10 to 50. Minimum, maximum, average, and standard deviation over 1000 independent synthetic networks for each different color sets are reported. Notice that the average running time is in seconds

Figure 2

Table 2. Performance of CTPLS on real datasets. The value of the time (in minutes) and the value of return solution (path) for the Max CPTG problem are reported for two different color sets (30 and 50)

Figure 3

Table 3. Performance of the local search phases (LS1 and LS2) of CTPLS on synthetic datasets. The values in the table are the average improvements of LS1 with respect to the solutions returned by preliminary step and the average improvements of LS2 with respect to the solutions computed by LS1

Figure 4

Table 4. Performance of CTPLS on real datasets. The value of the time (in minutes) and the value of return solution for the preliminary step (first solution), local search edge replacement (LS1), and local search vertex replacement (LS2) are reported for two different color sets (30 and 50)