We give a characterization of the sets of graphs that are both definable in Counting Monadic Second Order Logic (CMSO) and context-free, i.e., least solutions of Hyperedge-Replacement (HR) grammars introduced by Courcelle and Engelfriet. We prove the equivalence of these sets with: (a) recognizable sets (in the algebra of graphs with HR-operations) of bounded tree-width; we refine this condition further and show equivalence with recognizability in a finitely generated subalgebra of the HR-algebra of graphs; (b) parsable sets, for which there is a definable transduction from graphs to a set of derivation trees labelled by HR operations, such that the set of graphs is the image of the set of derivation trees under the canonical evaluation of the HR operations; (c) images of recognizable unranked sets of trees under a definable transduction, whose inverse is also definable. We rely on a novel connection between two seminal results, a logical characterization of context-free graph languages in terms of tree-to-graph definable transductions, by Courcelle and Engelfriet and a proof that an optimal-width tree decomposition of a graph can be built by an definable transduction, by Bojanczyk and Pilipczuk.
翻译:本文刻画了既在可数单子二阶逻辑(CMSO)中可定义又具有上下文无关性(即Courcelle与Engelfriet引入的超边替换(HR)文法的最小解)的图集。我们证明了这些图集与以下集合的等价性:(a)有界树宽的(在具有HR运算的图代数中的)可识别集合;我们进一步细化该条件,证明其等价于在HR图代数的有限生成子代数中的可识别性;(b)可解析集合,存在从图到由HR运算标记的派生树集合的可定义转换,使得该图集是派生树集合在HR运算规范求值下的像;(c)在可定义转换(其逆转换也可定义)下,可识别非定秩树集的像。我们的证明基于两项开创性成果之间的新颖联系:一是Courcelle与Engelfriet提出的基于树到图可定义转换的上下文无关图语言逻辑刻画,二是Bojanczyk与Pilipczuk证明的图的最优宽度树分解可通过可定义转换构建。