There's more than one way to do things | |
PerlMonks |
I need a help with this one- even don't know how to title thisby baxy77bax (Deacon) |
on Nov 19, 2011 at 20:42 UTC ( [id://939001]=perlquestion: print w/replies, xml ) | Need Help?? |
baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
Hi, well here comes a puzzle (at least for me it is). So again I'm not seeking for an exact code just a single or more pointers. also this is (once finished) going to be rewritten in c and that is why I would like to avoiding hashing and regex. (Also feel free, If you have erdge to criticize my posting to this forum, since it is not strictly Perl associated question)
So the problem is as follows : Then R2 kicks in and generates number 4. After that R1 again produces let say 3 numbers (13 24 21). The problem now is how to efficiently (without hashing) figure out that 24 should go into $array[3]->third track since 20+4=24, and 21 into first track since 17+4=21 and 13 in second or fourth track - it doesn't matter. This process is repeated let say 5 times: so And so on ... Has anyone came across this type of problem before and solved it ? So i can deal with linked lists, chaining arrays but not hashing since the number of operations in hashing is too big for such a case. or at least i feel it is, maybe it is not, what do you think? any advices?? thank you baxy Update to the sundialsvc4's reply:
Well the rulesare pretty simple as stated. Can I actually make it more simpler, well maybe I don't know, where should i simplify ? UPDATE: Ok , so what am i working on. It is a search engine that is based on "hiden" Viterbi probabilities (R1 and R2) and domino algorithm (numbers that im trying to match) so there is no extra information that i can give you, that is it. I just replaced those fancy words with simple ones. So what i did is, i replaced the real words with their fingerprints and bow bases on a HVB's am trying to put them back together (ofcourse much faster then regular search engine does since im not dealing with whole words). PS Based on the amount of replies, this really looks like is a tough problem without much room to move around. Thank you baxy
Back to
Seekers of Perl Wisdom
|
|