knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This is replication code for the manuscript by Hu and Evans (2022).
library(imset)
data(bidi5) dm <- logical(length(bidi5)) for (i in seq_along(bidi5)) { dm[i] <- defines_mod(bidi5[[i]]) } cat(sum(dm), " imsets define the model out of ", length(dm), "\n", sep="")
Which graph fails to define the model?
bidi5[[which(!dm)]]
We can take the same approach for graphs of size 6, but we don't evaluate it here for reasons of time.
data(bidi6) dm <- logical(length(bidi6)) for (i in seq_along(bidi6)) { dm[i] <- defines_mod(bidi6[[i]]) } cat(sum(dm), " imsets define the model out of ", length(dm), "\n", sep="")
We can also check that the decomposition given in Section 5 gives the same results as the integer linear program.
dmZH <- logical(length(bidi5)) for (i in seq_along(bidi5)) { dmZH[i] <- test_decomp_ZH(bidi5[[i]]) } which(dm != dmZH)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.