How to extract specific (4-node star ) motifs from an ego graph?

I have an ego graph (1 hop) and need the frequencies of the ten 4-node star motifs (as in the attached image). I experimented with motifs_randesu(size=4) and Isoclass(). Is there a way to speed up the extraction? How to limit the process to only the ten motifs I’m interested in?

That’s what you need to use.

The algorithm implemented in igraph is already very efficient. The only realistic way to save time is to do sampling instead of complete counting. I explain how to do this in the documentation of IGraph/M, igraph’s Mathematica interface. You need the cut_prob parameter.

See “Estimating motif counts in large graphs”

This question is based on a misconception. Every four-vertex connected subgraph is considered and classified. Before classifying a subgraph, you wouldn’t know if you want to exclude it, right?