Send Close Add comments: (status displays here)
Got it!  This site "creationpie.org" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Entropy function
by RS  admin@creationpie.org : 1024 x 640


1. Entropy
Information sign More: Entropy

2. Entropy
Data (and information) can be represented using symbols that are made up of bits - zeros and ones in a binary code used to represent such data (and information).

A set of symbols (data) has a measure called entropy that approximates the lower bound on the number of bits needed to encode those symbols.

Such entropy constitutes a lack of order or a lack of predictability.

3. Entropy Formula
The following Shannon entropy formula expresses how entropy for a set of symbols is calculated.

Entropy function equation

4. Twenty questions
Most people have played the game of twenty questions.

Here is a simplified version.

Think of a number from 1 to 1,000,000 I will guess that number in 20 yes-no questions.

5. More simplified version
Here is a more simplified version.

Think of a number from 1 to 16 I will guess that number in 4 yes-no questions.

How can you do it? Can you explain why it works?

6. Algorithms
In the study of algorithms, one learns how to use divide and conquer problem solving strategies for a problem space of size n.

7. Question game
For guessing the 1 to 16, or 24 the following hold.

8. Entropy of splitting lists
Here is a way to create partitioned lists of numbers using list on a lazy range.

The flowing program shows the entropy of each possible partition of a list of 16 elements into two non-empty lists.

9. Python program
Here is the Python code [#1]
Here is the output of the Python code.

10. Result
The result is that the best place to partition the list into two non-empty lists such that the minimum of the maximum entropies is in the middle. That is, that splits the list into two equal sized lists.


11. Claude Shannon
Book: The mathematical theory of communication
Claude Shannon (Information scientist)

Claude Shannon's masters thesis was a detailed description of how to build (the first) programmable digital electronic computer. He later founded the modern field of information and communication theory. He worked on encryption technologies during World War II.
Claude Shannon, in the 1950's, used the term "information" to describe the statistical properties of data transmitted from one place to another. He was working for the telephone company AT&T at Bell Labs in order to improve the quality of phone calls. He founded the modern field of (statistical) information - he was not overly concerned with the meaning of the "data" that he called "information".
Information sign More: Claude Shannon
Previously, the term "information" was used as the verb "to inform". That is, one is "informed" that such and such is true - what we now call "information".

12. Von Neumann
Whenever the mathematical genius John Von Neumann (conventional computer architectures are called Von Neumann machines) was asked by Claude Shannon what to call a measure of the lack of content in data, Von Neumann is reported to have told Shannon to call it "entropy" because then nobody would understand it.

13. Von Neumann quote
Often reported comments of Von Neumann to Claude Shannon about the word "entropy".

You should call it entropy, for two reasons. In the first place your uncertainty function has been used in statistical mechanics under that name, so it already has a name. In the second place, and more important, no one really knows what entropy really is, so in a debate you will always have the advantage.

14. Statistics
Note that the concept of information developed by Shannon has to do with statistical properties of data.

It does not have anything to do directly with the meaning of the data. That is, information.

So what is called "information theory" might be better called "data theory".

15. Python code
Here is the Python code [#2]
Here is the output of the Python code.

16. Alphabets
Languages vary in how many letters they contain in making words.

17. Frequency
The average frequency with which letters happen in words (in a given corpus of texts) can be determined and varies from letter to letter.

If each letter appeared with the same frequency, then, for English, the entropy would be as follows.
ln2 26 = 4.7004397181411 bits

Does this make sense?
24 = 16 25 = 32

So the log, base 2, of 26 is between 4 and 5 bits.


18. Logarithms
Note that all logarithms are related by a constant factor. Thus, the following are true.
log2(26) = log10(26)/log10(2)

Here is the Python code [#3]
Here is the output of the Python code.

19. Random guessing
On average, guessing a letter in a puzzle, without any other information, requires 13 guesses (for 26 letters).

How many guesses would it take to fill in the missing letters in the following?
H __ L L __ , W __ R L D


20. Semitic languages
Some languages, such as Hebrew, do not have vowels, only consonants. One learns to infer the vowels according to the context in which the consonants appear.

21. English letter guessing
Shannon showed that the English language has an entropy of between 0.6 and 1.3 bits.

The redundancy of natural language helps in removing ambiguity when not all of the text can be transmitted accurately, as in listening to a broadcast with a lot of static noise.

22. Google n-grams
Google has collected a large amount of data on letter sequences in the text of various languages.

Such "grams" are known as "bi-grams" (2 letters) , "tri-grams" (3 letters), and so on. The general term is "n-grams" where n is an integer (greater than one).

23. Security
The bit length of a security key, such as 1024 bit, is not always a maximum entropy security key.

You need the max entropy value to compare security by the bit length of keys.

24. Random numbers
A true random number generator needs a lot of entropy.

25. Perfect passwords
The GRC web site, by Steve Gibson (famous security pod-caster), provides passwords that have high entropy. See https://www.grc.com/passwords.htm. There are more details there on how maximum entropy is used/achieved.

26. Imperfect random numbers
Pseudo-random numbers appear random but actually have a pattern. True random numbers cannot be generated via strictly computer methods.

27. John Von Neumann quotes
From WikiQuote:

In mathematics you don't understand things. You just get used to them.

If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.

There probably is a God. Many things are easier to explain if there is than if there isn't.

28. About John Von Neumann
From WikiQuote:

He was a really remarkable man. He listened to me talk about this rather obscure subject and in ten minutes he knew more about it than I did. He was extremely quick. David Blackwell

29. Random numbers
Applications: Note: Raspberry Pi has hardware random number generator. How well does it work?


30. Genetic entropy
DNA codeThe concept of genetic entropy is the tendency of the coded information in genetic material to accumulate mutations and degenerate over time due to errors in the copying process.



31. End of page

by RS  admin@creationpie.org : 1024 x 640