implemented using an AVL tree (a self-balancing
binary search tree). The list of events includes vertex
events and circle events. The total number of events
for an PF with n vertices is π(π), and the
complexity of processing one event is π(πππ π).
A SL Status is a Dictionary structure that
supports insertion, deletion, lookup, and neighbor
selection for an ordered set of zones on a SL. The
standard implementation of this structure based on
the AVL tree is unable to take into account two
features of the dynamic set of zones. Firstly, zones
are inserted into the status in most cases not one at a
time, but in batches of up to 5 zones at the same
time. Secondly, all zones in one package have zero
sizes at birth, i.e. are points on the SL that have the
same ordinate. Therefore, it is necessary to insert the
entire package of zones in one operation in a given
sequence, as shown above in section 5. To solve this
problem, it is proposed to implement the Status
using a combination of a list of zones and an AVL
tree of monotonous border branches described in
section 2 and shown in Fig.3.
The list contains a set of zones ordered from
bottom to top. The operations of inserting and
deleting zones in the list are performed in constant
time, if the place of insertion or deletion is known.
In the case of the events "Passing vertex" and "Right
vertex" this place is a zone of this vertex or of
incident sites-segments. Thus, the processing of
these events is performed in constant time.
For the "Left vertex" event, the insertion place is
not known in advance, it must be determined based
on the localization of this vertex in the current set of
zones. The list makes it possible to do this only by
sequential testing of zones. This operation has linear
complexity in the number of zones. Since the
number of zones in the state and the number of left
vertices in the PF is π(π), the localization of all left
vertices in the list has complexity π(π
ξ¬Ά
), which is
unacceptable.
It is proposed to localize the left vertex in two
stages: first, find the section in which the vertex is
located, and then find the required zone in this
section. The AVL-tree of monotone branches
crossing the SL is used to search for a section (Fig.
3). The branches are ordered from bottom to top at
the point of events, each pair of neighboring
branches defines a section of the SL. This structure
defines the section where the left vertex is located.
Since the number of sections is π(π), finding a
section for a single vertex has π(πππ π) complexity.
The search for the zone for the left vertex is
performed on the found section. The section
boundaries are defined by a pair of branches - upper
and lower. And the branches have links to adjacent
zones in the list, so the upper and lower zones of
each section are known.
Further localization of the left vertex requires
checking all zones of the section. For this purpose,
the "fork" algorithm is proposed. The idea of the
algorithm is to check the zones alternately from two
edges inside the section.
Assume that the site contains k zones π§

,β¦,π§
ξ―
.
The pair (π§
ξ―ξ―’ξ―ͺ
,π§
ξ―¨ξ―£
) defines the lower and upper
zones of the search interval. First π§
ξ―ξ―’ξ―ͺ
= π§

, π§
ξ―¨ξ―£
=
π§
ξ―
. Let's also designate z.ππππ£π and π§.π’ππππ the
zones in the status, located above and below the
zone π§.
The search for the zone containing the left vertex
π£ is carried out iteratively, each iteration includes
two checks:
if the vertex π£ is located in the zone π§
ξ―ξ―’ξ―ͺ
, then
π§
ξ―ξ―’ξ―ͺ
is returned, otherwise the search interval is
compressed from below π§
ξ―ξ―’ξ―ͺ
=π§
ξ―ξ―’ξ―ͺ
.ππππ£π;
if the vertex π£ is located in the zone π§
ξ―¨ξ―£
, then
π§
ξ―¨ξ―£
is returned, otherwise the search interval is
compressed from above, π§
ξ―¨ξ―£
=π§
ξ―¨ξ―£
.π’ππππ.
This iterative process is guaranteed to end
successfully, since the vertex v necessarily falls into
one of the zones in this section. The computational
complexity of the search will be π(π). In this case,
the maximum number of checks π will be required
in the case when the vertex π£ lies in the median zone
π§
ξ―§
, π‘=ο
ξ―
ξ¬Ά
ο, which occupies the middle position in
the section.
Let us show that the localization of all left
vertices in the zones of the SL has complexity
π(π πππ π ). The number of zones generated during
sweeping is O(n). Without loss of generality, we
assume that there are exactly π zones. Let π be the
number of left vertices of the PF π=π(π). Let us
estimate the maximum number of checks for the
entire time of operation. When the βleft vertexβ
event occurs, the maximum number of checks will
be required if two conditions are met:
β’ the vertex is localized in the section with the
largest number of zones,
β’ when localized on the section, the vertex falls
into the median zone, that is, π checks are
performed.
Thus, if the maximum number of checks is
always performed, then π checks are made for the
first left vertex in a section of π zones. After the
formation of new zones associated with the vertex
event, two new sections are formed that will contain
ξ―‘
ξ¬Ά
zones each. Two subsequent localizations with the