A New Algorithm for Subset Matching Problem Based on Set-String Transformation

Author(s):  
Yangjun Chen

In computer engineering, a number of programming tasks involve a special problem, the so-called tree matching problem (Cole & Hariharan, 1997), as a crucial step, such as the design of interpreters for nonprocedural programming languages, automatic implementation of abstract data types, code optimization in compilers, symbolic computation, context searching in structure editors and automatic theorem proving. Recently, it has been shown that this problem can be transformed in linear time to another problem, the so called subset matching problem (Cole & Hariharan, 2002, 2003), which is to find all occurrences of a pattern string p of length m in a text string t of length n, where each pattern and text position is a set of characters drawn from some alphabet S. The pattern is said to occur at text position i if the set p[j] is a subset of the set t[i + j - 1], for all j (1 = j = m). This is a generalization of the ordinary string matching and is of interest since an efficient algorithm for this problem implies an efficient solution to the tree matching problem. In addition, as shown in (Indyk, 1997), this problem can also be used to solve general string matching and counting matching (Muthukrishan, 1997; Muthukrishan & Palem, 1994), and enables us to design efficient algorithms for several geometric pattern matching problems. In this article, we propose a new algorithm on this issue, which needs only O(n + m) time in the case that the size of S is small and O(n + m·n0.5) time on average in general cases.

2021 ◽  
Vol 4 ◽  
pp. 78-87
Author(s):  
Yury Yuschenko

In the Address Programming Language (1955), the concept of indirect addressing of higher ranks (Pointers) was introduced, which allows the arbitrary connection of the computer’s RAM cells. This connection is based on standard sequences of the cell addresses in RAM and addressing sequences, which is determined by the programmer with indirect addressing. Two types of sequences allow programmers to determine an arbitrary connection of RAM cells with the arbitrary content: data, addresses, subroutines, program labels, etc. Therefore, the formed connections of cells can relate to each other. The result of connecting cells with the arbitrary content and any structure is called tree-shaped formats. Tree-shaped formats allow programmers to combine data into complex data structures that are like abstract data types. For tree-shaped formats, the concept of “review scheme” is defined, which is like the concept of “bypassing” trees. Programmers can define multiple overview diagrams for the one tree-shaped format. Programmers can create tree-shaped formats over the connected cells to define the desired overview schemes for these connected cells. The work gives a modern interpretation of the concept of tree-shaped formats in Address Programming. Tree-shaped formats are based on “stroke-operation” (pointer dereference), which was hardware implemented in the command system of computer “Kyiv”. Group operations of modernization of computer “Kyiv” addresses accelerate the processing of tree-shaped formats and are designed as organized cycles, like those in high-level imperative programming languages. The commands of computer “Kyiv”, due to operations with indirect addressing, have more capabilities than the first high-level programming language – Plankalkül. Machine commands of the computer “Kyiv” allow direct access to the i-th element of the “list” by its serial number in the same way as such access is obtained to the i-th element of the array by its index. Given examples of singly linked lists show the features of tree-shaped formats and their differences from abstract data types. The article opens a new branch of theoretical research, the purpose of which is to analyze the expe- diency of partial inclusion of Address Programming in modern programming languages.


1995 ◽  
Vol 2 (46) ◽  
Author(s):  
Dany Breslauer ◽  
Livio Colussi ◽  
Laura Toniolo

In this paper we study the exact comparison complexity of the string<br />prefix-matching problem in the deterministic sequential comparison model<br />with equality tests. We derive almost tight lower and upper bounds on<br />the number of symbol comparisons required in the worst case by on-line<br />prefix-matching algorithms for any fixed pattern and variable text. Unlike<br />previous results on the comparison complexity of string-matching and<br />prefix-matching algorithms, our bounds are almost tight for any particular pattern.<br />We also consider the special case where the pattern and the text are the<br />same string. This problem, which we call the string self-prefix problem, is<br />similar to the pattern preprocessing step of the Knuth-Morris-Pratt string-matching<br />algorithm that is used in several comparison efficient string-matching<br />and prefix-matching algorithms, including in our new algorithm.<br />We obtain roughly tight lower and upper bounds on the number of symbol<br />comparisons required in the worst case by on-line self-prefix algorithms.<br />Our algorithms can be implemented in linear time and space in the<br />standard uniform-cost random-access-machine model.


1982 ◽  
Vol 10 (132) ◽  
Author(s):  
Peter D. Mosses

This paper presents a semantic algebra, suitable for use in giving the denotational semantics of various forms of declarations and binding constructs in programming languages. The emphasis of the paper is on the development of semantic descriptions which are easy to understand at an intuitive level, being based on algebraic operators corresponding to fundamental concepts of programming languages. Some familiarity with denotational semantics and abstract data types is assumed.


1983 ◽  
Vol 6 (3-4) ◽  
pp. 297-332
Author(s):  
Wiktor Dańko

In this paper, similarly to [1,4,17,20,21,29,30], abstract data types are understood as formalized many-sorted theories based on algorithmic languages (e.g. a language of algorithmic logic [2,16] or a language of dynamic logic [11,29]). Operations on data types, leading from (more) primitive types to compound types, are defined in terms of the interpretability theory (cf. Szczerba [25]). The approach proposed here to defining new types accords with the methods of introducing new classes of objects in programming languages like Simula 67, Pascal, Loglan, Ada.


1982 ◽  
Vol 11 (145) ◽  
Author(s):  
Peter D. Mosses

A new approach to the formal description of programming language semantics is described and illustrated. ''Abstract semantic algebras'' are just algebraically-specified abstract data types whose operations correspond to fundamental concepts of programming languages. The values of abstract semantic algebras are taken as meanings of programs in Denotational (or Initial Algebra) Semantics, instead of using Scott domains. This leads to semantic descriptions that clearly exhibit the underlying conceptual analysis, and which are rather easy to modify and extend. Some basic abstract semantic algebras corresponding to fundamental concepts of programming languages are given; they could be used in the description of many different programming languages.


1993 ◽  
Vol 3 (2) ◽  
pp. 171-190 ◽  
Author(s):  
F. Warren Burton ◽  
Robert D Cameron

AbstractPattern matching in modern functional programming languages is tied to the representation of data. Unfortunately, this is incompatible with the philosophy of abstract data types.Two proposals have been made to generalize pattern matching to a broader class of types. The laws mechanism of Miranda allows pattern matching with non-free algebraic data types. More recently, Wadler proposed the concept of views as a more general solution, making it possible to define arbitrary mappings between a physical implementation and a view supporting pattern matching. Originally, it was intended to include views in the new standard lazy functional programming language Haskell.Laws and views each offer important advantages, particularly with respect to data abstraction. However, if not used with great care, they also introduce serious problems in equational reasoning. As a result, laws have been removed from Miranda and views were not included in the final version of Haskell.We propose a third approach which unifies the laws and views mechanisms while avoiding their problems. Philosophically, we view pattern matching as a bundling of case recognition and component selection functions instead of a method for inverting data construction. This can be achieved by removing the implied equivalence between data constructors and pattern constructors. In practice, we allow automatic mapping into a view but not out of the view. We show that equational reasoning can still be used with the resulting system. In fact, equational reasoning is easier, since there are fewer hidden traps.


Author(s):  
Gustavo Betarte ◽  
Alvaro Tasistro

Our starting point, to which we refer hereafter as type theory, is the formulation of Martin-Löf’s set theory using the theory of types as a logical framework (Martin-Löf 1987; Nordström et al. 1990). The question that we address is that of the representation of systems of structures such as algebraic systems or abstract data types. In order to provide a general means to this end, we extend type theory with a new mechanism of type formation, namely that of dependent record types. This allows us to form types of tuples in such a manner as to allow any arbitrary set (i.e. not restricted to be among those generated by a fixed repertoire of set forming operations) to be used as a component of tuples of those types. Such types of tuples cannot be formed in the original theory. Moreover, as is well known from the theory of programming languages, a natural notion of inclusion arises between record types. Given two record types p and p′, if p contains every label declared in p′ (and possibly more) and the types of the common labels are in the inclusion relation then p is included in p′ in symbols, p ⊑ p′. This is justified because then every object of type p is also an object of type p’, since it contains components of appropriate types for all the fields specified in p′. Our extension contains the form of judgement α ⊑ β expressing that the type α is included in the type β and corresponding proof rules, which generalize record type inclusion to dependent record types and propagate it to the rest of the types of the language. In the present formulation, no proper inclusion between ground types is allowed. Having type inclusion represents a considerable advantage for the formalization of the types of structures in which we are interested. In particular, systems of algebras will be represented as record types and, according to the subtyping rule explained above, any algebraic system obtained by enriching another with additional structure will be a subtype of the original system.


Author(s):  
DALE MILLER

Abstract Several formal systems, such as resolution and minimal model semantics, provide a framework for logic programming. In this article, we will survey the use of structural proof theory as an alternative foundation. Researchers have been using this foundation for the past 35 years to elevate logic programming from its roots in first-order classical logic into higher-order versions of intuitionistic and linear logic. These more expressive logic programming languages allow for capturing stateful computations and rich forms of abstractions, including higher-order programming, modularity, and abstract data types. Term-level bindings are another kind of abstraction, and these are given an elegant and direct treatment within both proof theory and these extended logic programming languages. Logic programming has also inspired new results in proof theory, such as those involving polarity and focused proofs. These recent results provide a high-level means for presenting the differences between forward-chaining and backward-chaining style inferences. Anchoring logic programming in proof theory has also helped identify its connections and differences with functional programming, deductive databases, and model checking.


1988 ◽  
Vol 18 (272) ◽  
Author(s):  
Peter D. Mosses

The recently-developed framework of Unified Algebras is intended for axiomatic specification of abstract data types. In contrast, the somewhat older framework of Action Semantics (earlier known as ''Abstract Semantic Algebras'') is for denotational specification of programming languages. This paper gives an introduction to the main features of Unified Algebras and Action Semantics, and discusses the relation between them. The two frameworks both exploit nondeterministic choice in unconventional ways.


Sign in / Sign up

Export Citation Format

Share Document