Driven by applications in the natural, social and computer sciences several algorithms have been proposed to enumerate all sets $X\s V$ of vertices of a graph $G=(V,E)$ that induce a {\it connected} subgraph. We offer two algorithms for enumerating all $X$'s that induce (more exquisite) {\it metric} subgraphs. Specifically, the first algorithm, called {\tt AllMetricSets}, generates these $X$'s in a compressed format. The second algorithm generates all (accessible) metric sets one-by-one but is provably output-polynomial. Mutatis mutandis the same holds for the geodesically-convex sets $X\s V$, this being a natural strengthening of "metric". The Mathematica command {\tt BooleanConvert} features prominently.
翻译:受自然科学、社会科学和计算机科学领域应用的驱动,已有多种算法被提出用于枚举图$G=(V,E)$中所有能诱导出{\it 连通}子图的顶点子集$X\subseteq V$。本文提出了两种算法,用于枚举所有能诱导出(更为精细的){\it 度量}子图的$X$。具体而言,第一种算法(称为{\tt AllMetricSets})以压缩格式生成这些$X$。第二种算法逐个生成所有(可访问的)度量子集,且被证明是输出多项式的。经过相应修改后,该结论同样适用于测地凸子集$X\subseteq V$——这是“度量”概念的一种自然强化形式。Mathematica命令{\tt BooleanConvert}在算法实现中具有重要作用。