cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A208356 Number of labeled star-like graphs on n vertices.

This page as a plain text file.
%I A208356 #12 Jan 04 2019 04:50:52
%S A208356 1,2,8,61,762,13204,300155,8950176
%N A208356 Number of labeled star-like graphs on n vertices.
%C A208356 Graph G is called star-like if and only if one of its clique trees forms a star.
%C A208356 The first seven terms published in the Bina Ph.D. thesis.
%H A208356 V. Bina, <a href="https://insis.vse.cz/zp/index.pl?prehled=vyhledavani;podrobnosti_zp=32066;zp=32066;dinfo_jazyk=3">Multidimensional probability distributions: Structure and learning</a>, Ph.D. Thesis. Fac. of Management, University of Economics in Prague (2011)
%o A208356 # R code
%o A208356 library(igraph)
%o A208356 bits <- function(x, n) { # decodes binary representation of graphs
%o A208356   list <- NULL
%o A208356   while (x > 0) {
%o A208356      list <- c(list, x %% 2)
%o A208356      x <- x %/% 2
%o A208356   }
%o A208356   while (length(list) < n) {list <- c(list,0)}
%o A208356   return(list)
%o A208356 }
%o A208356 n<-5 # number of vertices
%o A208356 edges <- choose(n,2)
%o A208356 models <- 0:(2^edges-1) # all graphs on n vertices
%o A208356 mat <- matrix(rep(0,n^2),ncol=n) #adjacency matrix
%o A208356 nstar <- 0
%o A208356 for (m in models) {
%o A208356     mat[lower.tri(mat)] <- bits(m,hran)
%o A208356     l <- maximal.cliques(graph.adjacency(mat,mode="lower"))
%o A208356     aux <- factor(unlist(l))
%o A208356     l <- lapply(l,setdiff, levels(aux)[tabulate(aux) == 1])
%o A208356     l <- lapply(l,setdiff,l[[which.max(unlist(lapply(l,length)))]])
%o A208356     if (sum(unlist(lapply(l,length))) < 1) nstar <- nstar + 1
%o A208356 }
%o A208356 nstar
%Y A208356 Cf. A179534, A006125, A058862 (sub- and superclasses)
%K A208356 nonn
%O A208356 1,2
%A A208356 _Vladislav Bina_, Feb 25 2012