ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Общий форум

Boyer-Moore in exchange for a bier...Tempting??
Послано Manolache Adrian 21 июн 2004 22:18
        Boyer-Moore in exchange for a bier...Tempting??
Searching a substring in a given text... How hard can it be??
Well it's not very hard but it's very slow if your thinking at O(N*N).
An improved solution was given by Rabin and Karp ( O(n) in the best case ) but this is not
enough... if there was something with O(n) in all cases...
2 more remarcable solutions were given by:
 - (1977) Knuth, Morris and Pratt, an algorithm with O(n) in all the cases
 - (1977) Boyer-Moore, offered the best solution known until then (and now)
       for searching a substring in a given text

Enough with the history lessons!!!
I searched the INTERNET for the last algorithm but I didn't have any luck
(what is it with this algorhitm - secret or something???)
ANYWAY I see there are some really clever guys here and I wondered if someone can help me...
anyone out there?...
So, if you know something about the Boyer-Moore algorithm and you want to share with
others (especially with me) don't be shy!
Source ( /*prefferably commented*/ ) C/C++/Pascal is welcomed like any other comment or
suggestion.

The One who will give the best explanation will be rewarded with a bier, or maybe a juice
if he/she doesn't drink bier, when they will come visit me ROMANIA.

I finish with my e-mail adress in case you need it:
progady@enigma.ro

P.S.
Sorry for my english/vocabulary mistakes if there are any of them.
By the way if no one will help me I will be killed and eaten by a group of
blood-thirsty, programmer-eating beasts!
Re: Boyer-Moore in exchange for a bier...Tempting??
Послано Danica Porobic 22 июн 2004 01:58
Hi!
Being intrigued by your long and funny post I've found interesting paper on string searching algorithms, with full explanation and details about Boyer-Moore algorithm:
http://www.cs.sunysb.edu/~algorith/implement/watson/distrib/spare/pattm.ps

You will probably be interested in homepage of J Strother Moore, one of the inventor of the algorithm
http://www.cs.utexas.edu/users/moore/welcome.html

I have one more link with basic explanation and visual animatoin in java, together with source code in c on this very good french site on string matching:
http://www-igm.univ-mlv.fr/~lecroq/string/node14.html

If you need more info, just ask...

All the best,
Danica
Re: Boyer-Moore in exchange for a bier...Tempting??
Послано Manolache Adrian 24 июн 2004 20:28
Well, it seem's there is somebody out there after all...
Hmm... I was starting to think I'm all alone in the dark...
just me and...
This start's to sound like a horror movie, so i will go on
with this:
Thank you for your reply, but once again this demonstrates
that I am a very unlucky person. This time is not so bad
(this year I lost the city olympiad because the name of my
source was not 8 character's long... When I think that the
second problem was perfect!... but the output was from
x,y, length instead of length ,x,y-> but it still managed to get 20 points because sometimes this values were equal... just like in the stupid test of the problem.)
Anyway I started jumping up and down when I saw your reply
but when i clicked every single link the same apocalyptic
message: "could not find server"
Well what shall I do in this case? Should I commit suicide?
No because i did not finished my first game in opengl so
I Need some help (you could e-mail me some source code or papers) if you don't have anything else to do...
(you know, feeding your dog/cat, killing my CHEMISTRY TEACHER)
Thanks again and hope to hear from you soon!
I have to mention that I don't have internet at home (I am not very rich you know... but still i'm doing well) and
know i'm at a internet cafe.
Good bye for now from an unlucky 17 year old boy...
just hope i will not be hit by a car on my way home...
:) (-)
Послано Dmitry 'Diman_YES' Kovalioff. Retired 25 июн 2004 10:54
Re: Boyer-Moore in exchange for a bier...Tempting??
Послано Saturn (HUS) 25 июн 2004 13:16
All the links are correct!
May be therer are problems with your networks/proxies!
Re: Boyer-Moore in exchange for a bier...Tempting??
Послано Manolache Adrian 30 июн 2004 21:12
Finally... I managed to get the code
Thanks.