Sign up & Download
Sign in

Tidy Drawings of Trees

by C Wetherell, A Shannon
IEEE Transactions on Software Engineering (1979)

Abstract

Trees are extremely common data structures, both as internal objects and as models for program output. But it is unusual to see a program actually draw trees for visual inspection. Although part of the difficulty lies in programming graphics devices, most of the problem arises because naive algorithms to draw trees use too much drawing space and sophisticated algorithms are not obvious. We survey two naive tree drawers, formalize aesthetics for tidy trees, and descnbe two algorithms which draw tidy trees. One of the algorithms may be shown to require the minimum possible paper width. Along with the algorithms proper, we discuss the reasoning behind the algorithm development. ER -

Cite this document (BETA)

Available from ieeexplore.ieee.org
Page 1
hidden

Tidy Drawings of Trees

IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. SE-5, NO. 5, SEPTEMBER 1979
[18] G. A. Miller, "The magical number seven, plus or minus two,"
Psychological Rev., pp. 311-329, 1956.
[191 R. W. Motley and W. D. Brooks, "Statistical prediction of pro-
gramming errors," Rome Air Develop., Final Tech. Rep., RADC-
TR-77-175, May 1977.
[20] J. D. Musa, "A theory of software reliability and its application,"
IEEE Trans. Software Eng., vol. SE-1, pp. 312-327, Sept. 1975.
[21] -, "Measuring software reliability," in Proc. TIMS-ORSA Joint
Nat. Meeting, San Francisco, May 9-11, 1977.
[221 G. J. Myers, "An extension to the cyclomatic measure ofprogram
complexity," ACM SIGPLAN Notices, vol. 12, pp. 61-64, Oct.
1977.
[231 L. M. Ottenstein, "Predicting parameters of the software valida-
tion effort," Ph.D. dissertation, Purdue Univ., Aug. 1978.
[24] N. F. Schneidewind, "Analysis oferror processes in computer soft-
ware,' in Proc. 1975 Int. Conf Reliable Software, Los Angeles,
CA, Apr. 21-23,1975;also,ACMSIGPLANNotices,vol. 10,pp.
337-346, June 1975.
[251 N. F. Schneidewind and H. M. Hoffman, "Software structure and
error properties: Models vs. real programs," in Proc. TIMS-ORSA
Joint Nat. Meeting, San Francisco, May 9-11, 1977.
[261 -, "An experiment in software error data collection and
analysis," in Proc. 6th Texas Conf Computing Systems, Nov.
14-15, 1977.
[27] M. L. Shooman, "Operational testing and software reliability
estimation during program development," in Proc. IEEE Symp.
Computer Software Reliability, New York, Apr. 30-May 2,
1973, pp.51-57.
[28] -, "Structured models for software reliability prediction," in
Proc. 1976 IEEE 2nd Int. Conf. Software Eng., San Francisco,
Oct. 13-15, 1976, pp. 268-280.
[29] M. L. Shooman and M. I. Bolsky, "Types, distributions and test
and correction times for programming errors," in Proc. 1975 Int.
Conf. Reliable Software, Los Angeles, CA, Apr. 21-23, 1975;
also, ACM SIGPLAN Notices, vol. 10, pp. 347-357, June 1975.
[30] H. A. Simon, "How big is a chunk?" Science, vol. 183 (4124),
pp. 482-488, Feb. 1974.
[31] A. N. Sukert, "A software reliability modeling study," Rome Air
Develop., RADC-TR-76-247, Aug. 1976.
[32] J. E. Sullivan, "Measuring the complexity of computer software,"
MITRE MTR-2648, vol. V, June 25, 1973.
[33] T. A. Thayer, "Understanding software through empirical
reliability analysis," in AFIPS Conf Proc., vol. 44, 1975, pp.
335-341.
[34] T. A. Thayer et al., "Software reliability study," Rome Air
Develop., Final Tech. Rep., RADC-TR-76-238, Aug. 1976.
[35] R. W. Wolverton, "The cost of developing large-scale software,"
IEEE Trans. Comput., vol. C-28, pp. 615-636, June 1974.
[36] M. V. Zelkowitz, "Perspectives on software engineering," ACM
Computing Surveys, vol. 10, no. 2, June 1978.
Linda M. Ottenstein was born in Sheboygan,
WI, on December 22, 1950. She received the
B.S., M.S., and Ph.D. degrees all in computer
science from Purdue University, Lafayette, IN,
in 1972, 1974, and 1978, respectively.
She is currently an Assistant Professor of
Computer Science at Michigan Technological
University, Houghton, MI. Her research in-
terests include software science, software
reliability, and programming methodologies.
Dr. Ottenstein is a member of the Associa-
tion for Computing Machinery and the IEEE Computer Society.
Tidy Drawings of Trees
CHARLES WETHERELL AND ALFRED SHANNON
Abstract-Trees are extremely common data structures, both as inter-
nal objects and as models for program output. But it is unusual to see a
program actually draw trees for visual inspection. Although part of the
difficulty lies in programming graphics devices, most of the problem
arises because naive algorithms to draw trees use too much drawing
space and sophisticated algorithms are not obvious. We survey two naive
tree drawers, formalize aesthetics for tidy trees, and descnbe two algo-
rithms which draw tidy trees. One of the algorithms may be shown to
require the minimum possible paper width. Along with the algorithms
proper, we discuss the reasoning behind the algorithm development.
Index Terms-Aesthetics, binary trees, computer graphics, drawing
methods, trees.
Manuscript received May 15, 1978; revised February 26, 1979.
C. Wetherell is with the Computing Science Group, Department of
Applied Science, University of California at Davis, and the Lawrence
Livermore Laboratory, Livermore, CA 94550.
A. Shannon is with the Lawrence Livermore Laboratory, Livermore,
CA 94550.
COMPUTER programmers know well that trees are ex-
tremely common data structures. Trees model many real-
world problems and a host of efficient and useful tree-based al-
gorithmns exist. Equally important, a good drawing of a tree is
often a powerful intuitive guide to a modeled problem; indeed,
some real problems consist of little more than finding and
drawing a particular tree. But programmers who use trees sel-
dom provide pretty graphic output. Users commonly tolerate
listings of trees rather than demanding pictures. We attribute
the lack of pictures to a dearth of published techniques for
tree drawing. In this paper, we present some algorithms and
heuristics for drawing tidy trees.
What, exactly, are the difficulties of drawing a tree? First,
of course, each node of the tree must be assigned a position on
the drawing surface. We assume that the drawing surface is al-
ways a flat sheet (e.g., of paper) and we will make use of no
expedients such as twisting a rubber surface. Positions will be
0098-5589/79/0900-0514$00.75 C 1979 IEEE
514

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

6 Readers on Mendeley
by Discipline
 
 
 
by Academic Status
 
33% Student (Master)
 
33% Ph.D. Student
 
17% Researcher (at an Academic Institution)
by Country
 
33% United States
 
17% United Kingdom
 
17% Netherlands