All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
The Flooble Code (Posted on 2003-03-18) Difficulty: 4 of 5
A book titled The Bible Code introduced the topic of equidistant letter sequences (ELS), described below, for finding words “hidden” in text. That book referenced the Hebrew Bible, but prompts a question about finding any given word in any, say, English-language text.

For simplicity, and to better match the Hebrew, spaces and punctuation are removed. A particular text that I have in mind, thus crunched, has 284,939 characters remaining (letters and digits). How many times would you expect to find the word FLOOBLE as an equidistant letter sequence in the text? Ignore case. The word can start at any of the 284,939 characters and proceed by skipping any constant number of letters forward or backward. So, for example, if the 11,000th character were an F and the 10,000th an L, and the 9,000th an O, etc. that would be one occurrence. Of course we don’t expect always to find such decimally round spacings. The question again, How many do we expect to find?

The absolute and relative frequencies of the relevant letters in the text are:

B  4771 0.016744
E 36232 0.127157
F  7167 0.025153
L  9563 0.033562
O 22486 0.078915
that is, for each letter is shown the number of occurrences in the text and that number divided by the total of characters in the text.

  Submitted by Charlie    
Rating: 3.5000 (6 votes)
Solution: (Hide)
First we calculate how many quasi-random 7-letter sequences can be gotten from the text. There is a choice of 284,939 places to start. There would be a choice of 284,939 places to end, except for the fact that the difference between the starting and ending position must be a multiple of 6. So there are 284,939*(284,939/6) combinations of valid beginning and ending pairs (in such a large number we can ignore the fact that the size is not exactly divisible by 6--we've still got 6 significant digits). In general if the text length is L and the word length is W, the number of random sequences we have to choose from is L˛/(W-1). In this instance we have about 13,531,705,620 seven-random-letter sequences to choose from.

Then we consider the probability that any given 7-letter sequence is FLOOBLE. We multiply together the relative frequencies at each position: .025153*.033562*.078915˛*.016744*.033562*.127157. That product is 3.7567 x 10^-10. Then multiply that by 13,531,705,620, giving 5.08, so we’d expect 5 occurrences of FLOOBLE as an ELS in the text. As this is the result of a large number of chances each with small probability, we’d expect the result to be Poisson distributed so the probabilities of finding given numbers in the text are (if we use 5.08 instead of 5):
0 0.0062199
1 0.0315971
2 0.0802567
3 0.1359014
4 0.1725948
5 0.1753563
6 0.1484683
7 0.1077456
8 0.0684184
9 0.0386184

A search program actually found 8 occurrences. The Poisson distribution gives a 14% chance of it being this many or higher. The shortest skip distance among these occurrences was 382 backward, in a downloaded text of Thomas Paine’s The Age of Reason, which had the length and letter frequencies mentioned.

The occurrences are (the letters of FLOOBLE capitalized):

Start: 3012 skip: 40916 
dandunadulteratedbeliefoFonegodandnomoreeverynati
ightytoperfectionnonotonLybecausethepowerandwisdo
iteverwillbeinallthingscOnsistentwiththeeverexist
nsanddescendantsofesauwhOarecallededomitesandalso
thisnameismentionedintheBibleinalaterworkpainenot
houghattheriskoftheirownLivesfortheaccountsaysnev
newtestamentandshowedothErwritingsquitedifferentt

Start: 44861 skip: 33729 versialandthegloominessoFthesubjecttheydwellupont tfromthesunandconsequentLymovesroundinacirclegrea avethesamemerittheyhavenOwweretheyanonymousnobody oughtdowntobc1056thatistOthedeathofsaulwhichwasno thisromanticbookofschoolBoyseloquencebendtothemon entthenewtestamenttheyteLlusisfoundedupontheproph eumaugustinehavingentitlEdhisbookcontrafsustumman
Start: 57965 skip:-3363
sasifheweretosaythouknowEstnotsowellasibutsomeper encethatitdidnotmakeitseLfeverymanisanevidencetoh rstifthefirstquestionhadBeenanswerednegativelythe ywhichtheheavenlybodiesmOvebutitwouldbesomethingw fthatagencysoastobeabletOapplyitinpracticewemight stobetterstudiestheschooLsofthegreekswereschoolso ertomakeanexcusetohimselFfornotexecutinghissuppos
Start: 192146 skip:-26506
thedisagreementofthewritErsbutbecauserevelationca earthwasaglobeandhabitabLeineverypartwheretherewa notforeseethatitcouldnotBemaintainedagainsttheevi sinourestimationbutanimpOsterastotheancienthistor ustohavesaidsothenextdayOrthenextweekorthenextmon ththevicissitudesofhumanLifeandbyturnssinkingunde ndofthefalsepredictionsoFjeremiahishallmentiontwo
Start: 193730 skip:-15099
civilitybutwithrespectthEkeeperoftheluxembourgben thewriterofthosebooksiwiLlaftermakingafewobservat rsbytheaccountgivenintheBookofjoshuaafterthechild ichasthosebooksareanonymOusandasweknownothingofth orrapinshistoryofenglandOrthehistoryofanyothercou dthejewstoreturntojerusaLemfromthebabyloniancapti peaceandwiththeburningsoFthyfatherstheformerkings
Start: 208825 skip:-13751
ypersonwhodiedbeforetherEwasacongressintheonecoun estheinhabitantsofjerusaLemthechildrenofjudahcoul countalsoisgiveninkingsaBoutelijahitrunsthroughse edinsciencewhichthejewssOfarfrombeingfamousforwer ththewindinthissituationOfthingsisaiahaddresseshi nthecharacterofthemenstyLedprophetsintheformerpar loneweretherenootherissuFficienttoindicatethatthe
Start: 240759 skip:-28476
onofgodafterthesermonwasEndediwentintothegardenan thereforeisacharacteruseLessandunnecessaryandthes yunderstoodandintendedtoBeunderstoodthathehasbeen theirexistencehintedatthOughaccordingtothebiblech orthislyingprophetandimpOsterisaiahandthebookoffa eciallyliabletotheridicuLeofsuperficialreadersand dofbelievingthereismuchoFthatwhichiscalledwilfull
Start: 248258 skip:-382
ngthepeoplethencallingthEmselveschristiansnotonly munderthenamesoftheapostLesandwhicharesofullofsot edthatthesethingshavenotBeenwrittenbyhimselfnorby boulangerhasquotedthemfrOmthewritingsofaugustinea theywerevotedtobethewordOfgodbuttheinterestofthec lhersaintstoworkonemiracLesincetherevolutionbegan eeitwasvotedtobethewordoFgodthefollowingextractsa

Comments: ( You must be logged in to post comments.)
  Subject Author Date
re(4): incorrect solution?Charlie2003-03-26 14:00:29
re(3): incorrect solution?Charlie2003-03-26 13:59:28
re(2): incorrect solution?Cheradenine2003-03-25 22:55:01
re: to CheradenineCharlie2003-03-25 15:33:51
to CheradenineCory Taylor2003-03-25 10:45:44
my errorCory Taylor2003-03-25 10:36:37
re: incorrect solution?Charlie2003-03-25 10:24:42
incorrect solution?Cheradenine2003-03-25 09:19:22
Hints/Tipsre: remaining solutionCharlie2003-03-21 03:36:56
remaining solutionCory Taylor2003-03-20 09:33:49
partial solutionCory Taylor2003-03-20 09:21:46
No SubjectCory Taylor2003-03-20 09:04:52
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (11)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information