counterexamples to a minimal circumscription algorithm

3
COMPUTER VISION, GRAPHICS, AND IMAGE PROCESSING 30, 364-366 (1985) NOTE Counterexamples to a Minimal Circumscription Algorithm JOSEPH O'ROuRI~ Department of ElectricalEngineering and Computer Science, Johns Hopkins University, Baltimore, Maryland 21218 Received July 9, 1984; accepted November 28, 1984 A recent paper by Doff and Ben-Bassat presented an algorithm for finding a minimal area k-gon circumscribing a given convex n-gon, where k < n. An infinite class of polygons for which their algorithm fails to find the minimal area circumscribing k-gon is presented. © 1985 Academic Press, Inc. 1. INTRODUCTION Dori and Ben-Bassat have recently presented an algorithm that accepts an arbitrary convex n-gon P, as input, and produces as output minimal area k-gons Pk circumscribing P,, for all k, 3 < k < n - 1 [2]. Their algorithm is iterative, produc- ing P,_ 1 from P~ by replacing two edges of P~ by one, producing P,_ 2 from P~_ 1 by replacing two edges of P~_ 1 by one, and so on. Define the contact for an edge of a circumscribing polygon Pk as the edge or vertex of the inscribed polygon P~ that it touches; every edge of Pk has a contact. Without entering into the details of their algorithm, the following is immediate from its structure: LEMMA 1. The polygon P~_ 1 produced by the algorithm of Dori and Ben-Bassat [2, Algorithm O, p. 144] shares k- 2 contacts with Pk, the previous polygon in the produced sequence. Proof. Pk has k contacts. Algorithm 0 calls Algorithm 1 [2, p. 141] and then perhaps Algorithm 3 [2, p. 143] to adjust the result of Algorithm 1. Algorithm 1 breaks two contacts, and one is added, either by Algorithms 1 or 3; k - 2 contacts are unaffected. Q.E.D. 2. COUNTEREXAMPLES As Doff and Ben-Bassat note, "optimal circumscription of a circle by a polygon is obtained when the polygon is regular" [2, p. 147]. Regular k and k - I polygons for the same circle are constrained by the following lemma. LEMMA 2. If Pk and Pk-1 are regular polygons circumscribed about the same circle, then at most one contact point may be shared between them. Proof. The contact points are equally spaced around the circle, with separations 2~r/k for Pk, and 2~r/(k - 1) for Pk-1; Figure I shows the ease k = 6. These positions cannot coincide more than once, since k - I does not divide k for k > 3. Q.E.D. 364 0734-189X/85 $3.00 Copyright © 1985 by Academic Press, Inc. All rights of reproduction in any form reserved.

Upload: joseph-orourke

Post on 21-Jun-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Counterexamples to a minimal circumscription algorithm

COMPUTER VISION, GRAPHICS, AND IMAGE PROCESSING 30, 364-366 (1985)

NOTE

Counterexamples to a Minimal Circumscription Algorithm

JOSEPH O ' R O u R I ~

Department of Electrical Engineering and Computer Science, Johns Hopkins University, Baltimore, Maryland 21218

Received July 9, 1984; accepted November 28, 1984

A recent paper by Doff and Ben-Bassat presented an algorithm for finding a minimal area k-gon circumscribing a given convex n-gon, where k < n. An infinite class of polygons for which their algorithm fails to find the minimal area circumscribing k-gon is presented. © 1985 Academic Press, Inc.

1. I N T R O D U C T I O N

Dori and Ben-Bassat have recently presented an algorithm that accepts an arbitrary convex n-gon P, as input, and produces as output minimal area k-gons Pk circumscribing P,, for all k, 3 < k < n - 1 [2]. Their algorithm is iterative, produc- ing P,_ 1 from P~ by replacing two edges of P~ by one, producing P,_ 2 from P~_ 1 by replacing two edges of P~_ 1 by one, and so on. Define the contact for an edge of a circumscribing polygon Pk as the edge or vertex of the inscribed polygon P~ that it touches; every edge of Pk has a contact. Without entering into the details of their algorithm, the following is immediate from its structure:

LEMMA 1. The polygon P~_ 1 produced by the algorithm of Dori and Ben-Bassat [2, Algorithm O, p. 144] shares k - 2 contacts with Pk, the previous polygon in the produced sequence.

Proof. Pk has k contacts. Algorithm 0 calls Algorithm 1 [2, p. 141] and then perhaps Algorithm 3 [2, p. 143] to adjust the result of Algorithm 1. Algorithm 1 breaks two contacts, and one is added, either by Algorithms 1 or 3; k - 2 contacts are unaffected. Q.E.D.

2. COUNTEREXAMPLES

As Doff and Ben-Bassat note, "optimal circumscription of a circle by a polygon is obtained when the polygon is regular" [2, p. 147]. Regular k and k - I polygons for the same circle are constrained by the following lemma.

LEMMA 2. I f Pk and Pk-1 are regular polygons circumscribed about the same circle, then at most one contact point may be shared between them.

Proof. The contact points are equally spaced around the circle, with separations 2~r/k for Pk, and 2~r/(k - 1) for Pk-1; Figure I shows the ease k = 6. These positions cannot coincide more than once, since k - I does not divide k for k > 3.

Q.E.D.

364

0734-189X/85 $3.00 Copyright © 1985 by Academic Press, Inc. All rights of reproduction in any form reserved.

Page 2: Counterexamples to a minimal circumscription algorithm

MINIMAL CIRCUMSCRIPTION ALGORITHM 365

FIG. 1. A regular hexagon and pentagon circumscribed about the same circle can share at most one contact point.

The import of this lemma is that, if P, approximates a circle, with n large, then all but one contact point of Pk must be moved to produce the correct Pk-x- But Lemma 1 shows that Dori and Ben-Bassat's algorithm cannot produce the correct Pk- 1- This will be illustrated with a particular case, n = 8.

Figure 2a shows a regular octagon and a minimal circumscribing quadrilateral, a square flush on four edges. Starting from the octagon P8, Algorithm 0 of [2], if correct, will produce after four iterations the square P4 shown in Fig. 2a. Now the minimal area triangle is as shown in Fig. 2b; that this is minimal can be established in several ways. Theorems in [3] and [4] establish that only triangles with at least two flush edge contacts need to be examined. The two edge contacts are either adjacent octagon edges, or separated by one or two intermediate octagon edges. The triangle resulting from using adjacent edges as contacts has a large area, but the other two possibilities are close in area: if the octagon has unit side length, contact separation by one edge (A in Fig. 2a) yields an area of 4 + 1 + 3v~- = 8.493, while separation by two edges (B and C in Fig. 2b) leads to an area of 4 + 3~- -- 8.243.

The algorithm of Dori and Ben-Bassat must, by Lemma 1, maintain k - 2 = 2 contacts from /'4 in the transition to P3. These two contacts are separated by just

F . . . . . .

0 b

FIG. 2. Circumscribing a regular octagon: (a) the triangle obtained by Dori and Ben-Bassat's algorithm; (b) the minimum area triangle.

Page 3: Counterexamples to a minimal circumscription algorithm

366 JOSEPH O'ROURKE

one octagon edge, so their algorithm produces the nonminimal triangle shown in Fig. 2a.

3. DISCUSSION

Although just one counterexample has been detailed, Lemma 2 implies that the algorithm fails to produce optimal intermediate k-gons for any regular polygon with n large and k small. Moreover, since affine transformations leave area ratios unaltered [3], any affine transformation applied to a counterexample produces another counterexample. Thus the problem is not restricted to regular polygons.

It appears that the "Compression" procedure [2, Algorithm 3, p. 143], at least, is not correct. Their algorithm remains, however, a fast approximation algorithm. It would be interesting to determine exactly the class of polygons for which it obtains the minimal solution, and to quantify the performance otherwise.

Three other algorithms have been proposed to solve the same type of problem: two for minimal circumscribing triangles [3, 4] and one for minimal k-gons [1].

ACKNOWLEDGMENTS

I thank Chee Yap of the Courant Institute for drawing my attention to difficulties in Dori and Ben-Bassat's algorithm. This work was partially supported by NSF Grants MCS83-04780 and DCR83-51468.

REFERENCES

1. J. S. Chang and C. K. Yap, A polynomial solution for potato-peeling and other polygon inclusion and enclosure problems, Proc. Found. Comput. Sci., Oct. 1984, pp. 408-416.

2. D. Dori and M. Ben-Bassat, Circumscribing a convex polygon by a polygon of fewer sides with minimal area addition, Comput. Vision Graphics Image Process. 24, 1983, 131-159.

3. V. Klee and M. L. Laskowski, Finding the smallest triangles containing a given convex polygon, J. Algorithms, 6, 1985.

4. J. O'Rourke, A. Aggarwal, S. Maddila, and M. Baldwin, An optimal algorithm for finding minimal enclosing triangles, J. Algorithms, in press.