2012年10月21日星期日

Algorithms and chemistry!.

Ok... I have to admit that I am a bit off the work. I am in the mid of the night doing my chemistry hw and suddenly realized that I have not finished my blog... While I am doing chemistry, counting the number of Hydrogen can be a painful experience: I waste a plenty of time just to make sure the number of hydrogen is correct. I am thinking... is there a faster, more convenient and accurate way to tell me the number of hydrogen? So here is the first algorithm I make...

First, I want to find a pattern between the number of carbons and the lovely hydrogen.

Second, I will draw a very simple chemical structure, like C2H6. Because each carbon must have 4 bonds, so there is only 3 "space" left for each hydrogen.

so the relationship bw carbon and hydrogen is CxH3x.

Wait, this is just a simple carbon molecule, how about the more complex ones?.

Third step, finding a more complex example to justify our problem.
Let's try an alkane group such as Pentane, it has a the chemical formula: C5H12. In this case, our rule CxH3x does not apply. We have to reconsider our method of finding right number of hydrogen.

Fourth step, list 4 different chemicals and find the pattern.
C1H4
C2H6
C3H8
C4H10
C5H12...

We found that there is a pattern between carbon and hydrogen: CnH2n+2.

Let's do the inverse step to check if we can use the formula to obtain the correct answer:

when n=1, C1H2*1+2=C1H4.
when n=2, C2H2*2+2=C2H6
when n=3, C3H2*3+2=C3H8
...
Yippie we found the general formula for Carbon and the number of hydrogen among alkane group.

But, in organic chemistry we don't just have alkane group which only contains single bonds, we also have double bonds and triple bonds.How can we judge if this chemical contains a double bond, a triple bond, or a single bond? What's the amount relationship bw carbon and hydrogen in a non single bonded compound? We will try to solve these problems in the next episode!.

没有评论:

发表评论