instruction stringlengths 0 29.8k ⌀ |
|---|
In relational algebra, we shall first provide an informal definition of left (outer) join, and proceed to prove that it, renaming, selection, join and projection can construct difference, as well as that difference, selection and union can be used to construct left (outer) join. Actually, we'll end up doing it in the r... |
Others have already said that the asymptotic *average* runtime of Quicksort is better (in the constant) than that of other sorting algorithms (in certain settings).
What does that mean? Assume any permutation is chosen at random (assuming uniform distribution). In this case, typical pivot selection methods provide p... |
There are multiple points that can be made regarding this question.
**Quicksort is usually fast**
Although Quicksort has worst-case $O(n^2)$ behaviour, it is usually fast: assuming random pivot selection, there's a very large chance we pick some number that separates the input into two similarly sized subsets, wh... |
There are numerous containments known. Let $\subseteq$ denote containment and $\subset$ proper containment. Let $\times$ denote incomparability.
Let $LL = \bigcup_k LL(k)$, $LR = \bigcup_k LR(k)$.
Grammar level:
For LL:
* $LL(0) \subset LL(1) \subset LL(2) \subset LL(2) \subset \cdots \subset LL(k) \subset ... |
Seeing that in the [Chomsky Hierarchy][1] Type 3 languages can be recognised by a DFA (which has no stacks), Type 2 by a DFA with *one* stack (i.e. a push-down automaton) and Type 0 by a DFA with *two* stacks (i.e. with one queue, i.e. with a tape, i.e. by a Turing Machine), how do Type 1 languages fit into this pictur... |
|formal-languages|applied-theory|computability|automata|formal-grammars| |
null |
An algorithm is a finite description of a computational process that transforms input data into output data. |
null |
Database theory refers, in general, to the analytic study of the ways in which data are efficiently and effectively stored to and retrieved from computer systems. |
null |
In general, the subject of formal languages studies mathematical and logical properties of and relationships between languages (or sets) of strings (or sequences of symbols) over alphabets (or sets of symbols). |
null |
In the theory of relational databases, relational algebra refers to the study of relations (i.e., tables) and relational operators (e.g., join, selection, projection, etc.) as an algebraic structure. |
null |
Undecidability refers to the defining property of those formal languages which cannot be decided by any Turing machine. In other words, for any undecidable language, there exists no Turing machine which can, in a finite number of moves, both explicitly accept every string in the language and explicitly reject every str... |
null |
Ok, so in most introductory Algorithm classes, either BigO or BigTheta notation are introduced, and a student would typically learn to use one of these to find the time complexity.
However, there are other notations, such as BigOmega and SmallOmega. Are there any specific scenarios where one notation would be prefer... |
How does one know which notation of Time Complexity Analysis to use? |
|algorithms|time-complexity| |
In a standard algorithms course we are taught that **quicksort** is $O(n \log n)$ on average and $O(n^2)$ in the worst case. At the same time, other sorting algorithms are studied which are $O(n \log n)$ in the worst case (like **mergesort** and **heapsort**), and even linear time in the best case (like **bubblesort**)... |
Typically $O$ is used for stating upper-bounds (an estimate from above), while $\Omega$ is used to state lower-bounds (an estimate from below), and $\Theta$ is used when they match, in which case you can use $\Theta$ in place of them (usually) to state the result.
|
You are referring to the [Landau notation](https://en.wikipedia.org/wiki/Landau_symbols). They are not different symbols for the same thing but have entirely different meanings. Which one is "preferable" depends entirely on the desired statement.
$f \in \cal{O}(g)$ means that $f$ grows at most as fast as $g$, asympt... |
Ok, so in most introductory Algorithm classes, notations like $O$ (BigO) and $\Theta$ are introduced, and a student would typically learn to use one of these to find the time complexity.
However, there are other notations, such as $\Omega$ and $\omega$. Are there any specific scenarios where one notation would be pr... |
null |
Automata, or state machines, are mathematical devices often used to define formal languages by way of accepting, or recognizing, or deciding strings belonging to the target language. Commonly encountered varieties of automata are finite automata, pushdown automata, linear-bounded automata, and Turing machines. |
null |
The theory of computability studies which functions can be computed using which machine models. |
null |
In general, the subject of formal languages studies mathematical and logical properties of and relationships between languages (or sets) of strings (or sequences of symbols) over alphabets (or sets of symbols). Commonly encountered varieties of formal languages are regular languages, context-free languages, context-sen... |
null |
Grammars are mathematical devices often used to define formal languages by way of generating or producing strings belonging to the target language. Commonly encountered varieties of grammars are regular grammars, context-free grammars, context-sensitive grammars, and unrestricted grammars. |
null |
Many textbooks cover intersection types in the lambda-calculus. The typing rules for intersection can be defined as follows (on top of the simply typed lambda-calculus with subtyping):
$$
\dfrac{\Gamma \vdash M : T_1 \quad \Gamma \vdash M : T_2}
{\Gamma \vdash M : T_1 \wedge T_2}
(\wedge I)
\qquad\qq... |
Characterization of lambda-terms that have union types |
|lambda-calculus|type-theory| |
|lambda-calculus|type-theory|logic| |
Formal grammars are generative descriptions of formal languages. In augmented forms, they can also be used to specify compilers. |
null |
Sorting denotes the algorithmic problem of ordering a set of elements with respect to some total ordering relation. |
null |
With fixed-size blocks, what you have described is a [free list][1]. This is a very common technique, with the following twist: the list of free blocks is stored in the free blocks themselves. In C code, it would look like this:
static void *alloc_ptr = START_OF_BIG_SEGMENT;
static void *free_list_head = NU... |
**Update**: my earlier answer dealt with bipartite graphs, which the OP was NOT asking about. I'm leaving it in for now, as related info. but the more pertinent information relates to perfect matchings in nonbipartite graphs.
In this regard, [there's a nice survey by Propp][1] that outlines progress (till 1999). So... |
Sudoku generation is hard enough. It is much harder when you have to make an application that makes a completely random Sudoku.
The goal is to make a completely random Sudoku in Objective-C (C is welcome). This Sudoku generator must be easily modified, and must support the standard 9x9 Sudoku, and a more complex ver... |
Random Sudoku generator in Objective-C |
|algorithms|programming| |
I have observed that there are two different types of states in branch prediction.
1. In superscalar execution, where the branch prediction is very important, and it is mainly in execution delay rather than fetch delay.
2. In the instruction pipeline, where the fetching is more problem since the instruction... |
Which kind of branch prediction is more important? |
|cpu-pipelines| |
|cpu-pipelines|computer-architecture| |
{"Voters":[{"Id":41,"DisplayName":"Kaveh"},{"Id":57,"DisplayName":"eminemence"},{"Id":114,"DisplayName":"Kyle Jones"},{"Id":98,"DisplayName":"Raphael"},{"Id":20,"DisplayName":"J.D."}]} |
Did the [smoothed analysis](http://en.wikipedia.org/wiki/Smoothed_analysis) find its way into main stream analysis of algorithms? Is it common for algorithm designers to apply smoothed analysis to their algorithms? |
Does Smoothed Analysis get used outside academia? |
|soft-question|algorithm-analysis| |
Is there any evidence suggesting that time spent on writing up, or thinking about the requirements will have any effect on the development time? Study done by Standish (1995) suggests that incomplete requirements partially (13.1%) contributed to the failure of the projects. Are there any studies done to show that time ... |
Time spent on requirement and its effect on project success and development time |
|software-engineering|requirement-analysis| |
I don't know which case is prevalent, but I would like to offer some thoughts on your proposal of double pipelines.
First of all, you would need double the wire which would consume double the energy and produce double the heat while active. While not needed, on the other hand, it would be completely useless. So one ... |
Is there any evidence suggesting that time spent on writing up, or thinking about the requirements will have any effect on the development time? Study done by Standish (1995) suggests that incomplete requirements partially (13.1%) contributed to the failure of the projects. Are there any studies done which show that ti... |
NPI is the class of NP problems without any known polynomial time algorithms. I'm looking for problems such that a known problems in NPI is reducible to it but its not known to be NP-hard. Also, there is known reduction from. Are there any known examples of such problems?
For example, Graph Isomorphism problem and I... |
Problems between NPI and NP-hard |
|complexity-theory| |
NPI is the class of NP problems without any polynomial time algorithms and not known to be NP-hard. I'm interested in problems such that some problem in NPI is reducible to it but its not known to be NP-hard and there is no known reduction from it to the NPI problem. Are there any known examples of such problems?
Fo... |
NPI is the class of NP problems without any polynomial time algorithms and not known to be NP-hard. I'm interested in problems such that a candidate problem in NPI is reducible to it but it is not known to be NP-hard and there is no known reduction from it to the NPI problem. Are there any known examples of such proble... |
|complexity-theory|np-hard| |
|software-engineering| |
See Code Complete, By Steve McConnell, Table 3-1.
He compares the average cost of fixing defects based on when they're introduced and detected.
Detection at construction time costs 5-10 times more than detection at requirements time, and 10-100 times more post-release.
The table is based on the following sources:
... |
Assuming $P \ne NP$, NPI is the class of NP problems without any polynomial time algorithms and not known to be NP-hard. I'm interested in problems such that a candidate problem in NPI is reducible to it but there is no known reduction from it to the NPI problem and it is not known to be NP-hard.
>Are there any know... |
|algorithms|soft-question|algorithm-analysis|complexity-theory| |
I am reading [Mining Significant Graph Patterns by Leap Search][1] (Yan et al., 2008), and I am unclear on how their technique translates to the unlabeled setting, since $p$ and $q$ (the frequency functions for positive and negative examples, respectively) are omnipresent.
On page 436 however, the authors clearly st... |
Applying the graph mining algorithm Leap Search in an unlabeled setting |
|data-mining| |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.