• Aucun résultat trouvé

2 LEP and CFP with 3 or 4 robots.

N/A
N/A
Protected

Academic year: 2022

Partager "2 LEP and CFP with 3 or 4 robots."

Copied!
4
0
0

Texte intégral

(1)

Master 2

Leader Election and Circle Formation in Robot Networks (Exercises)

Mika¨el Rabie Franck Petit

We investigate the Leader Election Problem (LEP) and the Circle Formation Problem (CFP) in a robot networks of 3 or 4 robots. The former consists in providing an answer to the following question: “Given a set of robots (or sensors) scattered on the plane where no two robots are located at the same position, what are the (minimal) geometric conditions to be able to deterministically agree on a single robot L, called the leader?” The latter consists in the design of a distributed protocol which arranges a group ofn mobile robots with initial distinct positions into a regularn-gon in finite time, where a regular n-gon is defined as follows:

Definition 1 (regular n-gon) A set of n robots (n≥ 2) forms (or is arranged in) a regular n-gon if the robots take place on the circumference of a circle C centered in O such that for every pair ri, rj of robots, if rj is the successor of ri on C, thenr\iOrj =δ, where δ= n. The angle δ is called the characteristic angleof the n-gon.

The robots are assumed to be uniform and anonymous, i.e., they all execute the same program using no local parameter (such that a visual identity) allowing to differentiate any of them. However, we assume that each robot is a computational unit having the ability to determine the positions of the n robots within an infinite decimal precision. We assume no kind of communication medium. Each robot has its own localx-yCartesian coordinate system defined by two coordinate axes (x and y), together with their orientations, identified as the positive and negative sides of the axes.

1 LEP 101

Question 1 Let a set of n >0 robots scattered on the plane. Assume that the robots share the same coordinate system. Provide a distributed algorithm electing a unique leader, L, followed with a sketch of proof.

Question 2 Given n≥2 robots scattered on the plane, is it always possible to elect a leader L assuming that the robots share the oriented direction of a common axis only? If the answer is

“yes”, then provide a distributed algorithm and prove it. Otherwise, show a counter-example.

Question 3 With the same settings as for Question 2, can we refine the result with respect to n? If the answer is “yes”, then provide a distributed algorithm whenever it make sense and sketch its proof. If the answer is “no”, provide a sketch of proof.

prenom.nom@lip6.fr

1

(2)

2 LEP and CFP with 3 or 4 robots.

In the sequel, the robots are assumed to have no sense of direction and no chirality, i.e., they do not agree on a common orientation nor handedness.

2.1 n= 3

Question 4 For the special case n= 3, provide a LEP algorithm.

Question 5 From the previous question, deduce an algorithm for CFP with 3 robots.

2.2 n= 4

Definition 2 (Convex hull) Given a set P of n ≥ 2 points p1, p2,· · · , pn on the plane, the convex hull of P, denoted H(P) (H for short), is the smallest polygon such that every point in P is either on an edges of H(P) or inside it.

Informally, it is the shape of a rubber-band stretched aroundp1, p2,· · ·, pn. The convex hull is unique and can be computed with time complexity O(nlogn).

A convex hull H is called a (convex) quadrilateral (respectively, triangle) if H forms a polygon with four (resp. three) sides (or edges) and vertices (or, corners). In the sequel, we consider convex quadrilaterals (resp. triangle) only. If a convex hull H forms a quadrilateral, then the center of H is the point, denoted O, where the diagonals of H cross each other. If a convex hullHforms a triangle, then thecenter ofHis the point, denotedO, which is equidistant of each of the three sides ofH —O is the center of the largest circle insideH. A quadrilateral is said to beperpendicular if and only if its diagonals are perpendicular–Fig.1. Otherwise, it is called anon-perpendicular quadrilateral.

O b

a

d c

Figure 1: A perpendicular quadrilateral.

A triangle is said to be equilateral if all its sides are of equal length. An isosceles triangle has two sides of equal length. A triangle having all sides of different lengths is said to bescalene.

A trapezoid is a quadrilateral with at least one pair of opposite sides parallel. An isosceles trapezoid (Fig.2) is a trapezoid whose the diagonals are of equal length.

A parallelogram is a quadrilateral with both pairs of opposite sides parallel.

A rectangle is defined as a parallelogram where all four of its angles are right angles. A square is a rectangle perpendicular quadrilateral.

Question 6 Propose an algorithm that, starting from a perpendicular quadrilateral, leads the 4 robots to eventually form a square.

IfHforms a triangle, then there is a robotrwhich is located either insideH (Fig. 4, Casea) or between two of the three corners of the triangle. In the latter case, three out of the four

2

(3)

b

a a

b

Figure 2: A (non rectangle) isoceles trapezoid.

a b

a b

Figure 3: A (non rectangle) parallelogram.

robotsq,r, andsare aligned on a lineL(rbelonging to the segment [q, s]), whereas the fourth robot t does not. Such a configuration is called a (arbitrary) delta—refer to Fig. 4, Case b) . If the line L0 passing through r and t is perpendicular to L, then the delta is said to be perpendicular—refer to Fig. 4, Case c.

(b) Non−Perpendicular Delta

r s

t

q r s

t

L

(c) Perpendicular Delta L

(a) Non−Delta Triangle

q

Figure 4: Three examples of triangle configurations.

Question 7 Propose an algorithm that, starting from an arbitrary triangle, leads the 4 robots to eventually form a perpendicular delta.

Question 8 Propose an algorithm that, starting from perpendicular delta, leads the 4 robots to eventually form a square.

When the convex hullHforms an arbitrary quadrilateral which is not perpendicular, a rect- angle, an isosceles trapezoid, nor a parallelogram, thenHis called anasymmetricquadrilateral—

Fig. 5.

Question 9 Propose an algorithm that, starting from an asymmetric quadrilateral, leads the 4 robots to eventually form a non-perpendicular delta.

3

(4)

d

a c

b

Figure 5: An asymmetric quadrilateral.

Question 10 Propose an algorithm that, starting from a non-rectangle parallelogram, eventu- ally forms either a square or an asymmetric quadrilateral.

Question 11 Propose an algorithm that, starting from a non-rectangle isosceles trapezoid, eventually forms either a square or an asymmetric quadrilateral.

Question 12 Propose an algorithm that, starting from a rectangle, eventually forms either a square, a non-rectangle parallelogram, a non-rectangle isosceles trapezoid, or an asymmetric quadrilateral.

Question 13 Starting from a configuration where the 4 robots are aligned, what are the target forms by moving the two internal robots only?

Question 14 Starting from any configuration, propose an algorithm that eventually forms an square.

4

Références

Documents relatifs

On cherche la mesure de l’angle dans le triangle IJK rectangle en I. Par rapport à cet angle, on connaît la longueur des trois côtés, on peut donc utiliser au choix les

Propriété : Les diagonales d’un rectangle sont de même longueur et se coupent en leur milieu.. Ainsi O est le centre du cercle passant par les 4 sommets A, B,

Si le carré de la longueur de l'hypoténuse est égal à la somme des carrés des deux autres côtés, alors le triangle est rectangle.. Autrement dit, si l’égalité du théorème

alors le carré de la longueur de l'hypoténuse est égal à la somme des carrés des deux autres côtés...

Bordures : http://www.teacherspayteachers.com/Store/Baldo-Alvarez...

[r]

Si le carré du plus grand coté d’un triangle n’est pas égal à la somme des carrés des deux autres cotés, alors le triangle n’est

Si le carré du plus grand coté d’un triangle n’est pas égal à la somme des carrés des deux autres cotés, alors le triangle n’est