News for hackers. Stuff that matters.
Re:A Gentle Introduction to Graph Neural Networks by hi_hi on Friday December 20, 2024 @05:17PM (#42475626)
I feel very dumb. There is an example on that page with 4 nodes (a,b,c,d) and it shows a total of 24 possible combinations.

What is the generalised formula for calculating this, given the number of nodes but also edges need to be considered.

It doesn't appear to be explained in the article. I think it may be a factorial?

Re:A Gentle Introduction to Graph Neural Networks by throwameme on Saturday December 21, 2024 @09:29AM (#42479890)
i think one could use a binomial coefficient to do this or nested binomials

like (n choose 4)

maybe multiply the binomial by 2 because each edge can be present or absence in vertices

Re:A Gentle Introduction to Graph Neural Networks by TrueDuality on Sunday December 22, 2024 @05:47PM (#42489842)
Combinatorial can be quickly calculated primarily using factorials. 4 possible options, each where you're picking all 4 exactly once is 4!. The reasoning is pretty intuitive, when you start selecting there are four options, when you go to pick the next one there are 3 left in the pool, then 2, and finally 1. This turns into 4 * 3 * 2 * 1 = 24.

This site seems to have a pretty good overview of them if you'd like to become more familiar: https://www.geeksforgeeks.org/mathematics-combinatorics-basi...