Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
StringTools[IndexOfCoincidence] - compute the arithmetic mean of the characters (bytes) in a string
Calling Sequence
IndexOfCoincidence( s )
Parameters
s
-
Maple string
Description
The IndexOfCoincidence(s) command returns the index of coincidence of a sample s of text. It can be defined by the formula , where for each character ch, is the frequency with which ch occurs in the input string.
The index of coincidence is returned as a floating point number, and the calculation is carried out at hardware precision.
In elementary cryptanalysis, the index of coincidence is often used in conjunction with the Kasiski test to attempt to determine the number of alphabets used in a polyalphabetic substitution cipher.
Examples
See Also
string, StringTools, StringTools[Kasiski]
Download Help Document