Posted in Philosophy

Achilles And The Tortoise

In 450 BC, a Greek philosopher named Zeno thought of the following paradox. Let us imagine that Achilles and a tortoise were to have a footrace. Achilles, obvious being faster than the tortoise, allows the tortoise to have a head start of 100 metres. Once the race starts, Achilles will quickly catch up to the tortoise. However, within the time he took to cover the distance, the tortoise would have travelled some distance as well (say 10 metres). When Achilles runs the 10m to catch up again, the tortoise has once again toddled on another metre. Thus, whenever Achilles reaches somewhere the tortoise has been, he still has farther to go. Because there are an infinite number of points Achilles must reach where the tortoise has already been, theoretically the tortoise will be ahead of Achilles for eternity.

According to this thought experiment, motion is paradoxical and theoretically impossible. However, we know for a fact that motion happens. So how can we break Zeno’s paradox?

The main flaw of Zeno’s paradox is that he uses the concept of “eternity”. If we record the story mathematically, the time taken for Achilles to run the footrace is (if it took him 10 seconds to run 100m): 10 + 1 + 0.1 + 0.01 + 0.001… = 11.111… Ergo, the tortoise is only ahead of Achilles for less than 11.2 seconds (rounded). After 11.2 seconds pass, the time passed exceeds the sum of the infinite series and the paradox no longer applies.

Although it is a flawed paradox, the story of Achilles and the tortoise teaches the concept of geometric series – that something finite can be divided an infinite amount of times. For example, 1 = ½ + ¼ + 1/8 + 1/16… ad infinitum. This principle is a crucial part of mathematics and has significant implications in the field of economics. For example, it can be used to calculate the value of money in the future, which is necessary for working out mortgage payments and investment returns. Perhaps it is because of this mathematical principle that it seemingly takes an infinite amount of time to pay off a mortgage.

Zeno’s paradox teaches us that one should not take the concept of infinity for granted.

Posted in Science & Nature

Cryptography: Kasiski Examination

The Kasiski examination can be used to attack polyalphabetic substitution ciphers such as the Vigenère cipher, revealing the keyword that was used to encrypt the message. Before this method was devised by Friedrick Kasiski in 1863, the Vigenère cipher was considered “indecipherable” as there was no simple way to figure out the encryption unless the keyword was known. But with the Kasiski examination, even the Vigenère cipher is not safe anymore.

The Kasiski examination is based on the fact that assuming the number of letters of the keyword is n, every nth column is encoded in the same shift as each other. Simply put, every nth column can be treated as a single monoalphabetic substitution cipher that can be broken with frequency analysis. Ergo, all the cryptanalyst needs to do to convert the Vigenère cipher into a Caesar cipher is know the length of the keyword.

To find the length of the keyword, look for a string of repeated text in the ciphertext (make sure it is longer than three letters). The distance between two equal repeated strings is likely to be a multiple of the length of the keyword. The distance is defined as the number of characters starting from the last letter of the first set of strings to the last letter of the second set of strings (e.g. “abcdefxyzxyzxyzabcdef” -> “abcdef” is repeated” -> distance is “xyzxyzxyzabcdef” which is 15 letters). The reason this works is that if there is a repeated string in the plaintext and the distance between these strings is a multiple of the keyword length, the keyword letters will line up and there will be repeated strings in the ciphertext also. If the distance is not a multiple of the keyword length, even if there is a repeated string of letters in the plaintext, the ciphertext will be completely different as the keyword would not match up and be different.

It is useful recording the distance between each set of repeated strings to find the greatest common factor. The number that factors the most into all of these distances (e.g. 6 is a factor of 6, 12, 18…) is most likely the length of the keyword. Once the length of the keyword is found, then every nth letter must have been encrypted using the same letter of the keyword. Thus, by recording every nth letter in one string, you can obtain what is essentially a Caesar cipher. The Caesar cipher is then attacked using frequency analysis. Once a few of these strings (of different positions on the ciphertext) are solved, the keyword can be revealed by checking the shift key against a tabula recta (e.g. if a certain string of nth letters is found to have been shifted 3 letters each, then the corresponding letter in the keyword must be “D”, which shifts every plaintext letter by 3 in the Vigenère cipher). When the keyword is deduced, every message encrypted using that keyword can now easily be decoded by you.

Although the Kasiski examination appears to be complex, attempting to try it reveals how simple the process is. Thus, it is useful to try encrypting a message using the Vigenère cipher then trying to work out the keyword using the Kasiski examination. Much like the frequency analysis, it is an extremely useful tool in the case of needing to break a secret code.

Posted in Science & Nature

Cryptography: Caesar Cipher

One of the earliest known uses of cryptography can be traced back to ancient Rome. Julius Caesar was well-known for his use of a type of substitution cipher dubbed “Caesar cipher” or “Caesar shift”. The encryption is very simple: shift every letter a certain value down the alphabet (the value is known as the key). For example, Caesar used a key of 3 to encrypt his messages to his general, so the message “ATTACK AT DAWN” would be encrypted into “DWWDFN DW GDZQ” (use the scheme of a=0, b=1, c=2, d=3…).

Although it was an efficient encryption system in ancient times, since then it has been revised to be much more secure. The Caesar cipher has thus been demoted to the preferred code used by children and teenagers for basic decoding puzzles.

Due to the simplicity of the encryption, cracking the Caesar cipher is quite easy with the use frequency analysis, pattern recognition and brute force analysis. Brute force analysis can be used if the attacker knows that a Caesar cipher has been used. If that is the case, the message can be decrypted using every possible key (e.g. 1, 2, 3…) until a message that makes sense is acquired.

Posted in Science & Nature

Cryptography: Frequency Analysis

A cipher is a message that has been encoded using a certain key. The most common and basic type of ciphers are encrypted using letter substitution, where each letter represents a different, respective letter. For example, the message may be encoded in a way so that each letter represents a letter three values before it on the alphabet (e.g. if a=0, b=1… “a” becomes “d”, “b” becomes “e” etc.). This creates a jumble of letters that appears to be indecipherable.

However, the characteristics of substitution ciphers make them the most decipherable type of encryptions. As each letter can only represent one other letter, as long as the key is cracked (i.e. what letter is what), the message and any future messages can be cracked. The most important tool in decrypting substitution ciphers is pattern recognition and frequency analysis.

Frequency analysis relies on the fact that every language has certain letters that are more used than others. In the English language, the letters that are most used, in order, are: E, T, A, O, I, N, S, H, R, D, L, U (realistically, only E, T, A, O are significant and the rest are neither reliable nor useful in frequency analysis).

For example, if Eve intercepted a long, encrypted message that she suspects to be a simple substitution cipher, she will first analyse the text for the most common letter, bigram (two letter sequence) and trigram. If she found that I is the most common single letter, XL the most common bigram and XLI the most common trigram, she can ascertain with considerable accuracy that I=e, X=t and L=h (“th” and “the” are the most common bigram and trigram respectively). Once she substitutes these letters into the cipher, she will soon discover that certain patterns arise. Eve may notice words such as “thCt” and deduce that C=a, or find familiar words and fill in the blanks in the key. The discovery of each letter leads to more patterns and the vicious cycle easily breaks the code.

Frequency analysis is extremely useful as it can be used to attack any simple substitution ciphers, even if they do not use letters. For example, in Sir Arthur Conan Doyle’s Sherlock Holmes tale The Adventure of the Dancing Men, Sherlock Holmes uses frequency analysis to interpret a cryptogram showing a string of hieroglyphs depicting dancing men.

To reinforce this weakness in substitution ciphers, many cryptographers have devised better encryption methods such as polyalphabetic substitution, where several alphabets are used (e.g. a grid of two alphabets – also called a tabula recta).

Posted in Science & Nature

Rock-Paper-Scissors

Rock-paper-scissors is a game with a long history. The earliest example of the game is a Chinese game called huoquan, which follows a cyclic rule where the frog eats the slug, the slug dissolves the snake and the snake eats the frog. The reason why rock-paper-scissors has been saved throughout history is because of the uncertainty it contains. Any hand you choose, the chance of winning is the same. Ergo, there is no single best choice and there is no move that will always win. But this is still a game played by people. It is not a game played by emotionless machines, meaning that you can use human psychology, the surfacing of emotion and specific signs and movements to help deduce your opponent’s hand. Mentalist Derren Brown can read tiny flickering of muscles in the opponent and microexpressions to pull off his “undefeatable rock-paper-scissors trick”, but this is near impossible for a normal person to try. However, you can use the following strategies to improve your odds.

  1. Use paper on a beginner: Statistically, people prefer using rock. Males especially have a strong tendency to play rock.
  2. Use scissors on an experienced player: People who know the first trick can be defeated by going one step further.
  3. Use a hand that loses to the hand your opponent played: This uses the psychology of the opponent wanting to mix up hands and wanting to beat the hand you last played (which is the same as theirs as you drew).
  4. Say what you will play and play that hand: In a competitive situation like rock-paper-scissors, people tend not to trust others. Thus, if you say you will play a certain hand, they will think is a trap and not play the hand that defeats that hand. For example, if you said you will play scissors, the opponent will play paper or scissors and you will either win or draw.
  5. Do not give the opponent a chance to think: People have a subconscious tendency to play a hand that beats the hand that they played before. Without time to think, the subconscious takes action meaning that you can predict their move. If you do the same as strategy 3 and play a hand that loses against the opponent’s previous hand, you will win.
  6. Suggest a certain hand: This is a form of hypnosis where you suggest something to the opponent’s subconscious. To use this trick, pretend to go over the rules by saying “rock, paper, scissors” then play a certain hand. The opponent will likely play the hand that the subconscious last saw.
  7. If you keep drawing, use paper: This is the same as strategy 1.

Unfortunately, rock-paper-scissors has an equal probability of a win and a draw, meaning draws are rather common. Thus, a computer engineer called Samuel Kass devised a game where two additional hands are added: rock-paper-scissors-lizard-Spock. Lizard is played by making your hand into the shape of an animal’s head, while Spock is played using the Vulcan Salute from the science fiction show Star Trek, where you make a V-shape with two fingers on each side. The rules are as follows.

Scissors cut paper. Paper covers rock. Rock crushes lizard. Lizard poisons Spock. Spock smashes scissors. Scissors decapitate lizard. Lizard eats paper. Paper disproves Spock. Spock vaporizes rock. Rock crushes scissors.

As each hand has two ways of winning, the odds of winning is 10/25, or 2/5 and the odds of drawing is 5/25, or 1/5. As you can see, you have double the chance of winning compared to drawing, making the game much faster to play than the original game.

Posted in Science & Nature

Marriageable Age

When is the right time to get married? According to Professor Tony Dooley, you can use an equation to find the right age for proposing. To do this, take “the youngest age you want to marry” and minus it from “the oldest age you want to marry” then times 0.368. Add this number to the youngest age. For example, if you would consider getting married from age 21 onwards and at the latest 30, your ideal age to marry is: (30 – 21) x 0.368 = 3.312 + 21 = 24.312, thus about 24 years and 4 months old. 

This equation is very practical as it is a modified version of equations used in financial and medical fields. This equation is used to maximise profit while minimising loss using mathematics. It may not sound romantic, but according to Professor Dooley, after you reach the calculated age you should not waste time and ask the hand of the next person you date in marriage.

(Sourcehttp://soulofautumn87.deviantart.com/art/All-We-Need-Is-A-4-Letter-Word-111260511)

Posted in Science & Nature

Quadratic Formula

Anyone who has studied mathematics to some degree will know about algebraic equations. An algebraic equation is an equation that can be solved to find the unknown value of x. A quadratic equation is an algebraic equation with , or in other words has two valid solutions to x. Generally speaking, a quadratic equation can be expressed in the following fashion: ax² + bx + c = 0. a, b and c are constants and the equation can be solved to find x. A quadratic equation is definitely more complicated to solve compared to a linear equation and it can be solved using various means and applications such as factorisation. As these methods are learnt in school and this Encyclopaedia is technically not a mathematics textbook, such methods will not be delved into.

If you have not learnt it already, there is a shortcut method to solving quadratic equations: the quadratic formula. This formula can easily find x if you simply substitute in the values for a, b and c. Of course this formula only works if the solutions are real numbers. The quadratic formula is as follows:

As you can see, because of the ± sign, the formula can be used to find both solutions to a quadratic equation. Even without factorising, it can find the answer as long as you substitute numbers into it on a calculator, making maths class very easy. However, as mentioned above the Encyclopaedia of Absolute and Relative Knowledge is not a mathematics textbook and one should instead learn properly from their teacher, not using the formula until they have been taught it properly.

Posted in Science & Nature

Monty Hall Problem

Imagine that you are on a game show and you are given the choice of three doors, where you will win what is behind the chosen door. Behind one door is a car; behind the others are goats, which you do not want. The car and the goats were placed randomly behind the doors before the show.

The rules of the game show are as follows: 

  • After you have chosen a door, the door remains closed for the time being. 
  • The game show host, Monty Hall, who knows what is behind the doors, opens one of the two remaining doors and the door he opens must have a goat behind it. 
  • If both remaining doors have goats behind them, he chooses one at random. 
  • After Monty Hall opens a door with a goat, he will ask you to decide whether you want to stay with your first choice or to switch to the last remaining door. 

Imagine that you chose Door 1 and the host opens Door 3, which has a goat. He then asks you: “Do you want to switch to Door 2?”

Is it to your advantage to change your choice?

image

Most people believe that as an incorrect option (goat) is ruled out, their odds of winning the car go up from 1/3 to ½ even by staying on the same Door 1 and there is no benefit to switching. However, it is better to switch doors as this will double your odds of winning the car. To illustrate this point, the following three scenarios (with the car being behind Door 1, 2 or 3) can be imagined, using the above rules of the game:

image

In Scenario 1, you have already chosen the car (Door 1) so Monty Hall will randomly open Door 2 or 3. Switching will obviously lead you to losing the car. The chance of you losing after switching, therefore, is 1/6 + 1/6 = 1/3 (as either Door 2 or 3 could be opened)

In Scenario 2 and 3, because you chose the wrong door (goat) and Monty Hall will open the door with the goat behind it, switching will lead you to choosing the car (no other choices). As the odd of either scenario happening is 1/3 each, your odds of winning after a switch is 2/3 – double the odds of winning after not switching (1/3, the odd of your first guess being right).

Of course, this is only under the assumption that the rules of the game were followed and that Monty Hall will always open a door with a goat behind it. This problem and the answer suggested was extremely controversial as tens of thousands of readers refused to believe that switching could be a better choice. However, as the above illustration shows, the Monty Hall problem is a veridical paradox – a problem with a solution that appears ludicrous but is actually proven true by induction.

Posted in Science & Nature

Fermat’s Last Theorem

In the 17th century, a lawyer called Pierre de Fermat conjectured many theorems while reading a mathematics textbook called Arithmetica, written by an ancient Greek mathematician called Diophantus. He wrote his theorems on the margins of the books. After his death, a version of the Arithmetica with Fermat’s theorems was published and many mathematicians checked over Fermat’s proofs. However, there was one theorem that could not be solved. Fermat wrote on the theorem: “I found an amazing proof but it is too large to fit in this margin”.

Fermat’s last theorem is as follows:

No three positive integers x, y, and z can satisfy the equation
xⁿ + yⁿ = zⁿ for any integer value of n greater than two.

For example, x² + y² = z² can be solved using Pythaogorean triplets (e.g. 3, 4, 5) but there are no values for x, y and z that solves x³ + y³ = z³. This theorem remained unsolved for 357 years until Andrew Wiles finally found the proof in 1995.

There are many stories surrounding Fermat’s last theorem, but by far the most interesting is related to suicide. In 1908, a German mathematician called Paul Wolfskehl decided to kill himself after being cold-heartedly rejected by the woman he loved so much. He decided to shoot himself at midnight and in the remaining time started reading some mathematics texts until he found a flaw in Kummer’s theory, which disproved Cauchy and Lamé’s solution (the leading solution at the time. After Kummer’s essay, most mathematicians of the time gave up on Fermat’s last theorem). After researching Kummer’s essay, Wolfskehl found that it was far past midnight and he felt great pride in reinforcing Kummer’s solution. His depression was gone and through mathematics he found new meaning in his life. Wolfskehl, who believed that the theorem saved his life, made a resolution to donate his wealth to whoever solved Fermat’s last theorem, putting up 100,000 marks as a prize. This prize was claimed by Wiles in 1996 (then worth $50,000).

image

Posted in Science & Nature

Duel

Three gunslingers called Good, Bad and Ugly duel to the death. They each stand an equal distance from each other and shoot at the same time. Good’s accuracy is 30%, Ugly’s accuracy is 70% and Bad’s accuracy is 100%. Who has the highest chance of survival?

Common sense dictates that Bad, with the highest accuracy, will have the highest survival rate. However, when the duel begins, the following scenario will occur.

Good’s most rational decision is to shoot Bad rather than Ugly. Reason being, shooting the person with the higher accuracy improves your survival rate in the next round. Ugly also chooses to shoot Bad instead of Good as it is the best choice. Lastly, Bad shoots Ugly instead of Good. This scenario can be explained by the following diagram:

Thus, the probability of Bad being alive after the first round is (1-0.3)(1-0.7)=0.21, or 21%. This is because Ugly is killed by Bad on the first shot. On the second round, the probability of Good dying is the same as Bad’s survival rate of the first round, which is 21%. Therefore, Good’s survival rate is 79%. On the other hand, Bad’s survival rate becomes 0.21(1-0.3)=0.147, or 14.7%

Ultimately, the survival rate of each shooter is: Ugly 0%, Bad 14.7%, Good 21%, making Good the most likely winner. This illustrates the fundamental principles of game theory – an extremely useful theory that helps predict the many choices we make in life.