Re: Puzzle Challenge
- To: mathgroup at smc.vnet.net
- Subject: [mg63685] Re: Puzzle Challenge
- From: Peter Pein <petsie at dordos.net>
- Date: Tue, 10 Jan 2006 01:48:40 -0500 (EST)
- References: <dptca9$t8c$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Paul schrieb: > Maxim Rytin wrote: > >>Here's a brute force search approach; we simply >>create another dictionary >>of all possible prefixes and at each step perform a >>binary search in the >>two dictionaries: > > > <snip> > >>{"anent", "apart", "apiece", "ararat", "arena", >>"astana", "centaur", >>"centric", "cents", "coled", "coped", "copier", >>"copra", "dears", >>"depart", "departs", "earner", "earpiece", "easts", >>"elope", "eloped", >>"enrico", "entrap", "ernie", "icier", "inane", >>"inaner", "leaped", >>"learn", "learner", "least", "loped", "nauru", >>"nicene", "nicer", >>"nicole", "niece", "opine", "papas", "paras", >>"partner", "parts", "pasta", >>"pasts", "pears", "pepin", "piece", "pinata", >>"pinier", "pints", "piped", >>"pleas", "poled", "price", "pricier", "prier", >>"print", "prints", "rants", >>"raped", "rapier", "rapine", "rarer", "recent", >>"recipe", "recipient", >>"recipients", "rents", "reran", "ricer", "riped", >>"sapient", "sarnie", >>"stare", "starer", "stats", "strap", "strip", >>"stripe", "striped", >>"stripier", "tantra", "tatar", "trice", "trier", >>"trina", "tripe", >>"triple", "tripled"} >> >>Maxim Rytin >>m.r at inbox.ru >> > > > Maxim Rytin, > > Thank you for participating! > > It is most interesting to see how similar and different our code blocks are. > > It will take me a little while longer to really understand yours, but in the meantime, I notice that we are getting slightly different results. Namely, I do not see items {coiner, point, points} in your result, yet these three strings appear in dictionary.txt, as well as the specified puzzle. > > > Paul > Paul and Maxim, The third sublist in LLadj should read {2,4,6,7}, not {2,4,6,8}. This causes the error. Peter