Abstract
A spreadsheet, especially MS Excel, is probably one of the most popular software applications for personal-computer users and gives us convenient and user-friendly tools for drawing tables. Using spreadsheets, we often wish to draw several vertical and horizontal black lines on selective gridlines to enhance the readability of our spreadsheet. Such situations we frequently encounter are formulated as the Border Drawing Problem (BDP). Given a layout of black line segments, we study how to draw it efficiently from an algorithmic view point, by using a set of border styles and investigate its complexity. (i) We first define a formal model based on MS Excel, under which the drawability and the efficiency of border styles are discussed, and then (ii) show that unfortunately the problem is \(\mathcal{NP}\) -hard for the set of the Excel border styles and for any reasonable subset of the styles. Moreover, in order to provide potentially more efficient drawing, (iii) we propose a new compact set of border styles and show a necessary and sufficient condition of its drawability.
Similar content being viewed by others
References
Berman, P., DasGupta, B.: Complexities of efficient solutions of rectilinear polygon cover problems. Algorithmica 17(4), 331–356 (1997)
Booth, K.S., Lueker, G.S.: Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-tree algorithms. J. Comput. Syst. Sci. 13, 335–379 (1976)
Culberson, J.C., Reckhow, R.A.: Covering polygons is hard. J. Algorithms 17, 2–44 (1994)
Edmonds, J., Gryz, J., Liang, D., Miller, R.J.: Mining for empty rectangles in large data sets. Theor. Comput. Sci. 296, 435–452 (2003)
Garey, M.R., Johnson, D.S.: Computers and Intractability—A Guide to the Theory of \(\mathcal{NP}\) -Completeness. Freeman, New York (1979)
Greenberg, D.S., Istrail, S.C.: Physical mapping by STS hybridization: algorithmic strategies and the challenge of software evaluation. J. Comput. Biol. 2, 219–274 (1995)
Gudmundsson, J., Levcopoulos, C.: Close approximations of minimum rectangular coverings. J. Comb. Optim. 3(4), 437–452 (1999)
Hegedüs, A.: Algorithms for covering polygons by rectangles. Comput. Aided Geom. Des. 14, 257–260 (1982)
Anil Kumar, V.S., Ramesh, H.: Covering rectilinear polygons with axis-parallel rectangles. SIAM J. Comput. 32(6), 1509–1541 (2003)
Magwene, P.M., Lizardi, P., Kim, J.: Reconstructing the temporal ordering of biological samples using microarray data. Bioinformatics 19(7), 842–850 (2003)
Masek, W.J.: Some \(\mathcal{NP}\) -complete set covering problems. MIT, Cambridge. Unpublished manuscript (1978). Referenced in [5]
Reuhman, D.: A short route to tgif pictures. ftp://bourbon.usc.edu/pub/tgif/contrib/tgifintro/ (2002)
Suri, S.: Polygons. In: Goodman, J.E., O’Rourke, J. (eds.) Handbook of Discrete and Computational Geometry. CRC Press, Boca Raton (1997)
Xfig User Manual (ver. 3.2.5). http://www.xfig.org/userman/
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Iwama, K., Miyano, E. & Ono, H. Drawing Borders Efficiently. Theory Comput Syst 44, 230–244 (2009). https://doi.org/10.1007/s00224-008-9117-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-008-9117-y