New answers tagged

2

There is no exact answer to your question. The terms "programming model" and "programming paradigm" are not exact technical terms that have fixed definitions. Depending on a context, some authors might define "programming model" in some specific way, but that will usually turn out to cover only some aspects of what people understand under "programming model"....


0

Closure under intersection with regular sets is natural in the sense that most machine models for language classes are finite-state based with some additional control mechanism, and by some standard constructions a finite automaton describing some other regular language could be coded into this finite-state mechanism to get closure under intersection. This ...


1

Programming models bridge the gap between the underlying hardware architecture and the supporting layers of software available to applications. Programming models are different from both programming languages and application programming interfaces (APIs). Specifically, a programming model is an abstraction of the underlying computer system that ...


0

P, NP, NP-complete and NP-hard are complexity classes, classifying problems according to the algorithmic complexity for solving them. In short, they're based on three properties: Solvable in polynomial time: Defines decision problems that can be solved by a deterministic Turing machine (DTM) using a polynomial amount of computation time, i.e., its running ...


1

The Natural Language Toolkit (NLTK) offers binarization: nltk.treetransforms.chomsky_normal_form(). The algorithm in NLTK implements the standard, straight-forward transformation into Chomsky normal form. It assumes the tree was generated via an underlying (context-free) grammar. This results in the deep trees in the bottom row (diagram in the question post)....


0

Since $1 + \log n = (1 + o(1)) \log n$, for every $\beta < \alpha$ you can find $N$ such that for $n \geq N$, $$ (1-\alpha)(1 + \log n) \leq (1-\beta) \log n. $$ This suffices to reach a contradiction.


1

Do you need to guarantee that, in every sample, 50% of the objects are red, 30% are green and 20% are blue? If so, just make your array consist of $0.5\,N$ red objects chosen uniformly at random, followed by $0.3\,N$ green and $0.2\,N$ blue. You'll need to deal with the rounding error if $N$ isn't divisible by $10$. You can always shuffle the array if ...


0

The term you are looking for is "sampling", "sampling without replacement", "sampling with replacement", "generating random samples from a given distribution", or "inverse transform sampling". Lots of nice articles and references can be found if you use those keywords to search. Here is a simple algorithm to simulate the given distribution, red:50% green:...


2

Given the tag combinatory-logic, the answer in combinatory logic is C, i.e. "the C combinator". Obviously, this name is not self-documenting or going to be obvious in even a slightly more general context.


6

The function $$\lambda f.\lambda x.\lambda y.f\;y\;x$$ of type $$\forall X. \forall Y. \forall Z.(X \to Y \to Z) \to Y \to X \to Z$$ is often called flip. This is the case in Haskell (see here), and in some OCaml libraries as well (see here). According to wikipedia, people call this function (or combinator) $C$ in the context of combinatory logic (that name ...


Top 50 recent answers are included