I ran the code on my MacBook Pro for k=10 billion random characters and this took about half an hour. I calculated that running for k=1 trillion random characters will take about 3 days. This is not practical to do on my MacBook Pro.
What is your advice for running this code for k=1 trillion characters and possibly even more, preferably for free or very low cost.
In summary, I'm looking for advice on any of the following:
-Affordable or free computing resources where I could run this program.
-Cloud or academic computing services that might be available to independent researchers.
I'm based in Turkey. I contacted TRUBA, Turkey's high-performance computing center and Europe's EuroHPC JU, but did not receive a positive response.
Any suggestions would be very welcome.
Define a 'word' to be any string of 1+ non-space characters generated by sampling letters from your chosen distribution (uniform distribution over the 27 symbols a-z + space).
Given there is a word, what is the probability of it being:
at least 1 letter long, at least 2 letters long, at least 3 letters long, at least 4 letters long, ...
exactly 1 letter long, exactly 2 letters long, exactly 3 letters long, exactly 4 letters long, ...
Once you can answer those in the general case, fix a specific length K English word. Given you have a length K 'word' where the letters have been sampled from the uniform distribution on a-z, what is the probability that this length K 'word' is equal to the word that you fixed?
Given there are N English words of exactly length K in your chosen dictionary, given a length K 'word' where the letters have been sampled from the uniform distribution on a-z, what is the probability that this length K 'word' is equal to any of those N length K words in your dictionary?
Once you've figured out the probability that the next random-letter 'word' is length K & the probability that a random-letter word of length K matches a world in your dictionary, for all lengths K that appear in your dictionary, that gives you a way to compute the probability that the next random-letter 'word' is in your dictionary regardless of its length. Your dictionary is finite so there's only a finite number of cases to analyse. Once you've got that, you can directly compute the probability of getting a run of M words in a row that are known to your dictionary. There's no need to sample any letters or store anything in ram.
@shoo: This may be the case, I’m on the road so I didn’t read what you wrote carefully, but I posted here hoping that there will be suggestions about how to run the Racket code for k=1 trillion. So not only probabilities but I’m also interested in the computational aspect of this project. I’ll read your comment later when I’m back at home