One Hat Cyber Team
Your IP :
216.73.216.14
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
Macaulay2
/
Permanents
/
html
/
View File Name :
_glynn.html
<!DOCTYPE html> <html lang="en"> <head> <title>glynn -- compute permanent using Glynn's formula</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link type="text/css" rel="stylesheet" href="../../../../Macaulay2/Style/doc.css"> <link rel="stylesheet" href="../../../../Macaulay2/Style/katex/katex.min.css"> <script defer="defer" src="../../../../Macaulay2/Style/katex/katex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/auto-render.min.js"></script> <script> var macros = { "\\break": "\\\\", "\\ZZ": "\\mathbb{Z}", "\\NN": "\\mathbb{N}", "\\QQ": "\\mathbb{Q}", "\\RR": "\\mathbb{R}", "\\CC": "\\mathbb{C}", "\\PP": "\\mathbb{P}" }, delimiters = [ { left: "$$", right: "$$", display: true}, { left: "\\[", right: "\\]", display: true}, { left: "$", right: "$", display: false}, { left: "\\(", right: "\\)", display: false} ], ignoredTags = [ "kbd", "var", "samp", "script", "noscript", "style", "textarea", "pre", "code", "option" ]; document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { delimiters: delimiters, macros: macros, ignoredTags: ignoredTags, trust: true }); }); </script> <style>.katex { font-size: 1em; }</style> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/copy-tex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/render-a11y-string.min.js"></script> <script src="../../../../Macaulay2/Style/prism.js"></script> <script>var current_version = '1.25.06';</script> <script src="../../../../Macaulay2/Style/version-select.js"></script> <link type="image/x-icon" rel="icon" href="../../../../Macaulay2/Style/icon.gif"> </head> <body> <div id="buttons"> <div> <a href="https://macaulay2.com/">Macaulay2</a> <span id="version-select-container"></span> » <a title="Macaulay2 documentation" href="../../Macaulay2Doc/html/index.html">Documentation </a> <br><a href="../../Macaulay2Doc/html/_packages_spprovided_spwith_sp__Macaulay2.html">Packages</a> » <span><a title="Computes the permanent of a square matrix." href="index.html">Permanents</a> :: <a title="compute permanent using Glynn's formula" href="_glynn.html">glynn</a></span> </div> <div class="right"> <form method="get" action="https://www.google.com/search"> <input placeholder="Search" type="text" name="q" value=""> <input type="hidden" name="q" value="site:macaulay2.com/doc"> </form> <a href="_grenet.html">next</a> | <a href="index.html">previous</a> | <a href="_grenet.html">forward</a> | <a href="index.html">backward</a> | up | <a href="master.html">index</a> | <a href="toc.html">toc</a> </div> </div> <hr> <div> <h1>glynn -- compute permanent using Glynn's formula</h1> <ul> <li> <dl class="element"> <dt>Usage: </dt> <dd><code class="language-macaulay2">F = glynn M</code></dd> </dl> </li> <li>Inputs: <ul> <li><span><span class="tt">M</span>, <span>a <a title="the class of all matrices" href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, a square matrix in any commutative ring</span></li> </ul> </li> <li>Outputs: <ul> <li><span><span class="tt">F</span>, <span>a <a title="the class of all ring elements handled by the engine" href="../../Macaulay2Doc/html/___Ring__Element.html">ring element</a></span>, the permanent of <span class="tt">M</span></span></li> </ul> </li> </ul> <div> <h2>Description</h2> <div> <p>Uses Glynn's formula (see Glynn, David G. (2010), "The permanent of a square matrix", European Journal of Combinatorics 31 (7): 1887–1891, doi:10.1016/j.ejc.2010.01.010).</p> <p>Let $M=(m_{i,j})$ be an nxn matrix. Then $perm(M)=\sum_{\delta}\prod_{k=1}^n(\delta_k) \prod_{i=1}^n\sum_{j=1}^n \delta_j m_{i,j}$ where the outer summation is over $\delta\in \{ -1,+1\}^n$ with $\delta_1=1$.</p> <p>For example, for the 3x3 generic matrix Glynn’s formula gives $2^2 perm(M) =(a + b + c)(d + e + f)(g + h + i) − (a − b + c)(d − e + f)(g − h + i) −(a + b − c)(d + e − f)(g + h − i) + (a − b − c)(d − e − f)(g − h − i)$.</p> <p>Here is the permanent of a 3x3 generic matrix of variables.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i1 : R = QQ[vars(0..8)] o1 = R o1 : PolynomialRing</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i2 : M = genericMatrix(R,a,3,3) o2 = | a d g | | b e h | | c f i | 3 3 o2 : Matrix R <-- R</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i3 : glynn M o3 = c*e*g + b*f*g + c*d*h + a*f*h + b*d*i + a*e*i o3 : R</code></pre> </td> </tr> </table> <div> <p>Here is the permanent of a 4x4 generic matrix of variables.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i4 : R = QQ[vars(0..15)] o4 = R o4 : PolynomialRing</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i5 : M = genericMatrix(R,a,4,4) o5 = | a e i m | | b f j n | | c g k o | | d h l p | 4 4 o5 : Matrix R <-- R</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i6 : glynn M o6 = d*g*j*m + c*h*j*m + d*f*k*m + b*h*k*m + c*f*l*m + b*g*l*m + d*g*i*n + ------------------------------------------------------------------------ c*h*i*n + d*e*k*n + a*h*k*n + c*e*l*n + a*g*l*n + d*f*i*o + b*h*i*o + ------------------------------------------------------------------------ d*e*j*o + a*h*j*o + b*e*l*o + a*f*l*o + c*f*i*p + b*g*i*p + c*e*j*p + ------------------------------------------------------------------------ a*g*j*p + b*e*k*p + a*f*k*p o6 : R</code></pre> </td> </tr> </table> <div> <p>Here is the permanent of a 3x3 matrix of integers.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i7 : M=matrix{{1,2,3},{4,5,6},{7,8,9}} o7 = | 1 2 3 | | 4 5 6 | | 7 8 9 | 3 3 o7 : Matrix ZZ <-- ZZ</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i8 : glynn M o8 = 450</code></pre> </td> </tr> </table> </div> <div> <h2>Caveat</h2> <div> <p>Works in characteristic not equal to 2 because need to divide by $2^{n-1}$. Computationally intensive for moderate size matrices.</p> </div> </div> <div> <h2>See also</h2> <ul> <li><span><a title="ideal generated by square permanents of a matrix" href="../../Macaulay2Doc/html/_permanents.html">permanents</a> -- ideal generated by square permanents of a matrix</span></li> </ul> </div> <div> <div class="waystouse"> <h2>Ways to use <span class="tt">glynn</span>:</h2> <ul> <li><kbd>glynn(Matrix)</kbd></li> </ul> </div> <div class="waystouse"> <h2>For the programmer</h2> <p>The object <a title="compute permanent using Glynn's formula" href="_glynn.html">glynn</a> is <span>a <a title="a type of method function" href="../../Macaulay2Doc/html/___Method__Function.html">method function</a></span>.</p> </div> <hr> <div class="waystouse"> <p>The source of this document is in <span class="tt">Permanents.m2:489:0</span>.</p> </div> </div> </div> </body> </html>