SESSION NOVEL ALGORIHMS AND APPLICATIONS + ...
SESSION NOVEL ALGORIHMS AND APPLICATIONS + ...
SESSION NOVEL ALGORIHMS AND APPLICATIONS + ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
48 Int'l Conf. Foundations of Computer Science | FCS'11 |<br />
2 The The related woks<br />
Recently, Recently, the the the generation generation of of random random geometric objects<br />
objects<br />
objects<br />
and and specially specially simple simple polygons polygons polygons has has received received some some attention attention by<br />
by<br />
researchers. For For example, example, Epstein Epstein studied studied studied the the uniformly<br />
uniformly<br />
random random generation generation of of triangulations<br />
triangulations [8]. ]. Zhu et al. presented<br />
on on an an algorithm algorithm for for generating generating x<br />
x-monotone monotone polygons on a<br />
given given set set of of vertices vertices uniformly uniformly at at random<br />
random [3]. A heuristic for<br />
the the generation generation of of simple simple polygo<br />
polygons ns was was investigated by<br />
OO'Rourke<br />
Rourke and Virmani [6]. ]. Auer and and Held presented the<br />
the<br />
following following heuristic heuristic algorithms:<br />
algorithms:<br />
• Steady Growth Growth: : an incremental algorithm adding one<br />
point after after the other other whose time time complexity in in the<br />
the<br />
the<br />
worst case and and in in the the best best case case is<br />
is<br />
, respectively.<br />
and<br />
• Space Partitionin Partitioning: g: which is a divide divide and and conquer<br />
conquer<br />
algorithm and it it has time time complexity complexity of<br />
of .<br />
• Permute & & Reject Reject: : which creates random<br />
•<br />
permutations (polygons) (polygons) and surveys surveys whether whether it it is<br />
is<br />
corresponding with a simple polygon polygon or or not, not, until until a<br />
a<br />
simple polygon polygon is encountered. encountered. Its Its complexity complexity is<br />
is<br />
.<br />
2-opt opt Moves Moves: : which by starting from a a completely<br />
completely<br />
random polygon polygon and replacing its intersected edges edges edges<br />
encounters a a a simple simple simple polygon polygon and and its its its complexity complexity complexity complexity is<br />
is<br />
[2].<br />
3 Preliminaries<br />
Let be a set of random random vertices, there exists simple<br />
polygons on<br />
in total, such that every every polygon is is generated<br />
with with probability . it is s supposed that no no three points points are<br />
are<br />
linear. linear. A A simple simple simple polygon, polygon, polygon, is is a a limited limited plane plane by by by a a limited limited limited set set set of<br />
of<br />
of<br />
line line segments segments that that form form a a simple simple closed closed closed curve. curve. curve. In In In other other other words,<br />
words,<br />
words,<br />
a a simple polygon on , is a a polygon whose edges edges don't<br />
intersect one another except except on on ve vertices .<br />
A A convex convex polygon, polygon, is is is a a a simple simple simple polygon polygon which which for for both both both of<br />
of<br />
of<br />
vertices and from polygon, the the line line segment segment lies inside<br />
or on its border, i.e.,<br />
. The convex convex hull of a finite<br />
set set of of points points on on the the plane plane (<br />
( ) is is the smallest smallest co convex<br />
polygon that encloses . The smallest polygon means that<br />
there there is no polygon such that (Figure2).<br />
Let be the number of of all all convex convex convex hull hull layers layers on on the the set set of<br />
of<br />
points . . Every layer is is defined defined by<br />
by ( and ).<br />
By By the the supposition supposition of of numbering numbering numbering layers layers layers from from from the the most<br />
most<br />
most<br />
internal internal to to to the the most most external external convex convex hull hull layers,<br />
layers, layers, is<br />
supposed supposed to to be be the the the number number of of the the most most most internal internal convex convex hull<br />
hull<br />
layer, i.e., .<br />
Vertex sees vertex if and doesn't lie out of .<br />
In this case<br />
is visible from or in other words words has<br />
visibility visibility toward toward . The The polar sorting, sorting, is is the sorting of of a a set set of<br />
of<br />
vertices vertices around around a a given vertex vertex acco<br />
according rding to polar angle. The<br />
star star-shaped shaped shaped polygon, polygon, is is is a a a polygon polygon polygon which which is is is visible visible visible at at least<br />
least<br />
fro from m m an an interior interior vertex. vertex. In In the the next next section, section, the the proposed<br />
proposed<br />
heuristic heuristic algorithm algorithm is is is posed posed posed to to to generate generate generate random random random sunflower<br />
sunflower<br />
sunflower<br />
polygon.<br />
4<br />
Fig.<br />
2. The convex hull of of set of of points<br />
The proposed algorithm<br />
In In this this section, section, an an an algorithm algorithm is is posed posed to generate generate generate the<br />
the<br />
random sunflower sunflower polygon polygon with with time time complexity<br />
complexity<br />
in which is the number of vertices.<br />
To To generate generate a a random random sunflower sunflower sunflower polygon polygon on on a a a vertex vertex vertex set set it it it is<br />
is<br />
is<br />
performed in in this this way that first, According According to Graham greedy<br />
algorithm, the assumption assumption is is obtained. obtained. The The Graham<br />
algorithm for the the generation generation of<br />
of performs performs in this way:<br />
• First, the vertex with lowest -coordinate coordinate which is<br />
the the rightmost rightmost point, point, has has selected selected from from the the point point set<br />
set<br />
and is called ! &.<br />
• All All the the remaining remaining points points are are sorted sorted around around<br />
! &<br />
according to to polar polar angle<br />
angle ! ' * ' ! 1, .<br />
• A stack is constructed and ! & and ! are pushed to it.<br />
• By starting from point point ! to ! +, , for every vertices<br />
the following case is investigated:<br />
• ! is is pushed pushed in in the the stack stack if it is is left left of of two two tops tops of of the<br />
the<br />
stack and is incremented counter "; ; otherwise, the<br />
top of stack stack is removed if ! is is right of of two tops of<br />
of<br />
the stack (Figure 3).<br />
Algorithm Algorithm: : Graham Scan<br />
Find rightmost lowest point; lable it ! &.<br />
Sort all other other points angulary about ! &.<br />
Stack # ! ' ! & # ! (''<br />
! (, - . indexes top.<br />
" # $<br />
While " % do<br />
If ! strictly left of ! (, ! ( Then<br />
Push ! )' and set " / " 0<br />
Else<br />
Pop<br />
End If<br />
End While hile<br />
Fig Fig. 3. The Graham scan algorithm<br />
Time complexity of Graham Graham algorithm is is . After<br />
determining , while is is opposite of zero, Graham<br />
algori algorithm thm is recalled for any remaining point set . Let the