TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Chemical equation balancing: An integer programming approach

82 pointsby theideasmithover 9 years ago

7 comments

jamessbover 9 years ago
A while ago I saw a paper in the <i>SIAM Review</i> - just one and a half pages of maths, followed by<p>&quot;Remark 2. The theorem proved here gives a completely new general method. It generalizes all known results for balancing chemical equations cited chronologically in references [1]–[125].&quot; <a href="http:&#x2F;&#x2F;www.siam.org&#x2F;journals&#x2F;problems&#x2F;downloadfiles&#x2F;71-025s.pdf" rel="nofollow">http:&#x2F;&#x2F;www.siam.org&#x2F;journals&#x2F;problems&#x2F;downloadfiles&#x2F;71-025s....</a><p>Reference 125 is to this paper.
评论 #11078821 未加载
评论 #11076739 未加载
评论 #11077033 未加载
markcover 9 years ago
My high-school chemistry teacher had a tradition of announcing &quot;Automatic A&quot; challenges at the start of the term. One challenge was balancing a large chemical equation. I recall it required solving something like 6 equations with 6 unknowns. I solved it with multiple attempts and many pages of algebra, and crucial hints at sticking points from my dad who had a Masters in Chemistry. Easy A.<p>Another term, an A was promised for anyone turning in a &quot;print out&quot; of the numbers from 1 to 1 million. Dad, coming to the rescue again, got me access to a Microfilm printer at his work, and taught me just enough FORTRAN to generate the list. (Yeah, short program, all about the formatting.) Another easy A. The teacher&#x27;s expression was priceless.
评论 #11078598 未加载
yummyfajitasover 9 years ago
Amusingly, I discovered a method very similar to this in college. My method was simpler - stick a 1 in front of one chemical, then you get an n x n linear system of equations for the remaining compounds. Solve it, then figure out what to multiply by to get an int solution. I suspect that my version isn&#x27;t stable, which I gather is the problem these guys are solving.<p>I was forbidden from using this method on the final, since it isn&#x27;t the ad-hoc method that was taught.
评论 #11076945 未加载
评论 #11076457 未加载
评论 #11076768 未加载
openasocketover 9 years ago
I might be missing something big, but isn&#x27;t chemical equation balancing just a system of linear Diophantine equations[1]? If it is, you should be able to solve it in O(n^3) time by converting to Smith normal form[2]. Unlike Hermite form, which the paper mentions, you don&#x27;t need rational arithmetic or floating points.<p>[1]<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Diophantine_equation#System_of_linear_Diophantine_equations" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Diophantine_equation#System_of...</a> [2]<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Smith_normal_form" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Smith_normal_form</a>
评论 #11078322 未加载
评论 #11078801 未加载
ameliusover 9 years ago
Does this mean that, conversely, we can solve integer programming problems by doing chemical experiments?
评论 #11077508 未加载
评论 #11078600 未加载
theideasmithover 9 years ago
My face lit up when I found this paper after beginning balancing chemical equations in my 10th grade chemistry class this morning - so I thought I share it with HN.
评论 #11081794 未加载
vondurover 9 years ago
I&#x27;d always assumed that stoichiometry problems could be solved with linear algebra, but was too lazy to investigate. Usually the problems assigned were easy enough that you didn&#x27;t have to work too hard to figure them out.