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
StringTools[Entropy] - compute the Entropy of a string
Calling Sequence
Entropy( s )
Parameters
s
-
Maple string
Description
The Entropy(s) command returns the Shannon entropy of the string s. A floating-point number, the entropy of the string, is returned.
Shannon's entropy is defined as -add( P( ch ) * log[ 2 ]( P( ch ) ), ch = Support( s ) ), where . It is a measure of the information content of the string, and can be interpreted as the number of bits required to encode each character of the string given perfect compression. The entropy is maximal when each character is equally likely. For arbitrary non-nul characters, this maximal value is .
(The nul byte, with code point , cannot appear in a Maple string. If all 256 single byte code points could appear, then the maximal entropy would be , which is the number of bits per byte).
Note that the entropy is computed as a floating-point number, at hardware (double) precision.
Examples
The following steps illustrate the definition of Entropy.
See Also
add, convert, evalf, length, log, map, seq, string, StringTools, StringTools[CountCharacterOccurrences], StringTools[Iota], StringTools[Random], StringTools[Repeat], StringTools[Support], with
Download Help Document