Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the immanant of a square matrix associated with an integer partition
ResourceFunction["Immanant"][p,m] gives the immanant of the square matrix m associated with the integer partition p. |
Immanants of a 2×2 symbolic matrix:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
All immanants of a 3×3 symbolic matrix:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Use exact arithmetic to compute the immanant:
| In[4]:= |
| In[5]:= |
| Out[5]= |
Use machine arithmetic:
| In[6]:= |
| Out[6]= |
Use 24-digit precision arithmetic:
| In[7]:= |
| Out[7]= |
Two graphs:
| In[8]:= |
| Out[8]= | ![]() |
The immanantal polynomial of a graph is the immanant of id x-m, where m is the corresponding adjacency matrix and id is the identity matrix of appropriate size.
Prove that two graphs are isomorphic by showing that all their corresponding immanantal polynomials are identical:
| In[9]:= | ![]() |
| In[10]:= | ![]() |
| Out[10]= |
This is consistent with the result of IsomorphicGraphQ:
| In[11]:= |
| Out[11]= |
The determinant is the immanant corresponding to the integer partition (1,1,…):
| In[12]:= |
| Out[13]= |
The permanent is the immanant corresponding to the integer partition (n):
| In[14]:= |
| Out[15]= |
Immanants are invariant under a symmetric permutation of rows and columns:
| In[16]:= | ![]() |
| Out[18]= |
| In[19]:= |
| Out[19]= |
Immanant evaluates only if the integer partition p is a weakly decreasing list of positive integers:
| In[20]:= |
| In[21]:= |
| Out[21]= |
| In[22]:= |
| Out[22]= |
In general, computing the immanant becomes slow even at modest dimension:
| In[23]:= |
| Out[23]= |
| In[24]:= |
| Out[24]= | ![]() |
Verify an identity for the immanant corresponding to the partition (3, 1, 1, …) according to Merris and Watkins (see citation in Source Metadata below):
| In[25]:= |
| Out[26]= | ![]() |
| In[27]:= | ![]() |
| Out[27]= |
This work is licensed under a Creative Commons Attribution 4.0 International License