Click here to Skip to main content
15,891,248 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Mark Churchill29-Aug-07 18:26
Mark Churchill29-Aug-07 18:26 
AnswerRe: Substring Matching (Harder than it sounds) Pin
cp987629-Aug-07 23:55
cp987629-Aug-07 23:55 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums30-Aug-07 4:04
Skippums30-Aug-07 4:04 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 11:23
Skippums4-Sep-07 11:23 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn4-Sep-07 13:06
sitebuilderLuc Pattyn4-Sep-07 13:06 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 13:26
Skippums4-Sep-07 13:26 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn5-Sep-07 9:00
sitebuilderLuc Pattyn5-Sep-07 9:00 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums5-Sep-07 10:46
Skippums5-Sep-07 10:46 
Worst case that I can think of is if you have a string like 0101010...10 of length m = 2^i-1 where i is a + int, and another of all 1's of length n where n is any + int > m. Then this algorithm will perform approximately (m / 2) * 2 * n * log2(m + 1) = m*n*i operations, or O(n*n*log(n)). So I guess that solves whether or not it is O(n * log(n))! It still should outperform almost any other algorithm when 1) The alphabet over which you are performing the search is reasonably large, 2) The expected overlap between the two strings is reasonably large. Ultimately, I don't really care what the final time is on this algorithm. I am really only looking for any advice on how I can improve it. Thanks,

Jeff
GeneralRe: Substring Matching (Harder than it sounds) Pin
Member 419459329-Mar-08 9:55
Member 419459329-Mar-08 9:55 
QuestionNeed some intelligent people... Pin
Paddy Boyd29-Aug-07 2:20
Paddy Boyd29-Aug-07 2:20 
AnswerRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 2:56
sitebuilderLuc Pattyn29-Aug-07 2:56 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 3:42
Paddy Boyd29-Aug-07 3:42 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 3:55
Paddy Boyd29-Aug-07 3:55 
GeneralRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 4:42
sitebuilderLuc Pattyn29-Aug-07 4:42 
GeneralRe: Need some intelligent people... Pin
Paddy Boyd29-Aug-07 4:44
Paddy Boyd29-Aug-07 4:44 
AnswerRe: Need some intelligent people... Pin
Russell'29-Aug-07 4:54
Russell'29-Aug-07 4:54 
AnswerRe: Need some intelligent people... Pin
cp987629-Aug-07 16:18
cp987629-Aug-07 16:18 
GeneralRe: Need some intelligent people... Pin
Luc Pattyn29-Aug-07 23:41
sitebuilderLuc Pattyn29-Aug-07 23:41 
QuestionGenetic Algorithm Pin
starist26-Aug-07 4:58
starist26-Aug-07 4:58 
AnswerRe: Genetic Algorithm Pin
Russell'26-Aug-07 22:08
Russell'26-Aug-07 22:08 
QuestionCOMBINATION Pin
Heljeeve22-Aug-07 23:36
Heljeeve22-Aug-07 23:36 
AnswerRe: COMBINATION Pin
Giorgi Dalakishvili22-Aug-07 23:51
mentorGiorgi Dalakishvili22-Aug-07 23:51 
AnswerRe: COMBINATION Pin
Russell'23-Aug-07 0:04
Russell'23-Aug-07 0:04 
AnswerRe: COMBINATION Pin
Giorgi Dalakishvili24-Aug-07 12:03
mentorGiorgi Dalakishvili24-Aug-07 12:03 
QuestionCircle Drawing Algorith... Pin
himuskanhere21-Aug-07 23:18
himuskanhere21-Aug-07 23:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.