scispace - formally typeset
Search or ask a question

Showing papers on "Time complexity published in 1973"


Proceedings ArticleDOI
15 Oct 1973
TL;DR: A linear time algorithm for obtaining a compacted version of a bi-tree associated with a given string is presented and indicated how to solve several pattern matching problems, including some from [4] in linear time.
Abstract: In 1970, Knuth, Pratt, and Morris [1] showed how to do basic pattern matching in linear time. Related problems, such as those discussed in [4], have previously been solved by efficient but sub-optimal algorithms. In this paper, we introduce an interesting data structure called a bi-tree. A linear time algorithm for obtaining a compacted version of a bi-tree associated with a given string is presented. With this construction as the basic tool, we indicate how to solve several pattern matching problems, including some from [4] in linear time.

1,985 citations


Journal ArticleDOI
TL;DR: The time complexity of recognition of L_0, a context-free language, is the least upper bound for time complexity in terms of deterministic polynomial time acceptable languages.
Abstract: There is a context-free language $L_0 $ such that every context-free language is an inverse homomorphic image of $L_0 $ or $L_0 - \{ e\} $. Hence the time complexity of recognition of $L_0 $ is the least upper bound for time complexity of recognition of context-free languages. A similar result holds for quasirealtime Turing machine languages. Several languages are given such that deterministic and nondeterministic polynomial time acceptance are equivalent if and only if any one of them is deterministic polynomial time acceptable.

195 citations


Proceedings ArticleDOI
30 Apr 1973
TL;DR: It is shown that if the conjecture that no Turing machine recognizes SP within storage (log n)2 is false, then in fact every member of @@@@ can be recognized within storage [log n]2.
Abstract: @ (i.e., recognizable in deterministic polynomial time) can be recognized in deterministic storage (log n)2. The methods used in the attempts were based on that of [1], in which it is shown that every context free language can be accepted in storage (log n)2 Our thesis in the present paper is that these attempts must fail. We define a specific set SP of strings which is clearly in

183 citations


Proceedings ArticleDOI
30 Apr 1973
TL;DR: The first on line algorithm is applied to a problem in code optimization, that of computing immediate dominators in a reducible flow graph and it is shown how this computation can be performed in O(n log n) steps.
Abstract: Trees in an n node forest are to be merged according to instructions in a given sequence, while other instructions in the sequence ask for the lowest common ancestor of pairs of nodes. We show that any sequence of O(n) instructions can be processed “on line” in O(n log n) steps on a random access computer. If we can accept our answer “off-line”, that is, no answers need to be produced until the entire sequence of instructions has been seen seen, then we may perform the task in O(n G(n)) steps, where G(n) is the number of times we must apply log2 to n to obtain a number less than or equal to zero. A third algorithm solves a problem of intermediate complexity. We require the answers on line, but we suppose that all tree merging instructions precede the information requests. This algorithm requires O(n log log n) time. We apply the first on line algorithm to a problem in code optimization, that of computing immediate dominators in a reducible flow graph. We show how this computation can be performed in O(n log n) steps.

107 citations


Journal ArticleDOI
TL;DR: Two algorithms for computing the set of available expressions at entrance to the nodes of a flow graph are given and one of them works only for reducible flow graphs and requires O(n log n) extended steps.
Abstract: We give two algorithms for computing the set of available expressions at entrance to the nodes of a flow graph. The first takes O(mn) isteps on a program flow graph (one in which no node has more than two successors), where n is the number of nodes and m the number of expressions which are ever computed. A modified version of this algorithm requires O(n 2) steps of an extended type, where bit vector operations are regarded as one step. We present another algorithm which works only for reducible flow graphs. It requires O(n log n) extended steps.

84 citations


Journal ArticleDOI
TL;DR: Two upper bounds for the total path length of binary trees are obtained, one is for node-trees, and bounds the internal (or root-to-node) path length; the other is for leaf-t trees, and limits the external path length.
Abstract: Two upper bounds for the total path length of binary trees are obtained. One is for node-trees, and bounds the internal (or root-to-node) path length; the other is for leaf-trees, and bounds the external (or root-to-leaf) path length. These bounds involve a quantity called the balance, which allows the bounds to adapt from the n log n behavior of a completely balanced tree to the n2 behavior of a most skewed tree. These bounds are illustrated for the case of Fibonacci trees.

44 citations


Journal ArticleDOI
TL;DR: Two classes of restricted top-down parsing algorithms modeling “recursive descent” are considered and it is shown that the smaller class recognizes all deterministic context free languages, and that both classes can be simulated in linear time on a random access machine.
Abstract: Two classes of restricted top-down parsing algorithms modeling “recursive descent” are considered. We show that the smaller class recognizes all deterministic context free languages, and that both classes can be simulated in linear time on a random access machine. Certain generalizations of these parsing algorithms are shown equivalent to the larger class. Finally, it is shown that the larger class has the property that loops and other “failures” can always be eliminated.

43 citations


Proceedings ArticleDOI
27 Aug 1973
TL;DR: A test is devised which takes only linear time to compute and by which a decision can automatically be made concerning whether to use a substitution algorithm which exploits sparsity or one which assumes relatively dense inputs.
Abstract: The problem of devising efficient algorithms for computing Q(x1,...,xr-1, P(x1,...,xr-1)) where P and Q are multivariate polynomials is considered. It is shown that for polynomials which are completely dense an algorithm based upon evaluation and interpolation is more efficient than Horner's method. Then various characterizations for sparse polynomials are made and the subsequent methods are re-analyzed. In conclusion a test is devised which takes only linear time to compute and by which a decision can automatically be made concerning whether to use a substitution algorithm which exploits sparsity or one which assumes relatively dense inputs. This choice yields the method which takes the fewest arithmetic operations.

3 citations


Proceedings ArticleDOI
30 Apr 1973
TL;DR: This paper contains several results yielding pairs of problems which don't help each other's solution, and therefore which may be said to be complex for “different reasons.”
Abstract: This paper contains several results yielding pairs of problems which don't help each other's solution, and therefore which may be said to be complex for “different reasons.” Statements are formalized and results proved within Blum complexity theory, generalized to relative algorithms. The approach is fairly intuitive; all details appear in [1] and [2].

3 citations