100% found this document useful (1 vote)
499 views10 pages

Fun With Cryptarithms

- A cryptarithm is a mathematical puzzle where digits are replaced with letters, and equations must be solved. - The earliest known cryptarithms originated in ancient China. A famous one is "SEND + MORE = MONEY", which was popularized in 1924. - To solve cryptarithms computationally, a computer must generate all possible letter permutations and check if they satisfy the equation. With optimizations like pre-filtering words, this can be done rapidly. - Inventing new cryptarithms computationally involves checking billions of word combinations. Techniques like measuring word lengths and parallel processing can speed up the process.

Uploaded by

artmig
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
499 views10 pages

Fun With Cryptarithms

- A cryptarithm is a mathematical puzzle where digits are replaced with letters, and equations must be solved. - The earliest known cryptarithms originated in ancient China. A famous one is "SEND + MORE = MONEY", which was popularized in 1924. - To solve cryptarithms computationally, a computer must generate all possible letter permutations and check if they satisfy the equation. With optimizations like pre-filtering words, this can be done rapidly. - Inventing new cryptarithms computationally involves checking billions of word combinations. Techniques like measuring word lengths and parallel processing can speed up the process.

Uploaded by

artmig
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

Cryptarithms

by ArtMig Sasha M

History
SEND + MORE = MONEY
YOU + OWE + ME = CASH

A place for playing with cryptarithms: http://www.geocities.com/Athens/Agora/2160/primer.html A cryptarithm is a genre of mathematical puzzle in which the digits are replaced by letters of the alphabet or other symbols. The invention of Cryptarithmetic has been ascribed to ancient China. This art was originally known as letter arithmetic or verbal arithmetic.

Popular puzzles

SEND + MORE = HONEY, BUNNY, MONEY!

The world's best known alphametic puzzle is undoubtedly SEND + MORE = MONEY Solution: 9567 + 1085 = 10652 Code: H. E. Dudeney 0123456789: omy * * e nd r s It was created by H. E. Dudeney and first published in the July 1924 issue of Strand Magazine associated with a story of a kidnapper's ransom demand. More examples: http://www.cryptarithms.com/default.asp?pg=1 Instructions how to solve manually: http://www.geocities.com/Athens/Agora/2160/primer.html

Much, Much More!


There are in fact 4467 alphametics for send + more = ? including: send + more = cash send + more = honey send + more = bunny send + more = ants send + more = bikes ...

How do we teach the computer computer to solve cryptarithms


Cant you do anything right?

Cant you do anything right?

You have to find all different letters in these words. There must be 10 or less different letters, otherwise there can be no solution. The simplest case is when there are exactly 10 different letters. 2 Then they must be a permutation of 0123456789.

What are permutations? Here are all permutations of 01: 01, 10 Here are all permutations of 012: 012, 021, 201 | 102, 120, 210

01 10

0 1

1 0

01 10

As you see, 2 is inserted in all three locations in every permutations of 01. So, we get 2*3 = 6 permutations. With 0123 we insert 3 into every of 4 positions of each of 6 permutations of 012 with total of 6*4 = 24 variants and so on. For 0123456789 we get 10*9*8*7*6*5*4*3*2*1 = 3628800 variants.

Once you explain everything to the silly computer it does it FAST


You must explain to your computer how to check equation for every permutation with something like this:
For (hsenmcorda = 0123456789,1023456789, 9876543210) Check: { (1000*S) + (100*E) + (10*N) + D + (1000*M) + (100*O) + (10*R) + E = (1000*C) + (100*A) + (10*S) + H }

Once you find the right permutation, you are done. If there are none you claim there are no solutions. This process takes almost no time at modern computers: less than a second, once the permutation table is in place. Making a table and reading this table from a file also takes less than a second. So, there is really no problem for a computer to solve any cryptarithm.

Master

Inventing Cryptarithms
computer + memory = concerto humans + better + than = masters

CPU vs Dudney

This looks like a creative process: find words which by some magical coincidence have secret arithmetic meaning. Think again. There are 45,353 English words longer than 3 letters in the dictionary file called linux.words (Located on Unix at /usr/share/dict/words). So, our computer must check 45,353 x 3,628,800 = 164,576,966,400 equations. This is not so much, really, but still we are talking of minutes and hours rather than seconds. If we want to invent cryptarithms we must speed it up.

Measuring words.
To begin with, not all the words can serve as a sum in the equation. The word in place of money cannot be shorter than the longest of send or more, nor longer than the longest of them + 1. Relationship
Money Send More Babysitter

This means that many words can be rejected right away, before we start checking all permutations.

For example, the beautiful family of cryptarithms madonna + religion = ? has only 2 solutions: madonna + religion = leonardo 9761447 + 20385814 = 30147261 and: madonna + religion = marriage 8369223 + 75401092 = 83770315 Computer had to check only 216 words, which is less than half percent of total.

It took a few seconds because I measured the words, otherwise, it would have taken 200 times longer.

Parallel Computations
Computers also can be accelerated by parallel processing. New laptops have two processors (two cores), each of which can simultaneously try its own equation. This will speed the work twice.
Money Cash Smash Cart Zone Step Stool Steep

The modern 8 core PC would do the same work 8 times faster.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy