xgi icon indicating copy to clipboard operation
xgi copied to clipboard

implement hyperedge adjacency matrices

Open maximelucas opened this issue 1 year ago • 4 comments

A collaborator would be interested if we had hyperedge adjacency matrices (see definition in page 10 of this preprint).

Basically, two k-edges are :

  • lower adjacent if they share a (k-1)-edge
  • upper adjacent if they are part of a common (k+1)-edge
  • adjacent if lower adjacent and not upper adjacent

The entries of the matrices are 1 for pairs of edges that are * adjacent, and 0 otherwise.

It feels similar to the intersection profile we currently have, but that one only counts the number nodes shared between two edges.

maximelucas avatar Jun 09 '23 09:06 maximelucas

Sounds compute intensive at first sight. Perhaps there are some optimizations possible using maximal edges.

leotrs avatar Jun 09 '23 10:06 leotrs

I agree. Or with boundary matrices $B_k$, just like incidence matrices $I$, but giving the relationships between k and k-1 edges. The intersection profile is $P = I^T I$. Would this not be something like $A_k = B_k^T B_k$? @Marconurisso any thoughts?

maximelucas avatar Jun 09 '23 10:06 maximelucas

You would need perhaps to subtract a higher order (co?)boundary matrix...

leotrs avatar Jun 09 '23 12:06 leotrs

You can get the lower adjacency matrix of order k simply by taking the nonzero elements of the down Laplacian $L_k = (B_k^\top B_k \neq 0)$ and, vice versa, you get the upper adjacency matrix from the nonzero elements of the up Laplacian $U_k = (B_{k+1}B_{k+1}^\top \neq 0)$. The adjacency would then be something like $A_k = L_k \odot (1 - U_k)$ i think.

Marconurisso avatar Jun 10 '23 08:06 Marconurisso