Click here to Skip to main content
15,887,214 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Pattern Cracking Question Pin
dasblinkenlight20-Jun-11 9:36
dasblinkenlight20-Jun-11 9:36 
AnswerRe: Pattern Cracking Question Pin
musefan21-Jun-11 0:34
musefan21-Jun-11 0:34 
GeneralRe: Pattern Cracking Question Pin
YSLGuru21-Jun-11 10:41
YSLGuru21-Jun-11 10:41 
GeneralRe: Pattern Cracking Question Pin
BobJanova22-Jun-11 0:33
BobJanova22-Jun-11 0:33 
GeneralRe: Pattern Cracking Question Pin
musefan22-Jun-11 3:34
musefan22-Jun-11 3:34 
GeneralRe: Pattern Cracking Question Pin
BobJanova22-Jun-11 4:34
BobJanova22-Jun-11 4:34 
Questionmerge k AVL trees complexity Pin
Hesham Yassin16-Jun-11 0:14
Hesham Yassin16-Jun-11 0:14 
AnswerRe: merge k AVL trees complexity Pin
Alan Balkany16-Jun-11 5:13
Alan Balkany16-Jun-11 5:13 
If you handle every node in every tree, the complexity will be O(the sum of their nodes number).

So one way to disprove this is to come up with a merging algorithm that avoids handling every node. One way to avoid handling every node is to reuse the existing structure of the AVL trees.

This can be done in trivial cases where the ranges of key values for the trees don't overlap. If they DO overlap (which is most likely), then you have a much more difficult problem, because you have to "weave" one tree into another, while maintaining the tree's balanced property.

You may be able to find subtrees whose key values don't overlap, and merge these. Using bigger building blocks like this avoids handling every node, and reduces the time complexity of your algorithm. After merging, you will probably have to do a little rearranging to restore the balanced property.

But it seems very hard, and in most cases, probably impossible.
GeneralRe: merge k AVL trees complexity Pin
dasblinkenlight17-Jun-11 10:10
dasblinkenlight17-Jun-11 10:10 
AnswerRe: merge k AVL trees complexity Pin
dasblinkenlight17-Jun-11 10:08
dasblinkenlight17-Jun-11 10:08 
GeneralRe: merge k AVL trees complexity Pin
Hesham Yassin17-Jun-11 10:49
Hesham Yassin17-Jun-11 10:49 
QuestionEye-like Algorithm Pin
JustWorking14-Jun-11 2:46
JustWorking14-Jun-11 2:46 
AnswerRe: Eye-like Algorithm Pin
phil.o14-Jun-11 3:39
professionalphil.o14-Jun-11 3:39 
GeneralRe: Eye-like Algorithm Pin
JustWorking14-Jun-11 4:07
JustWorking14-Jun-11 4:07 
GeneralRe: Eye-like Algorithm Pin
Alan Balkany14-Jun-11 4:51
Alan Balkany14-Jun-11 4:51 
GeneralRe: Eye-like Algorithm Pin
JustWorking14-Jun-11 20:27
JustWorking14-Jun-11 20:27 
QuestionPolygons from Points Pin
Kyudos31-May-11 15:28
Kyudos31-May-11 15:28 
AnswerRe: Polygons from Points Pin
YDaoust31-May-11 21:22
YDaoust31-May-11 21:22 
GeneralRe: Polygons from Points Pin
Kyudos1-Jun-11 13:32
Kyudos1-Jun-11 13:32 
AnswerRe: Polygons from Points Pin
Luc Pattyn1-Jun-11 15:23
sitebuilderLuc Pattyn1-Jun-11 15:23 
GeneralRe: Polygons from Points Pin
YDaoust1-Jun-11 21:16
YDaoust1-Jun-11 21:16 
GeneralRe: Polygons from Points Pin
YDaoust1-Jun-11 22:37
YDaoust1-Jun-11 22:37 
GeneralRe: Polygons from Points Pin
BobJanova1-Jun-11 22:58
BobJanova1-Jun-11 22:58 
QuestionDatabase of Data Types Pin
Richard Andrew x6429-May-11 20:45
professionalRichard Andrew x6429-May-11 20:45 
AnswerRe: Database of Data Types Pin
Luc Pattyn29-May-11 21:22
sitebuilderLuc Pattyn29-May-11 21:22 

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.