------art_28_28939322.1125353190237
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Here comes my solution. It relies on the priority queue posted in
another mail and is really fast.

It includes an intelligent neighbour finder and features the A*
algorithm in "starring" role.

regards,

Brian

-- 
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/

------art_28_28939322.1125353190237
Content-Type: application/x-ruby; name="wordchain.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="wordchain.rb"

IyEvdXNyL2Jpbi9ydWJ5IC13IC1LdQoKIyBCdWlsZCBhIGNoYWluIG9mIHdvcmRzLCB3aGVyZSBl
YWNoIG5leHQgd29yZCBpbiB0aGUgY2hhaW4gY2hhbmdlcyBvbmx5IG9uZSBsZXR0ZXIgYWdhaW5z
dCB0aGUgZm9ybWVyLgojCiMgV2h5IGlzIG15IHNvbHV0aW9uIGZhc3Q6CiMgMSkgSSB1c2UgdGhl
IEEqIGFsZ29yaXRobQojIDIpIEkgdXNlIGEgcmVhbCBwcmlvcml0eSBxdWV1ZSBpbXBsZW1lbnRl
ZCBpbiBDIHdpdGg6CiMgICAgICBhbW9ydGl6ZWQgTygxKSBpbnNlcnQsIGRlY3JlYXNlX3ByaW9y
aXR5CiMgICAgICBhbW9ydGl6ZWQgTyhsb2cgbikgZGVsZXRlX21pbiAgCiMKIyBJIGNhbGN1bGF0
ZSB0aGUgbmVpZ2hib3VycyBsYXppbHkgd2hlbiBuZWVkZWQuCiMgSSB1c2UgYSBuaWZ0eSBwYXJ0
aXRpb25pbmcgb2YgdGhlIHdvcmRzIHRoYXQgbWFrZXMgbmVpZ2hib3VyIGNhbGN1bGF0aW9uCiMg
YSB1bmlvbiBvZiBvbmx5IHdvcmQtbGVuZ3RoIHNldC4KCiMgVE9ETzogUmVmYWt0b3IgU2VhcmNo
IEFsZ29yaXRobXMgaW50byBvd24gdW5pdApyZXF1aXJlICdwcmlvcml0eV9xdWV1ZScKcmVxdWly
Z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2UgaGltIHdvcmsgIyMjCgogIHdhcm4gIkxvYWRp
bmcgZGF0YWJhc2UiCiAgd29yZG5ldCA9IFdvcmROZXQubG9hZChvcHRpb25zLmRhdGFiYXNlKQoK
ICB3YXJuICJTZWFyY2hpbmcgd29yZCIKICBwdXRzIHdvcmRuZXQuZmluZF9jaGFpbigqQVJHVikK
ZW5kCg------art_28_28939322.1125353190237
Content-Type: application/octet-stream; name="README"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="README"

IyBSdWJ5IGV4dGVuc2lvbiBpbXBsZW1lbnRpbmcgYSBwcmlvcml0eSBxdWV1ZQoKIyMgRGVzY3Jp
cHRpb24KVGhpcyBpcyBhIGZpYm9uYWN5IGhlYXAgcHJpb3JpdHkgcXVldWUgaW1wbGVtZW50YXRp
b24uIFRoYXQgbWVhbnMKCmluc2VydDogICAgICAgICAgICAgICAgICAgICAgTygxKQpkZWNyZWFz
ZV9wcmlvcml0eTogQW1vcnRpemVkIE8oMSkKZGVsZXRlX21pbjogICAgICAgIEFtb3J0aXplZCBP
KGxvZyBuKQoKIyMgTGVnYWwgc3R1ZmYKKGMpIDIwMDUgQnJpYW4gU2NocvZkZXIKClBsZWFzZSBz
dWJtaXQgYnVncmVwb3J0cyB0byBwcmlvcml0eV9xdWV1ZUBicmlhbi1zY2hyb2VkZXIuZGUKClRo
aXMgZXh0ZW5zaW9uIGlzIHVuZGVyIHRoZSBzYW1lIGxpY2Vuc2UgYXMgcnVieS4KCkRvIG5vdCBo
b2xkIG1lIHJlbGlhYmxlIGZvciBhbnl0aGluZyB0aGF0IGhhcHBlbnMgdG8geW91LCB5b3VyIHBy
b2dyYW1zIG9yCmFueXRoaW5nIGVsc2UgYmVjYXVzZSBvZiB0aGlzIGV4dGVuc2lvbi4gSXQgd29y
a2VkIGZvciBtZSwgYnV0IHRoZXJlIGlzIG5vCmd1YXJhbnRlZSBpdCB3aWxsIHdvcmsgZm9yIHlv
dS4KCiMjIEluc3RhbGxhdGlvbgokIHJ1YnkgZXh0Y29uZi5yYgokIG1ha2UKCnB1dCBwcmlvcml0
eV9xdWV1ZS5zbyBzb21ld2hlcmUgd2hlcmUgeW91ciBwcm9ncmFtIGNhbiBmaW5kIGl0LiBFLmcu
IC91c3IvbG9jYWwvbGliL3J1YnkvMS44L3ByaW9yaXR5X3F1ZXVlLnNvCgojIyBVc2FnZQoKICAg
IHJlcXVpcmUgJ3ByaW9yaXR5X3F1ZXVlJwoKICAgIHEgPSBQcmlvcml0eVF1ZXVlLm5ldwogICAg
cS5wdXNoICJub2RlMSIsIDAgCiAgICBxLnB1dHMgIm5vZGUyIiwgMQoKICAgIHEubWluICM9PiAi
bm9kZTEiCgogICAgcS5kZWNyZWFzZV9wcmlvcml0eSgibm9kZTIiLCAtMSkKCiAgICBxLnBvcF9t
aW4gIz0+ICJub2RlMiIKICAgIHEubWluICAgICAjPT4gIm5vZGUxIgo------art_28_28939322.1125353190237
Content-Type: text/x-csrc; name="priority_queue.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="priority_queue.c"

Ly8KLy8gUnVieSBleHRlbnNpb24gaW1wbGVtZW50aW5nIGEgcHJpb3JpdHkgcXVldWUKLy8gCi8v
IFRoaXMgaXMgYSBmaWJvbmFjeSBoZWFwIHByaW9yaXR5IHF1ZXVlIGltcGxlbWVudGF0aW9uLgov
LwovLyAoYykgMjAwNSBCcmlhbiBTY2hy9mRlcgovLwovLyBQbGVhc2Ugc3VibWl0IGJ1Z3JlcG9y
dHMgdG8gcHJpb3JpdHlfcXVldWVAYnJpYW4tc2Nocm9lZGVyLmRlCi8vCi8vIFRoaXMgZXh0ZW5z
aW9uIGlzIHVuZGVyIHRoZSBzYW1lIGxpY2Vuc2UgYXMgcnVieS4KLy8gCi8vIERvIG5vdCBob2xk
IG1lIHJlbGlhYmxlIGZvciBhbnl0aGluZyB0aGF0IGhhcHBlbnMgdG8geW91LCB5b3VyIHByb2dy
YW1zIG9yCi8vIGFueXRoaW5nIGVsc2UgYmVjYX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4oImZvcm1hdCIpOwoK
ICBjUHJpb3JpdHlRdWV1ZSA9IHJiX2RlZmluZV9jbGFzcygiUHJpb3JpdHlRdWV1ZSIsIHJiX2NP
YmplY3QpOwoKICByYl9kZWZpbmVfYWxsb2NfZnVuYyhjUHJpb3JpdHlRdWV1ZSwgcHFfYWxsb2Mp
OwogIHJiX2RlZmluZV9tZXRob2QoY1ByaW9yaXR5UXVldWUsICJpbml0aWFsaXplIiwgcHFfaW5p
dCwgMCk7CiAgcmJfZGVmaW5lX21ldGhvZChjUHJpb3JpdHlRdWV1ZSwgInB1c2giLCBwcV9wdXNo
LCAyKTsKICByYl9kZWZpbmVfbWV0aG9kKGNQcmlvcml0eVF1ZXVlLCAibWluIiwgcHFfbWluLCAw
KTsKICByYl9kZWZpbmVfbWV0aG9kKGNQcmlvcml0eVF1ZXVlLCAicG9wX21pbiIsIHBxX3BvcF9t
aW4sIDApOwogIHJiX2RlZmluZV9tZXRob2QoY1ByaW9yaXR5UXVldWUsICJkZWNyZWFzZV9wcmlv
cml0eSIsIHBxX2RlY3JlYXNlX3ByaW9yaXR5LCAyKTsKICByYl9kZWZpbmVfbWV0aG9kKGNQcmlv
cml0eVF1ZXVlLCAibGVuZ3RoIiwgcHFfbGVuZ3RoLCAwKTsKICByYl9kZWZpbmVfbWV0aG9kKGNQ
cmlvcml0eVF1ZXVlLCAidG9fZG90IiwgcHFfdG9fZG90LCAwKTsKfQo------art_28_28939322.1125353190237
Content-Type: application/x-ruby; name="test.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.rb"

cmVxdWlyZSAncHJpb3JpdHlfcXVldWUnCgpyZXF1aXJlICd0ZXN0L3VuaXQnCgpjbGFzcyBUQ19w
cV90ZXN0IDwgVGVzdDo6VW5pdDo6VGVzdENhc2UKICBkZWYgc2V0dXAKICAgIEBxID0gUHJpb3Jp
dHlRdWV1ZS5uZXcKICBlbmQKCiAgZGVmIHRlc3RfcG9wX25pbAogICAgYXNzZXJ0X2Vxd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07JywKICAgICcgICAgTk9ERSAtPiBOT0RFOycsCiAgICAnICBOT0RFIC0+
IE5PREU7JywKICAgICcgICAgTk9ERSBbbGFiZWw9Ik4yICgyKSIsc2hhcGU9Ym94XTsnLAogICAg
JyAgTk9ERSAtPiBOT0RFOycsCiAgICAnfScsJyddLmpvaW4oIlxuIiksICBAcS50b19kb3QuZ3N1
YigvTk9ERVswLTldKi8sICdOT0RFJykpCiAgZW5kCmVuZAo------art_28_28939322.1125353190237
Content-Type: application/x-ruby; name="extconf.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="extconf.rb"

cmVxdWlyZSAnbWttZicKY3JlYXRlX21ha2VmaWxlKCJwcmlvcml0eV9xdWV1ZSIpCg------art_28_28939322.1125353190237--