Let φ be a sentence of \(\mathsf {CMSO}_2 \) (monadic second-order logic with quantification over edge subsets and counting modular predicates) over the signature of graphs. We present a dynamic data structure that for a given graph G that is updated by edge insertions and edge deletions, maintains whether φ is satisfied in G . The data structure is required to correctly report the outcome only when the feedback vertex number of G does not exceed a fixed constant k , otherwise it reports that the feedback vertex number is too large. With this assumption, we guarantee amortized update time \(\mathcal {O}_{\varphi,k}{(\log n)} \) . If we additionally assume that the feedback vertex number of G never exceeds k , this update time guarantee is worst-case. By combining this result with a classic theorem of Erdős and Pósa, we give a fully dynamic data structure that maintains whether a graph contains a packing of k vertex-disjoint cycles with amortized update time \(\mathcal {O}_{k}{(\log n)} \) . Our data structure also works in a larger generality of relational structures over binary signatures.
Read full abstract