The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Determinants and Permanents The determinant of a matrix M is defined as the sum over all n! possible permutations of the n columns of M: where is the number of pairs of elements out of order (called inversions) in permutation . A direct implementation of this definition yields an O(n!) algorithm, as does the cofactor expansion method we learned in high school. However, better algorithms are available to evaluate determinants based on LU-decomposition. They are discussed in Section . The determinant of M is simply the product of the diagonal elements of the LU-decomposition of M, which can be found in time. A closely related function, called the permanent, arises often in combinatorial problems. For example, the permanent of the adjacency matrix of a graph G counts the number of perfect matchings in G. The permanent of a matrix M is defined by differing from the determinant only in that all products are positive. Surprisingly, it is NP-hard to compute the permanent, even though the determinant can easily be computed in time. The fundamental difference is that , while . Fortunately, there are permanent algorithms that prove to be considerably faster than the O(n!) definition, running in time. Thus finding the permanent of a matrix is not out of the realm of possibility. Implementations: The linear algebra package LINPACK contains a variety of Fortran routines for computing determinants, optimized for different data types and matrix structures. It can be obtained from Netlib, as discussed in Section . A C++ program to compute determinants in time is embedded in LEDA (see Section ). Nijenhuis and Wilf [NW78] provide an efficient Fortran routine to compute the permanent of a matrix. See Section . Notes: Cramer's rule reduces the problems of matrix inversion and solving linear systems to that of computing determinants. However, algorithms based on LU-determination are faster. See [BM53] for an file:///E|/BOOK/BOOK3/NODE139.HTM (2 of 3) [19/1/2003 1:30:19]
Determinants and Permanents exposition on Cramer's rule. Determinants can be computed in time using fast matrix multiplication, as shown in [AHU83]. Section discusses such algorithms. A fast algorithm for computing the sign of the determinant, an important problem for performing robust geometric computations, is due to Clarkson [Cla92]. The problem of computing the permanent was shown to be #P-complete by Valiant [Val79], where #P is the class of problems solvable on a ``counting'' machine in polynomial time. A counting machine returns the number of distinct solutions to a problem. Counting the number of Hamiltonian cycles in a graph is a #P-complete problem that is trivially NP-hard (and presumably harder), since any count greater than zero proves that the graph is Hamiltonian. Counting problems can be #P-complete even if the corresponding decision problem can be solved in polynomial time, as shown by the permanent and perfect matchings. Minc [Min78] is the definitive work on permanents. A variant of an -time algorithm due to Ryser for computing the permanent is presented in [NW78]. Recently, probabilistic algorithms have been developed for estimating the permanent [FJ95]. Related Problems: Solving linear systems (see page ), matching (see page ), geometric primitives (see page ). Next: Constrained and Unconstrained Optimization Up: Numerical Problems Previous: Matrix Multiplication Algorithms Mon Jun 2 23:33:50 EDT 1997 file:///E|/BOOK/BOOK3/NODE139.HTM (3 of 3) [19/1/2003 1:30:19]
- Page 337 and 338: Approximating Vertex Cover Next: Th
- Page 339 and 340: The Euclidean Traveling Salesman Ne
- Page 341 and 342: The Euclidean Traveling Salesman Ne
- Page 343 and 344: Exercises 1. Prove that the low deg
- Page 345 and 346: Data Structures Next: Dictionaries
- Page 347 and 348: Dictionaries Next: Priority Queues
- Page 349 and 350: Dictionaries use a function that ma
- Page 351 and 352: Dictionaries Implementation-oriente
- Page 353 and 354: Priority Queues ● Besides access
- Page 355 and 356: Priority Queues Fibonacci heaps [FT
- Page 357 and 358: Suffix Trees and Arrays Figure: A t
- Page 359 and 360: Suffix Trees and Arrays [GBY91]. Se
- Page 361 and 362: Graph Data Structures algorithms).
- Page 363 and 364: Graph Data Structures including the
- Page 365 and 366: Set Data Structures Next: Kd-Trees
- Page 367 and 368: Set Data Structures parent pointers
- Page 369 and 370: Kd-Trees Next: Numerical Problems U
- Page 371 and 372: Kd-Trees about p. Say we are lookin
- Page 373 and 374: Numerical Problems Next: Solving Li
- Page 375 and 376: Numerical Problems Mon Jun 2 23:33:
- Page 377 and 378: Solving Linear Equations algorithm
- Page 379 and 380: Solving Linear Equations Matrix inv
- Page 381 and 382: Bandwidth Reduction images near eac
- Page 383 and 384: Matrix Multiplication Next: Determi
- Page 385 and 386: Matrix Multiplication The linear al
- Page 387: Determinants and Permanents Next: C
- Page 391 and 392: Constrained and Unconstrained Optim
- Page 393 and 394: Constrained and Unconstrained Optim
- Page 395 and 396: Linear Programming variable assignm
- Page 397 and 398: Linear Programming The book [MW93]
- Page 399 and 400: Random Number Generation Next: Fact
- Page 401 and 402: Random Number Generation is largely
- Page 403 and 404: Random Number Generation Related Pr
- Page 405 and 406: Factoring and Primality Testing The
- Page 407 and 408: Factoring and Primality Testing Alg
- Page 409 and 410: Arbitrary-Precision Arithmetic If y
- Page 411 and 412: Arbitrary-Precision Arithmetic PARI
- Page 413 and 414: Knapsack Problem Next: Discrete Fou
- Page 415 and 416: Knapsack Problem is a subset of S'
- Page 417 and 418: Discrete Fourier Transform Next: Co
- Page 419 and 420: Discrete Fourier Transform an algor
- Page 421 and 422: Combinatorial Problems Next: Sortin
- Page 423 and 424: Sorting Next: Searching Up: Combina
- Page 425 and 426: Sorting The simplest approach to ex
- Page 427 and 428: Sorting operations, implying an sor
- Page 429 and 430: Searching large performance improve
- Page 431 and 432: Searching Notes: Mehlhorn and Tsaka
- Page 433 and 434: Median and Selection followed by fi
- Page 435 and 436: Generating Permutations Next: Gener
- Page 437 and 438: Generating Permutations The rank/un
Determinants and Permanents<br />
exposition on Cramer's rule.<br />
Determinants can be computed in time using fast matrix multiplication, as shown in [AHU83].<br />
Section discusses such algorithms. A fast algorithm for computing the sign of the determinant, an<br />
important problem for performing robust geometric computations, is due to Clarkson [Cla92].<br />
<strong>The</strong> problem of computing the permanent was shown to be #P-complete by Valiant [Val79], where #P is<br />
the class of problems solvable on a ``counting'' machine in polynomial time. A counting machine<br />
returns the number of distinct solutions to a problem. Counting the number of Hamiltonian cycles in a<br />
graph is a #P-complete problem that is trivially NP-hard (and presumably harder), since any count<br />
greater than zero proves that the graph is Hamiltonian. Counting problems can be #P-complete even if<br />
the corresponding decision problem can be solved in polynomial time, as shown by the permanent and<br />
perfect matchings.<br />
Minc [Min78] is the definitive work on permanents. A variant of an -time algorithm due to Ryser<br />
for computing the permanent is presented in [NW78]. Recently, probabilistic algorithms have been<br />
developed for estimating the permanent [FJ95].<br />
Related Problems: Solving linear systems (see page ), matching (see page ), geometric primitives<br />
(see page ).<br />
Next: Constrained and Unconstrained Optimization Up: Numerical Problems Previous: Matrix<br />
Multiplication<br />
<strong>Algorithm</strong>s<br />
Mon Jun 2 23:33:50 EDT 1997<br />
file:///E|/BOOK/BOOK3/NODE139.HTM (3 of 3) [19/1/2003 1:30:19]