0% found this document useful (0 votes)
153 views4 pages

Concatenable PDF

The document discusses concatenable queues, which allow sequences represented as 2-3 trees to be concatenated and split efficiently in O(log n) time. Concatenation combines two trees T1 and T2 into a single tree T with the leaves of T1 followed by the leaves of T2. Splitting a tree T at element a produces two trees T1 and T2, where T1 contains leaves less than or equal to a and T2 contains leaves greater than a. L[v] and M[v] values are assumed to be precalculated for each vertex v to enable these operations.

Uploaded by

reettik mitra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views4 pages

Concatenable PDF

The document discusses concatenable queues, which allow sequences represented as 2-3 trees to be concatenated and split efficiently in O(log n) time. Concatenation combines two trees T1 and T2 into a single tree T with the leaves of T1 followed by the leaves of T2. Splitting a tree T at element a produces two trees T1 and T2, where T1 contains leaves less than or equal to a and T2 contains leaves greater than a. L[v] and M[v] values are assumed to be precalculated for each vertex v to enable these operations.

Uploaded by

reettik mitra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Concatenable Queue


from 2-3 trees we know how insert(), delete(), min() operation can
be executed on 2-3 trees with n nodes in at most O(log n)
complexity

EasyToStudy Point

in concatenable queue, we will show how instruction
concatenate() and split() can be executed in O(log n) time

EasyToStudy
EasyToStudyPoint
Point
Concatenable Queue

EasyToStudy Point

as we know in 2-3 tree, we calculate L[v] and M[v] for each vertex v,
so to execute Concatenate() and split() operation we are assuming
we have calculated L[v] and M[v].

EasyToStudy
EasyToStudyPoint
Point
Concatenable Queue

Concatenate(S1,S2)


takes two input sequences s1 and s2 such that every element of s1

EasyToStudy Point
is less than every element of s2 and produce new concatenated
sequence of S1S2...


if S1 is represented as a 2-3 tree T1 and S2 as a 2-3 tree T2, then we
want to combine T1 and T2 into a single 2-3 tree T having as leaves
of as the leaves of T1 in their original order followed by the leaves
of T2 in their original order

EasyToStudy
EasyToStudyPoint
Point
Concatenable Queue

SPLIT operation

Split(a,S)--- split S set into two partition S1 and S2

EasyToStudy Point

S1 is from starting of S to a

S2 is from a to end of S Set


i mean to split a 2-3 tree T into two 2-3 trees T1 and T2 such that all
leaves in T1 have less than or equal to a and all leaves in T2 have
leaves greater than a

EasyToStudy
EasyToStudyPoint
Point

You might also like