We consider the following problem: we are given a diagram made up of intersecting circles, where each region is colored either black or white. We wish to display this diagram on a bitmap device, where we are allowed to (i) paint a given circle white and (ii) invert the colors within a given circle, changing white to black and vice versa. (These operations are frequently provided in graphics hardware or software.) We ask: using only these paint and invert operations, is it possible to draw the diagram? A generalization of this problem leads to an analogous coloring problem on a subset of the power set of n elements. We give a polynomial-time algorithm that answers the question above, and produces a “short” sequence of instructions to draw the diagram, if one exists. A simple modification of the algorithm permits us to handle the case where there are more colors than just black and white, and the colors are represented by bit strings. This corresponds to the conventions frequently used with color raster devices.
|Original language||English (US)|
|Number of pages||5|
|Journal||Communications of the ACM|
|State||Published - Oct 1 1988|
All Science Journal Classification (ASJC) codes
- Computer Science(all)
- Bitmap graphics