10.07.2015 Views

Information Theory, Inference, and Learning ... - Inference Group

Information Theory, Inference, and Learning ... - Inference Group

Information Theory, Inference, and Learning ... - Inference Group

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Copyright Cambridge University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981You can buy this book for 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links.16Message PassingOne of the themes of this book is the idea of doing complicated calculationsusing simple distributed hardware. It turns out that quite a few interestingproblems can be solved by message-passing algorithms, in which simple messagesare passed locally among simple processors whose operations lead, aftersome time, to the solution of a global problem.16.1 CountingAs an example, consider a line of soldiers walking in the mist. The comm<strong>and</strong>erwishes to perform the complex calculation of counting the number of soldiersin the line. This problem could be solved in two ways.First there is a solution that uses expensive hardware: the loud boomingvoices of the comm<strong>and</strong>er <strong>and</strong> his men. The comm<strong>and</strong>er could shout ‘all soldiersreport back to me within one minute!’, then he could listen carefully as themen respond ‘Molesworth here sir!’, ‘Fotherington–Thomas here sir!’, <strong>and</strong> soon. This solution relies on several expensive pieces of hardware: there must bea reliable communication channel to <strong>and</strong> from every soldier; the comm<strong>and</strong>ermust be able to listen to all the incoming messages – even when there arehundreds of soldiers – <strong>and</strong> must be able to count; <strong>and</strong> all the soldiers must bewell-fed if they are to be able to shout back across the possibly-large distanceseparating them from the comm<strong>and</strong>er.The second way of finding this global function, the number of soldiers,does not require global communication hardware, high IQ, or good food; wesimply require that each soldier can communicate single integers with the twoadjacent soldiers in the line, <strong>and</strong> that the soldiers are capable of adding oneto a number. Each soldier follows these rules:1. If you are the front soldier in the line, say the number ‘one’ to thesoldier behind you.Algorithm 16.1. Message-passingrule-set A.2. If you are the rearmost soldier in the line, say the number ‘one’ tothe soldier in front of you.3. If a soldier ahead of or behind you says a number to you, add oneto it, <strong>and</strong> say the new number to the soldier on the other side.If the clever comm<strong>and</strong>er can not only add one to a number, but also addtwo numbers together, then he can find the global number of soldiers by simplyadding together:241

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!