h1

I appear to be tied up with Markov Chains

November 9, 2012

I’ve been thinking recently about a simple way of coming up with character names for fiction, as you do. There is a tried and tested way of doing this using mathematics (well, statistics) called Markov Chains.
— Start Rant —
The trouble is, as for so many things involving mathematics, that the formal definition (as you can see in the wikipedia link above) is far too complicated for people who are simply interested in the topic as opposed to mathematicians. I understand that mathematics needs complete ways of describing things, and, as an erstwhile mathematician myself, such definitions are useful for those who need to implement them. However, I feel that seeing complicated equations for such a (comparatively) simple system will put off the non-mathematician who has heard of the subject and wants to know more.
It’s like dropping someone who has heard that swimming is interesting directly into the deep end, and then telling them as they pull their exhausted and sodden body out that it was their own fault that they nearly drowned for not knowing more about swimming, and that it’s not the swimming instructor’s fault that they were told that this was an “Introduction to Swimming” class.
In this case (and a lot of the mathematical articles on wikipedia – this one is better than most), mathematical language and equations in university level notation are used to keep the non-mathematically inclined out, albeit (hopefully) unintentionally. Mathematics are the corner stone of all scientific knowledge, and should be free for everyone to understand, when expressed in a manner that would allow the greatest number of people to appreciate.
— End Rant —

Now, where was I? Markov Chains.
Simply put, they’re a system of working out what’s going to to occur next in a set of values, given the current value. You look at past values, and see what happened the last few times this value came up, and work out what is likely to come next.
This is good for coming up with names. You feed the system a whole set of names like the one you want, i.e. for a male name you process a set of male names. It then cuts up the names into a set of letters (either by themselves or grouped into two or more letters next to each other), and sees what letters usually come after that letter. You can then create a new name by randomly selecting a start letter, then choosing the next letter based on the information you’ve generated, over and over again until you come up with a name.
The one thing to remember is that Markov chains have no memory, as such. The previous letter you generate isn’t factored into the processing of the current letter. This makes it useful for statistically predicting things that share that property.
This entry was done in a few sessions, as I didn’t expect it to be this long! I hope it’s found interesting.

One comment

  1. Unknown's avatar

    […] sentence with my cold. Speech recognition typically uses a form of a mathematical model that I have discussed before – the Markov model. In fact it uses a more complicated version of it called a Hidden Markov […]



Leave a comment