FUNCTIONAL PEARL On building trees with minimum height

1997 ◽  
Vol 7 (4) ◽  
pp. 441-445 ◽  
Author(s):  
RICHARD S. BIRD

A common solution to the problem of handling list indexing efficiently in a functional program is to build a binary tree. The tree has the given list as frontier and is of minimum height. Each internal node of the tree stores size information (actually, the size of its left subtree) to direct the search for an element at a given position in the frontier. One application was considered in my previous pearl (Bird, 1997). There are two complementary methods for building such a tree, both of which can be implemented in linear time. One method is ‘recursive’, or top down, and works by splitting the list into two equal halves, recursively building a tree for each half, and then combining the two results. The other method is ‘iterative’, or bottom up, and works by first creating a list of singleton trees, and then repeatedly combining the trees in pairs until just one tree remains. The two methods lead to different trees, but in each case the result is a tree with smallest possible height.

1991 ◽  
Vol 1 (1) ◽  
pp. 121-124
Author(s):  
Richard S. Bird

The problem of computing the smallest natural number not contained in a given set of natural numbers has a number of practical applications. Typically, the given set represents the indices of a class of objects ‘in use’ and it is required to find a ‘free’ object with smallest index. Our purpose in this article is to derive a linear-time functional program for the problem. There is an easy solution if arrays capable of being accessed and updated in constant time are available, but we aim for an algorithm that employs only standard lists. Noteworthy is the fact that, although an algorithm using lists is the result, the derivation is carried out almost entirely in the world of sets.


2018 ◽  
Vol 28 ◽  
Author(s):  
RALF HINZE

We consider the task of constructing 2-3 trees. Given a sequence of elements we seek to build a 2-3 tree–in linear time–that contains the elements in symmetric order. We discuss three approaches: top-down, bottom-up, and incremental. The incremental approach is more flexible than the other two in that it allows us to interleave the construction work with other operations, for example, queries.


2018 ◽  
Vol 4 (1) ◽  
pp. 105-123
Author(s):  
Ágnes Langó-Tóth

Abstract In this study an experiment is presented on how Hungarian children interpret two word orders of recursive PPs (subject-PP-verb and PP-subject-verb order). According to the research of Roeper (2011) and Hollebrandse and Roeper (2014), children tend to give conjunctive interpretation to multiple embedded sentences at the beginning of language acquisition. This interpretation later turns into an adult-like, recursive interpretation. Our aim is to discover (i) whether Hungarian children start with conjunction as well, and whether (ii) the apparently more salient functional head lévő appearing in Hungarian recursive PPs can help them to acquire the correct, recursive interpretation early. We also want to find out whether (iii) the word orders in recursive PPs have an influence on the acquisition of children. In this paper two experiments are presented conducted with 6 and 8-year-olds and adults, in which the participants were asked to choose between two pictures. One of the pictures depicted recursive and the other one depicted conjunctive interpretation of the given sentence. In the first experiment subject-PP-verb order was tested, but in the second one sentences were tested with PP-subject-verb order. We will claim that lévő, which is (arguably) a more salient Hungarian functional element than -i, does not help children to acquire the embedded reading of recursive sentences, because both of them are overt functional heads. However, the two types of word orders affect the acquisition of recursive PPs. PP-subject-verb order is easier to compute because the order of the elements in the sentences and the order of the elements in the pictures matches.


1994 ◽  
Vol 29 (7) ◽  
pp. 327-333
Author(s):  
Y. Matsui ◽  
F. Yamaguchi ◽  
Y. Suwa ◽  
Y. Urushigawa

Activated sludges were acclimated to p-nitrophenol (PNP) in two operational modes, a batch and a continuous. The operational mode of the PNP acclimation of activated sludges strongly affected the physiological characteristics of predominant microorganisms responsible for PNP degradation. Predominant PNP degraders in the sludge in batch mode (Sludge B) had lower PNP affinity and were relatively insensitive to PNP concentration. Those of the sludge in continuous mode (Sludge C), on the other hand, had very high PNP affinity and were sensitive to PNP. MPN enumeration of PNP degraders in sludge B and C using media with different PNP concentrations (0.05, 0.2,0.5 and 2.0 mM) supported the above results. Medium with 0.2 mM of PNP did not recover PNP degraders in sludge C well, while it recovered PNP degraders in sludge B as well as the medium with 0.05 mM did. When switching from one operational mode to the other, the predominant population in sludge B shifted to the sensitive group, but that of sludge C did not shift at the given loading of PNP, showing relative resistance to inhibitive concentration.


Author(s):  
Jean-Yves Lacoste ◽  
Oliver O’Donovan

Giving and promise must be thought together. Being-in-the world entails being-with the other, who is both “given” and bearer of a gift promised. But any disclosure may be understood as a gift; it is not anthropomorphic to speak of “self-giving” with a wider reference than person-to-person disclosure. Which implies that no act of giving can exhaust itself in its gift. Present experience never brings closure to self-revealing. Yet giving is crystallized into “the given,” the closure of gift. “The given” is what it is, needing no gift-event to reveal it. But the given, too, is precarious, and can be destabilized when giving brings us face to face with something unfamiliar. Nothing appears without a promise of further appearances, and God himself can never be “given.”


Author(s):  
Juan de Lara ◽  
Esther Guerra

AbstractModelling is an essential activity in software engineering. It typically involves two meta-levels: one includes meta-models that describe modelling languages, and the other contains models built by instantiating those meta-models. Multi-level modelling generalizes this approach by allowing models to span an arbitrary number of meta-levels. A scenario that profits from multi-level modelling is the definition of language families that can be specialized (e.g., for different domains) by successive refinements at subsequent meta-levels, hence promoting language reuse. This enables an open set of variability options given by all possible specializations of the language family. However, multi-level modelling lacks the ability to express closed variability regarding the availability of language primitives or the possibility to opt between alternative primitive realizations. This limits the reuse opportunities of a language family. To improve this situation, we propose a novel combination of product lines with multi-level modelling to cover both open and closed variability. Our proposal is backed by a formal theory that guarantees correctness, enables top-down and bottom-up language variability design, and is implemented atop the MetaDepth multi-level modelling tool.


Water ◽  
2021 ◽  
Vol 13 (12) ◽  
pp. 1682
Author(s):  
Yoonja Kang ◽  
Yeongji Oh

The interactive roles of zooplankton grazing (top-down) and nutrient (bottom-up) processes on phytoplankton distribution in a temperate estuary were investigated via dilution and nutrient addition experiments. The responses of size-fractionated phytoplankton and major phytoplankton groups, as determined by flow cytometry, were examined in association with zooplankton grazing and nutrient availability. The summer bloom was attributed to nanoplankton, and microplankton was largely responsible for the winter bloom, whereas the picoplankton biomass was relatively consistent throughout the sampling periods, except for the fall. The nutrient addition experiments illustrated that nanoplankton responded more quickly to phosphate than the other groups in the summer, whereas microplankton had a faster response to most nutrients in the winter. The dilution experiments ascribed that the grazing mortality rates of eukaryotes were low compared to those of the other groups, whereas autotrophic cyanobacteria were more palatable to zooplankton than cryptophytes and eukaryotes. Our experimental results indicate that efficient escape from zooplankton grazing and fast response to nutrient availability synergistically caused the microplankton to bloom in the winter, whereas the bottom-up process (i.e., the phosphate effect) largely governed the nanoplankton bloom in the summer.


Author(s):  
Meng-Shiun Tsai ◽  
Ying-Che Huang

In this paper, an integrated acceleration/deceleration with dynamics interpolation scheme is proposed to confine the maximum contour error at the junction of linear junction. The dynamic contour error equation is derived analytically and then it is utilized for the interpolation design. Based on the derived formulations which could predict the command and dynamic errors, the advanced interpolation design could adjust the connecting velocity of the two blocks to confine the overall contour errors under the given tolerance. Simulation results validate the proposed algorithm can achieve higher accurate trajectory as compared to the other interpolation algorithm proposed in the past.


Lipar ◽  
2020 ◽  
Vol XXI (73) ◽  
pp. 203-216
Author(s):  
Jovana Milovanović ◽  

This article discusses reception and production of academic vocabulary among native speakers of Serbian language. Academic vocabulary is one of the key elements of academic language competence, and a modest lexicon and underdeveloped academic language competence can cause problems in both comprehension and production. In this research, we used a vocabulary test consisting of 12 items taken from general culture entrance exams used at the Faculty of Philosophy, University of Belgrade. The participants are BA students of French language at the Faculty of Philology, University of Belgrade, years 1-4. The participants were instructed to provide a synonym or a definition for each item, as well as a sentence containing the given word. The aim of this research is to highlight issues in comprehension of academic vocabulary and establish the influence of factors such as word etymology or university level on the success of the participants. We analysed the results and classified them in three categories: correct, incorrect and unanswered. The majority of participants successfully identified just half of the given words (in order of success: poliglota 95,76%, bestseler 92,37%, pacifista 66,10%, suveren 58,47%, prototip 57,63%, elokventan 56,78%). The success level for the other half of the items from the test was below 50% (in order of success: erudita 49,15%, hipokrizija 39,83%, nepotizam 22,03%, skrupulozan 18,64%, šprahfeler 10,17%, eksproprijacija 8,47%). The influence of etymology was analysed through a comparison of the results for six items of French/Latin origin with the results for the other six items which did not originate from Romance languages. This analysis shows that the participants had similar results in both groups of items, with three words from each group having above 50% of correct answers (suveren, elokventan, pacifista; poliglota, bestseler, prototip). Lastly, we examined success levels from year 1, year 2, year 3 and year 4 students and determined that the median of correct answers for each year does vary, but that there is no strong linear progression (median year 1=5, year 2=6, year 3=7, year 4=6). The results indicate a lack of knowledge of academic vocabulary and difficulties in identifying and manipulating this type of lexis. We believe it is necessary to integrate academic language skills, including academic vocabulary, in high school curriculum and introduce Serbian language as a subject at university level.


2021 ◽  
Vol 12 (3) ◽  
pp. 150-156
Author(s):  
A. V. Galatenko ◽  
◽  
V. A. Kuzovikhina ◽  

We propose an automata model of computer system security. A system is represented by a finite automaton with states partitioned into two subsets: "secure" and "insecure". System functioning is secure if the number of consecutive insecure states is not greater than some nonnegative integer k. This definition allows one to formally reflect responsiveness to security breaches. The number of all input sequences that preserve security for the given value of k is referred to as a k-secure language. We prove that if a language is k-secure for some natural and automaton V, then it is also k-secure for any 0 < k < k and some automaton V = V (k). Reduction of the value of k is performed at the cost of amplification of the number of states. On the other hand, for any non-negative integer k there exists a k-secure language that is not k"-secure for any natural k" > k. The problem of reconstruction of a k-secure language using a conditional experiment is split into two subcases. If the cardinality of an input alphabet is bound by some constant, then the order of Shannon function of experiment complexity is the same for al k; otherwise there emerges a lower bound of the order nk.


Sign in / Sign up

Export Citation Format

Share Document