Brenda S. Baker
Bell Labs
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Brenda S. Baker.
Journal of the ACM | 1994
Brenda S. Baker
This paper describes a general technique that can be used to obtain approximation algorithms for various NP-complete problems on planar graphs. The strategy depends on decomposing a planar graph into subgraphs of a form we call k- outerplanar. For fixed k, the problems of interest are solvable optimally in linear time on k-outerplanar graphs by dynamic programming. For general planar graphs, if the problem is a maximization problem, such as maximum independent set, this technique gives for each k a linear time algorithm that produces a solution whose size is at least (k-1)/k optimal. If the problem is a minimization problem, such as minimum vertex cover, it gives for each k a linear time algorithm that produces a solution whose size is at most (k + 1)/k optimal. Taking k = c log log n or k = c log n, where n is the number of nodes and c is some constant, we get polynomial time approximation schemes, i.e. algorithms whose solution sizes converge toward optimal as n increases. The class of problems for which this approach provides approximation schemes includes maximum independent set, maximum tile salvage, partition into triangles, maximum H-matching, minimum vertex cover, minimum dominating set, and minimum edge dominating set. For these and certain other problems, the proof of solvability on k-outerplanar graphs also enlarges the class of planar graphs for which the problems are known to be solvable.
working conference on reverse engineering | 1995
Brenda S. Baker
This paper describes how a program called dup can be used to locate instances of duplication or near-duplication in a software system. Dup reports both textually identical sections of code and sections that are the same textually except for systematic substitution of one set of variable names and constants for another. Further processing locates longer sections of code that are the same except for other small modifications. Experimental results from running dup on millions of lines from two large software systems show dup to be both effective at locating duplication and fast. Applications could include identifying sections of code that should be replaced by procedures, elimination of duplication during reengineering of the system, redocumentation to include references to copies, and debugging.
SIAM Journal on Computing | 1980
Brenda S. Baker; Edward G. Coffman; Ronald L. Rivest
We consider problems of packing an arbitrary collection of rectangular pieces into an open-ended, rectangular bin so as to minimize the height achieved by any piece. This problem has numerous applications in operations research and studies of computer operation. We devise efficient approximation algorithms, study their limitations, and derive worst-case bounds on the performance of the packings they produce.
SIAM Journal on Computing | 1983
Brenda S. Baker; Jerald S. Schwarz
This paper studies two approximation algorithms for packing rectangles, using the two-dimensional packing model of Baker, Coffman and Rivest [SIAM J. Comput., 9 (1980), pp. 846–855]. The algorithms studied are called next-fit and first-fit shelf algorithms, respectively. They differ from previous algorithms by packing the rectangles in the order given; the previous algorithms required sorting the rectangles by decreasing height or width before packing them, which is not possible in some applications. The shelf algorithms are a modification of the next-fit and first-fit decreasing height level algorithms of Coffman, Garey, Johnson and Tarjan [SIAM J. Comput., 9 (1980), pp. 808–826]. Each shelf algorithm takes a parameter r. It is shown that by choosing r appropriately, the asymptotic worst case performance of the shelf algorithms can be made arbitrarily close to that of the next-fit and first-fit level algorithms, without the restriction that items must be packed in order of decreasing height. Nonasymptoti...
Journal of Algorithms | 1981
Brenda S. Baker; Donna J. Brown; Howard P. Katseff
This paper proposes a new algorithm for a two-dimensional packing problem first studied by Baker, Coffman, and Rivest (SIAM J. Comput. 9, No. 4(1980), 846–855). In their model, a finite list of rectangles is to be packed into a rectangular bin of finite width but infinite height. The model has applications to certain scheduling and stock-cutting problems. Since the problem of finding an optimal packing is NP-hard, previous work has been directed at finding polynomial approximation algorithms for the problem, i.e., algorithms which come within a constant times the height used by an optimal packing. For the algorithm proposed in this paper, the ratio of the height obtained by the algorithm and the height used by an optimal packing is asymptotically bounded by 54. This bound is an improvement over the bound of 43 achieved by the best previous algorithm.
SIAM Journal on Computing | 1997
Brenda S. Baker
As an aid in software maintenance, it would be useful to be able to track down duplication in large software systems efficiently. Duplication in code is often in the form of sections of code that are the same except for a systematic change of parameters such as identifiers and constants. To model such parameterized duplication in code, this paper introduces the notions of parameterized strings and parameterized matches of parameterized strings. A data structure called a parameterized suffix tree is defined to aid in searching for parameterized matches. For fixed alphabets, algorithms are given to construct a parameterized suffix tree in linear time and to find all maximal parameterized matches over a threshold length in a parameterized p-string in time linear in the size of the input plus the number of matches reported. The algorithms have been implemented, and experimental results show that they perform well on C code.
Journal of Computer and System Sciences | 1996
Brenda S. Baker
The problem of finding sections of code that either are identical or are related by the systematic renaming of variables or constants can be modeled in terms ofparameterized strings(p-strings) andparameterized matches(p-matches). P-strings are strings over two alphabets, one of which represents parameters. Two p-strings are aparameterized match(p-match) if one p-string is obtained by renaming the parameters of the other by a one-to-one function. In this paper, we investigate parameterized pattern matching via parameterized suffix trees (p-suffix trees). We give two algorithms for constructing p-suffix trees: one (eager) that runs in linear time for fixed alphabets, and another that uses auxiliary data structures and runs inO(nlog(n)) time for variable alphabets, wherenis input length. We show that using a p-suffix tree for a pattern p-stringP, it is possible to search for all p-matches ofPwithin a text p-stringTin space linear in |P| and time linear in |T| for fixed alphabets, orO(|T|log(min(|P|, ?)) time andO(|P|) space for variable alphabets, where?is the sum of the alphabet sizes. The simpler p-suffix tree construction algorithmeagerhas been implemented, and experiments show it to be practical. Since it runs faster than predicted by the above worst-case bound, we reanalyze the algorithm and show thateagerruns in timeO(min(t|S|+m(t,S)?t>0)log?)), where for an input p-stringS, m(t, S) is the number of maximal p-matches of length at leasttthat occur withinS, and?is the sum of the alphabet sizes. Experiments with the authors programdup(B. Baker,in“Comput. Sci. Statist.,” Vol. 24, 1992) for finding all maximal p-matches within a p-string have foundm(t, S) to be less than |S| in practice unlesstis small.
symposium on the theory of computing | 1993
Brenda S. Baker
This paper develops a theory and algoritbrns for an application problem arising in software maintenance. The application is to track down duplication in a large software system. We want to find not only exact matches between sections of code, but parametrized matches, where a parametrized match between two sections of code means that one section can be transformed into the other by replacing the parameter names (e.g. identifiers and constants) of one section by the parameter names of the other via a one-to-one function. This paper formalizes this problem in terms of parametrized strings and parametrized pattern matching and detirtes a new data structure (parametrized sujjfi.x tree) suitable for parametrized pattern matching. It gives efficient algorithms for constructing this data structure, efficient algorithms for parametrized pattern matchmg, and an efficient algorithm for timing all maximal parametrized matches over a threshold length in a parametrized string. The algorithms for constructing parametrized suffix trees and for reporting duplication over a threshold length have been implemented. Tests on C code indicate that these algorithms should perform well in the application.
Discrete and Computational Geometry | 1988
Brenda S. Baker; Eric Grosse; C. S. Rafferty
We show how to triangulate a polygon without using any obtuse triangles. Such triangulations can be used to discretize partial differential equations in a way that guarantees that the resulting matrix is Stieltjes, a desirable property both for computation and for theoretical analysis.A simple divide-and-conquer approach would fail because adjacent subproblems cannot be solved independently, but this can be overcome by careful subdivision. Overlay a square grid on the polygon, preferably with the polygon vertices at grid points. Choose boundary cells so they can be triangulated without propagating irregular points to adjacent cells. The remaining interior is rectangular and easily triangulated. Small angles can also be avoided in these constructions.
Journal of the ACM | 1977
Brenda S. Baker
This paper describes an algorithm which transforms a flowgraph into a program containing control constructs such as if then else statements, repeat (do forever) statements, multilevel break statements (causing jumps out of enclosing repeats), and multilevel next statements (causing jumps to iterations of enclosing repeats). The algorithm can be extended to create other types of control constructs, such as while or until. The program appears natural because the constructs are used according to common programming practices. The algorithm does not copy code, create subroutines, or add new variables. Instead, goto statements are generated when no other available control construct describes the flow of control. The algorithm has been implemented in a program called STRUCT which rewrites Fortran programs using constructs such as while, repeat, and if then else statements. The resulting programs are substantially more readable than their Fortran counterparts.