instruction stringlengths 0 29.8k ⌀ |
|---|
### What works
If you nest the definition of the fixpoint on lists inside the definition of the fixpoint on trees, the result is well-typed. This is a general principle when you have nested recursion in an inductive type, i.e. when the recursion goes through a constructor like `list`.
Fixpoint size (t : LTree... |
### What works
If you nest the definition of the fixpoint on lists inside the definition of the fixpoint on trees, the result is well-typed. This is a general principle when you have nested recursion in an inductive type, i.e. when the recursion goes through a constructor like `list`.
Fixpoint size (t : LTree... |
Many others have mentioned that Type-1 languages are those that can be recognised by linear bounded automata. The halting problem is decidable for linear bounded automata, which in turn means many other properties that are computationally undecidable for languages recognised by Turning Machines are decidable for Type-1... |
Consider an inductive type which has some recursive occurrences in a nested, but strictly positive location. For example, trees with finite branching with nodes using a generic list data structure to store the children.
Inductive LTree : Set := Node : list LTree -> LTree.
The naive way of defining a recursive... |
In a [video][1] discussing the merits of particle filters for localization, it was implied that there is some ambiguity about the complexity cost of particle filter implementations. Is this correct? Could someone explain this?
[1]: http://www.youtube.com/watch?feature=player_embedded&v=4S-sx5_cmLU#! |
What Is The Complexity of Implementing a Particle Filter? |
|complexity-theory| |
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. This Sudoku generator must be easily modified, and must support the standard 9x9 Sudoku, and a more complex version.
Is there an algorithm... |
Random Sudoku generator |
|algorithms| |
“Big O” ($O$) is by far the most common one. When you analyse the complexity of an algorithm, most of the time, what matters is how fast the run time¹ grows when the size of the input grows. To say that an algorithm has a run time of $O(f(n))$ for an input size $n$ means that there exists some constant $K$ such that th... |
It's difficult to answer the question "how often". But as with all "underlying structures" the benefit comes from recognizing that the underlying problem one is trying to solve has a matroid (or greedoid) structure. It's not just matroid problems. The matroid intersection problem has a specific model (bipartite matchin... |
|computational-geometry|robotics| |
|computational-geometry|robotics|artificial-intelligence|knowledge-representation|reasoning| |
In quantum computation, what is the equivalent model of a Turing machine?
It is quite clear to me how quantum **circuits** can be constructed out of quantum gates, but how can we define a quantum Turing machine (QTM) that can actually benefit from quantum effects, namely, perform on high-dimensional systems?
|
How to define quantum-turing-machines? |
|computability|quantum-computing|turing-machines| |
Does SQL need subqueries?
Imagine a sufficiently generalized implementation of the structured query language for relation databases. Since the structure of the canonical SQL `SELECT` statement is actually pretty important for this to make sense, I don't appeal directly to relational algebra, but you could frame thi... |
Do subqueries add expressive power to SQL queries? |
|database-theory|relational-algebra| |
**Claim:** $\mathrm{HAL}$ (the class of languages accepted by min-heap automata) and $\mathrm{CFL}$ are incomparable.
###$\mathrm{HAL} \setminus \mathrm{CFL} \neq \emptyset$###
A min-heap automaton (HA) with finite, totally ordered heap alphabet accepts $L = \{ a^nb^nc^n \mid n \in \mathbb{N} \} \in \mathrm{CSL} ... |
In the first system what you call subtyping are these two rules:
$$\dfrac{Γ, x:T_1 \vdash M:S}{Γ, x:T_1 ∧ T_2 \vdash M:S}(∧E_1)\quad\dfrac{Γ, x:T_2 \vdash M:S}{Γ, x:T_1 ∧ T_2 \vdash M:S}(∧E_2)$$
They correspond to elimination rules for $∧$; without them the connective $∧$ is more or less useless.
In the second... |
We know that DFAs are equivalent to NFAs in expressiveness powers, there is also a known algorithm for converting NFAs to DFAs (unfortunately I do now know the inventor of that algorithm), which in worst case gives us $2^S$ states, if our NFA had $S$ states.
My question is: what is determining the worst case scenari... |
What are the conditions for a NFA for its' equivalent DFA to be maximal in size? |
|automata|regular-languages| |
|formal-languages|automata|regular-languages| |
To answer your question as stated in the title, there is *no* maximal DFA, since you can always take a DFA and add as many states as you want with transitions between them, but with no transitions between one of the *original* states and one of the new ones. Thus, the new states will not be reachable from the initial s... |
You can recognize the canonical non-context-free (but context-sensitive) language $\{ a^n b^n c^n\ |\ n \geq 1 \}$ with this type of state machine. The crux is that you add tokens to the heap for every $a$ character, and while parsing the $b$ characters, you add 'larger' tokens to the heap, so they only end up at the b... |
The worst-case of $2^{s}$ comes from the number of subsets of states of the NFA. To have the algorithm from Kleene's theorem give an equivalent DFA with the worst-case number of states, there must be a way to get to every possible subset of states in the NFA. An example with two states over alphabet $\{a, b\}$ has a tr... |
To answer your question as stated in the title, there is *no* maximal DFA, since you can always take a DFA and add as many states as you want with transitions between them, but with no transitions between one of the *original* states and one of the new ones. Thus, the new states will not be reachable from the initial s... |
The algorithm you refer to is called the Powerset Construction, and was first published by Michael Rabin and Dana Scott in 1959.
To answer your question as stated in the title, there is no *maximal* DFA for a regular language, since you can always take a DFA and add as many states as you want with transitions betwee... |
The algorithm you refer to is called the Powerset Construction, and was first published by Michael Rabin and Dana Scott in 1959.
To answer your question as stated in the title, there is no *maximal* DFA for a regular language, since you can always take a DFA and add as many states as you want with transitions betwee... |
The worst-case of $2^{s}$ comes from the number of subsets of states of the NFA. To have the algorithm from Kleene's theorem give an equivalent DFA with the worst-case number of states, there must be a way to get to every possible subset of states in the NFA. An example with two states over alphabet $\{a, b\}$ has a tr... |
It appears that the speaker feels that there isn't a definitive complexity analysis yet for the technique. This could be due to a couple of factors.
1. The analysis is hard, and no one has figured it out yet.
2. There technique has multiple different appropriate implementations, based on the problem context.
I... |
It appears that the speaker feels that there isn't a definitive complexity analysis yet for the technique. This could be due to a couple of factors.
1. The analysis is hard, and no one has figured it out yet.
2. The technique has multiple different appropriate implementations, based on the problem context.
I'd... |
You can recognize the canonical non-context-free (but context-sensitive) language $\{ a^n b^n c^n\ |\ n \geq 1 \}$ with this type of state machine. The crux is that you add tokens to the heap for every $a$ character, and while parsing the $b$ characters, you add 'larger' tokens to the heap, so they only end up at the b... |
It appears that the speaker feels that there isn't a definitive complexity analysis yet for the technique. This could be due to a couple of factors.
1. The analysis is hard, and no one has figured it out yet.
2. The technique has multiple different appropriate implementations, based on the problem context.
I'd... |
Suppose that a certain parallel application uses a master-slave design to process a large number of workloads. Each workload takes some number of cycles to complete; the number of cycles any given workload will take is given by a known random variable $X$. Assume that there are $n$ such workloads and $m$ equivalent sla... |
Analyzing load balancing schemes to minimize overall execution time |
|scheduling|distributed-systems|parallel-computing| |
According to [Immerman][1], the complexity class associated with [SQL][2] queries is exactly the safe queries in $\mathsf{Q(FO(COUNT))}$. Is there an extension of SQL (implemented and used in the industry) which captures polynomial time computable queries?
[1]: http://books.google.ca/books?id=kWSZ0OWnupkC&pg=PA224... |
Extension of SQL capturing $\mathsf{P}$ |
|database-theory|complexity-theory|finite-model-theory|descriptive-complexity| |
Let us call a context-free language deterministic if and only if it can be accepted by a deterministic push-down automaton, and nondeterministic otherwise.
Let us call a context-free language inherently ambiguous if and only if all context-free grammars which generate the language are ambiguous, and unambiguous othe... |
null |
Recall that a pair $(A[i], A[j])$ (resp. $(i,j)$) is inverted if $i < j$ and $A[i] > A[j]$.
Assuming your algorithm performs one swap for each inversion, the running time of your algorithm will depend on the number of inversions.
Calculating the expected number of inversions in a uniform random permutation is eas... |
null |
In a [video][1] discussing the merits of [particle filters][2] for localization, it was implied that there is some ambiguity about the complexity cost of particle filter implementations. Is this correct? Could someone explain this?
[1]: http://www.youtube.com/watch?feature=player_embedded&v=4S-sx5_cmLU#!
[2... |
|computational-geometry|knowledge-representation|reasoning|statistics| |
null |
We know that DFAs are equivalent to NFAs in expressiveness power; there is also a known algorithm for converting NFAs to DFAs (unfortunately I do now know the inventor of that algorithm), which in worst case gives us $2^S$ states, if our NFA had $S$ states.
My question is: what is determining the worst case scenario... |
What are the conditions for a NFA for its equivalent DFA to be maximal in size? |
null |
I want to generate a completely random [Sudoku](http://en.wikipedia.org/wiki/Sudoku).
Define a Sudoku grid as a $9\times9$ grid of integers between $1$ and $9$ where some elements can be omitted. A grid is a valid puzzle if there is a **unique** way to complete it to match the Sudoku constraints (each line, column a... |
|algorithms|randomness| |
null |
{"Voters":[{"Id":122,"DisplayName":"Justin"},{"Id":5,"DisplayName":"Ken Li"},{"Id":98,"DisplayName":"Raphael"},{"Id":69,"DisplayName":"Patrick87"},{"Id":12,"DisplayName":"Kevin"}]} |
According to [Immerman][1], the complexity class associated with [SQL][2] queries is exactly the class of *safe queries* in $\mathsf{Q(FO(COUNT))}$ (first-order queries plus counting operator).
Is there an extension of SQL (implemented and used in the industry) which captures polynomial time computable queries? If ... |
Let us call a context-free language deterministic if and only if it can be accepted by a deterministic push-down automaton, and nondeterministic otherwise.
Let us call a context-free language inherently ambiguous if and only if all context-free grammars which generate the language are ambiguous, and unambiguous othe... |
The algorithm you refer to is called the Powerset Construction, and was first published by Michael Rabin and Dana Scott in 1959.
To answer your question as stated in the title, there is no *maximal* DFA for a regular language, since you can always take a DFA and add as many states as you want with transitions betwee... |
As for your main question, I recommend this [short survey][1] by Martin Grohe.
---
> Are the queries that are needed in practice usually simple enough that there is no need for a stronger language?
I'd say this holds most of the time, given the fair amount of extensions added to common query languages (transit... |
You can recognize the canonical non-context-free (but context-sensitive) language $\{ a^n b^n c^n\ |\ n \geq 1 \}$ with this type of state machine. The crux is that you add tokens to the heap for every $a$ character, and while parsing the $b$ characters, you add 'larger' tokens to the heap, so they only end up at the b... |
Today, a talk by Henning Kerstan ("Trace Semantics for Probabilistic Transition Systems") confronted me with category theory for the first time. He has built a theoretical framework for describing probablistic transition systems and their behaviour in a general way, i.e. with uncountably infinite state sets and differe... |
Natural occurrences of monads that make use of the category-theoretical framework |
|applied-theory|soft-question|category-theory| |
Generating the *exact* uniform distribution of all sudoku puzzles can be done that way: you can just randomly generate a 9x9 grid and then only keep it if it is a correct sudoku grid, otherwise retry.
This brute-force approach guarantees you a uniform distribution but is clearly not efficient, since you can multiply... |
The algorithm you refer to is called the Powerset Construction, and was first published by Michael Rabin and Dana Scott in 1959.
To answer your question as stated in the title, there is no *maximal* DFA for a regular language, since you can always take a DFA and add as many states as you want with transitions betwee... |
As it stands, your static and dynamic schedules are both trivially optimal. If you try to minimize the total execution time, then the distribution of the tasks over the slaves is irrelevant for how long the total execution time will be, which is the sum of all execution times. Given tasks with expected execution time $... |
Generating the *exact* uniform distribution of all sudoku puzzles can be done that way: you can just randomly generate a 9x9 grid and then only keep it if it is a correct sudoku grid, otherwise retry.
This brute-force approach guarantees you a uniform distribution but is clearly not efficient, since you can multiply... |
Suppose that a certain parallel application uses a master-slave design to process a large number of workloads. Each workload takes some number of cycles to complete; the number of cycles any given workload will take is given by a known random variable $X$. Assume that there are $n$ such workloads and $m$ equivalent sla... |
Update:
For the new version where you try to minimize the makespan, your static schedule still has the optimal expected value.
Let $M$ be the random variable for the makespan. Let $F_i$ be the time slave $i$ is finished. We then have that $M = \max_i(X_i)$. Let $c_i$ be the number of jobs allocated to slave $i$. ... |
You can recognize the canonical non-context-free (but context-sensitive) language $\{ a^n b^n c^n\ |\ n \geq 1 \}$ with this type of state machine. The crux is that you add tokens to the heap for every $a$ character, and while parsing the $b$ characters, you add 'larger' tokens to the heap, so they only end up at the b... |
Consider the following sketch of a parsing strategy at your own risk.
Instead of reading the input only from one end, we read from both sides and look for matching rules. We can do this in recursive descent style; in a call to $A()$, find (unique) prefix $w$ and suffix $v$ to the input such that there is a rule $A \... |
Your question is not clear enough if you want an extension that captures $P$ and only $P$ or if it captures $P$ and possibly things outside $P$. It looks like that you are interesting only in the exact $P$ class, since you want safe queries and if otherwise, any Turing-complete extension of SQL would do.
We don't kn... |
Your question is not clear enough if you want an extension that captures $P$ and only $P$ or if it captures $P$ and possibly things outside $P$. It looks like that you are interesting only in the exact $P$ class, since you want safe queries and if otherwise, any Turing-complete extension of SQL would do.
We don't kn... |
I want to know if the following problem is decidable and how to find out. Every problem I see I can say "yes" or "no" to it, so are most problems and algorithms decidable except a few (which is provided [here][1])?
> Input: A directed and finite graph G, with v and u as vertices
Question: Does a path in G with u... |
Is the following problem decidable? |
|undecidability| |
Yes, this is decidable, because you can do an exhaustive search of all possible paths. There is no need to look at any paths that repeat a vertex, since the "detour" could be skipped. But the length of any non-repetitive path is bounded by the size of the graph, which is finite, and so there are only finitely many such... |
There is no method that tells you whether a specific problem is decidable or not. With time, you might get a good "hunch" whether or not a specific problem is decidable.
What I usually do is the following:
1. try to solve the problem. That is, try to think of a computer program that solves the given problem. F... |
There are many ways to define the [Kolmogorov-Complexity](https://en.wikipedia.org/wiki/Kolmogorov_complexity), and usually, all these definitions they are equivalent up to an additive constant. That is if $K_1$ and $K_2$ are kolmogorov complexity functions (defined via different languages or models), then there exists... |
Equivalence of Kolmogorov-Complexity definitions |
|kolmogorov-complexity| |
### Big O: upper bound
“Big O” ($O$) is by far the most common one. When you analyse the complexity of an algorithm, most of the time, what matters is to have some upper bound on
how fast the run time¹ grows when the size of the input grows. Basically we want to know that running the algorithm isn't going to take “... |
> are most problems and algorithms decidable except a few (which is provided [here][1])?
Nope. Actually, *most* problems are undecidable. In fact, there are uncountably many problems (languages), but there are only countable many Turing Machines, which means there are at most countable many decidable problems
[... |
|computability|kolmogorov-complexity| |
The problem is trivially decidable, as pointed out by Gilles in a comment. As for your other question...
> are most problems and algorithms decidable except a few (which is provided [here][1])?
Nope. Actually, *most* problems are undecidable. In fact, there are uncountably many problems (languages), but there are... |
I am starting a personal bibliographic research on type-checking algorithms and want some tips. What are the most commonly used type-checking algorithms and strategies? Given some strongly static typed languages with complex typing systems like C++, Java 5+ or Scala, what are the type-checking algorithms that they use? |
Type-checking algorithms |
|type-theory|type-checking| |
In computer networking and high-performance cluster computer design, network topology refers to the design of the way in which nodes are connected by links to form a communication network. Common network topologies include the mesh, torus, ring, star, tree, etc. These topologies can be studied analytically to determine... |
Analysis of and references for Koch-snowflake-like (and other exotic) network topologies |
|computer-networks|network-topology| |
|algorithms|type-theory|type-checking|programming-languages| |
|algorithms|type-checking|programming-languages| |
I've found a nice problem called *ModularFactorial*. Take as input two $n$-digit integers $x$ and $y$, and output $x! \mod y$. This problem is at least as hard as *Factoring* and not know to be hard for **FNP**. The reference is the recent (and beautiful) book by Cristopher Moore and Stephan Mertens [The Nature of Comp... |
In database normalization, 1NF (no multivalued attributes), 2NF (all non-PK attributes depending only on PK attributes) and 3NF (all non-PK attributes depending on all of the PK attributes) are widely known. The 4NF (no part of the PK depending on other part of the PK) is less known, but still reasonably known.
Much... |
How to determine if a database schema violates one of the less know normal forms? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.