This makes the R session crash quite reliably (about at least once every ten attempts):
library(anticlust)
N <- 100
K <- N/2
cannot_link <- c(1, rep(2:(N-1), each = 2), N)
cannot_link <- matrix(cannot_link, ncol = 2, byrow = TRUE)
cannot_link <- rbind(cannot_link, t(apply(cannot_link, 1, rev)))
mat <- matrix(1, nrow = N, ncol = N)
mat[cannot_link] <- -1
anticlustering(mat, K = K, objective = "dispersion")
I get
*** caught segfault ***
address (nil), cause 'unknown'