Showing posts with label weird. Show all posts
Showing posts with label weird. Show all posts

Monday, November 9, 2009

The H Algorithm

There's an interesting property about the letter h in the English language. Namely, you can insert quite a few h's into any word and not change the pronunciation. Let's take the word 'name': if we spell it nhahmheh, it's still recognizable and pronounceable as the same word.

What happens if we make an algorithm which figures out how many instances of h that could be found in a word without changing its sound?

Assume vowels do not change sound when followed by an h. Well, part of that has to do with not adding multiple h's, so the word isn't inrecognizable. If not, we're cognitively golden with the vowels- but only for a familiar word. And only for now. Alright. Let N(w) be the number of h's in the word. Let L(w) be the number of letters in the word. So, here's the first part of the algorithm:


N(w) = L(w)


This assumes that you can just add an 'h' after every letter in the word. If the word suddenly got an h appended in front of it, the first 'h' would have to be pronounced. However, this algorithm is so imperfect that it hurts. What about existing h's in the word, such as in 'the'? This is simple, just subtract one h for every existing h. Therefore, 'the' becomes 'theh.' So, let H(w) be the number of preexisting h's in the word:


N(w) = L(w) - H(w)


What about consonants which would change sound if followed by an h, such as sh or ch? We'd have to do a huuuuge comparison function. I'm going to pass w, along with all of the consonants which would change sound significantly:


N(w) = L(w) - H(w) - ?(w, c, soft g, p, q, s, t)


And, lastly, let's assume that vowels do change sound. So, in general, long vowels subtract one h, but all others do not. (Check me on this one.) I mean, the 'a' in 'name' is a long a, and it would change, but the alternate a's in 'and' and 'all' would not. 'Y' does not count. Y is a consonant here.


N(w) = L(w) - H(w) - ?(w, c, soft g, p, q, s, t, long a, long e, long i, long o, long u)


which is just


N(w) = L(w) - ?(w, c, soft g, h, p, q, s, t, long a, long e, long i, long o, long u)


To be fair, we do lose information here: the nature of the vowel before the h was added. Going back to the example of 'theh,' it can be pronounced a couple of ways, either the traditional 'the' or with the 'e' having the same sound as it does in 'empty.' Drat. This is even worse- how do you make an algorithm for determining long vowels? Soft g is a bit easier, but long vowels? Is there a rule?

Does anyone feel like making a program? How about stress-testing the algorithm?

Sunday, October 25, 2009

I Love You, Brain

Quoth Ari: "Your mind must be a really interesting place, Liz."

He's right. It's very interesting for me. Sorry for the non-idea post, but I just had an awesome "conversation" I had with my brain while walking on the way to a concert. Much of the repetition has been cut out.

(NOTE: There is actually not a dialogue between me and my brain as separate entities. That's just the way I think.)

Liz: You know what? Since they don't want me to leave my purse in the instrument room, and I don't have a concert-appropriate purse, I'll just take the essentials and stick them in my shoes.
Liz: So, the smaller objects are my tuner and keys. Hah! Perfect! They both fit in my shoes.
Liz: In one shoe are keys, and in the other are not keys!
Liz's Brain: That is so completely incorrect.
Liz: Oh, right, because 'not keys' includes everything that is not keys.
Liz's Brain: Exactly.
Liz: Are there an infinite number of things that are not keys?
Liz's Brain: There are a finite number of objects in the world.
Liz: But it's so much that it seems like infinity...
*pause*
Liz: What if we decided to define 'keys' as a string of characters? Then there might be enough permutations of letters in order to reach infinity.
Liz's Brain: Uh... that sounds okay, but I can't think of a way to prove that there are actually an infinite number of permutations of letters.
*pause*
Liz: Well... if you include numbers as everything in the set of not keys...
Liz's Brain: That would make sense. Now the set of everything that is not keys goes to infinity.
Liz: I'm going to try and imagine everything in the entire world now.
Liz's Brain: Stop that.
Liz: Okay, I'm going to sing the Gloria from Haydn's last mass.
Liz's Brain: Make sure no one else is around.
*concert*
Liz's Brain, while writing blog post: OH! You can prove that there are an infinite number of permutations of letters because there are an infinite number of integers!
Liz: RIIIIIIGHT

I love you, brain. I love you so much.

What are keys and what is not keys? Discuss.

Friday, October 23, 2009

Say Hello to my Little Friends

You are not alone. Look at your hand. You have billions of friends on your hand.

These are called normal microbiota, and they are harmless organisms which colonize all the space they can find on our bodies. It's a great evolutionary relationship- we provide warmth and moisture, they colonize our body so that disease microbes can't. Basically, these microbes are a wonderful form of protection against disease germs, simply by being there. Think Times Square. In order to infect a body, disease germs must first find an entrance, and that's harder to do with a whole bunch of normal microbiota running around. (Especially if these normal microbiota stand at the top of the stairs.)

Just a bit of political correctness: these are microbes, not germs. To call these microbes germs would be like calling a Pakistani Indian. However, unlike 'Indian,' 'germs' also has negative connotations, and I'm sure your little microbiota would appreciate you calling them by a positive name. They are helping you. It's the best thing to do in order to appreciate them, unless you want to have a bit of fun and try to name them all.

Does washing our hands kill the little guys? Yes, but the microbes on our arms are able to multiply and completely cover our hands right after they are washed. Your hands are never completely microbe-free, and it could be dangerous if they were. Washing your hands may be the most important medical discovery in human history, but it also removes our protective layer of microbes which help to block out disease microbes.

That's why it's important to not overwash hands- overwashing can lead to degradation of normal microbiota, making it easier for disease microbes to cultivate.

"I'm talking to my normal microbiota" is also a great thing to say to someone who catches you talking to yourself.

Thoughts or comments on normal microbiota? On microbe feelings? On Times Square?

Thursday, October 15, 2009

WORD PANTS

I was sitting near someone yesterday, and realized that they had WORD PANTS!

Simply put, these are pants with words going vertically down the side of one leg. I would post a picture, but don't want to deal with copyright infringement or anything that could come from posting a picture online. Also, Google image searching "word pants" isn't as helpful as one would think.

Upon seeing this, I did what any normal person would do, which is to shout "WORD PANTS! YOU HAVE WORD PANTS! I LOVE IT!" and giggle about it on and off for two days. Think about it! T-shirts with words on them can be funny, but word pants are funny simply by the fact that they are going vertically down someone's leg. Just saying "word pants" is fun.

I could not help myself. As soon as I get enough money, I want to buy a new pair of pants and 200 frillion Swarovski crystals and inserts, and spell WORD PANTS in humungous letters down the side. Then I would walk around for an entire week in them yelling about word pants and giggling every time I look down. Sadly, I am a college student and use the money I get from my job for donating to various causes and feeding my face with food.

Anyone want to make word pants now? WORD PANTS. Are you shameless and have lots of fabric or a basement full of rhinestones? WORD PANTS. If you make these or have these, I will happily post you. Because that? Is awesome.