Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
LinearAlgebra[Modular][CharacteristicPolynomial] - Compute the characteristic polynomial of a square matrix mod p
Calling Sequence
CharacteristicPolynomial(m, A, lambda)
Parameters
m
-
modulus
A
square matrix
lambda
variable name to use for characteristic polynomial
Description
The CharacteristicPolynomial function computes the characteristic polynomial of a matrix mod m. Note that the matrix A need not have entries in the positive range , as the routine needs to make a copy of the matrix for the computation, and does so using Mod. Upon successful completion, the characteristic polynomial of A mod m in lambda is returned.
A number of different algorithms and implementations are in use, each with significantly different efficiency, so it is important to describe these here.
If m is a prime number with fewer than 100 digits (the digit limitation is present only to guarantee that the primality check is not too expensive) then the Hessenberg algorithm is used. This is a reduction-like routine, in which the matrix is 'reduced' to Hessenberg form, and the characteristic polynomial is computed from this form.
Furthermore, if the prime is sufficiently small so that the Modular package can work with a hardware datatype (either integer[] or float[8]), then an efficient external routine is used for the computation, making it quite fast.
In the event that the modulus m is not prime, or greater than 100 digits in length, the Berkowitz algorithm is used. Unlike the Hessenberg implementation, the Berkowitz implementation uses no external code, so it is noticeably slower for comparable problems, as demonstrated in the examples.
This command is part of the LinearAlgebra[Modular] package, so it can be used in the form CharacteristicPolynomial(..) only after executing the command with(LinearAlgebra[Modular]). However, it can always be used in the form LinearAlgebra[Modular][CharacteristicPolynomial](..).
Examples
Compute the characteristic polynomial using external Hessenberg and Berkowitz, and compare the timings.
First Hessenberg with prime modulus
Next Berkowitz with composite modulus
Factor of time faster for Hessenberg
See Also
LinearAlgebra/Details, LinearAlgebra[Modular], LinearAlgebra[Modular][IntegerCharacteristicPolynomial], LinearAlgebra[Modular][Mod]
Download Help Document