instruction stringlengths 0 29.8k ⌀ |
|---|
For which values of $k$ is a $k$-state-bounded version of the halting problem decidable? |
|computability|halting-problem| |
There are many cases in which a higher-level request does not reach the lowest level. A simple example would be reading data from a file. If the file system already has the requested data cached, it will not call into the lower level disk driver to read the data. |
null |
I would like to have a formal description on how parametrizing the threshold in the approximation of vertex cover using LP would impact the approximation factor of the problem.
The linear programming problem would became:
Let $0\leq t\leq 1$ be the threshold (as a parameter)
\begin{align}
&\min \sum_{v \in ... |
Parametrized threshold for LP Approximation in Vertex Cover Problem |
|optimization|approximation|linear-programming|parameterized-complexity|vertex-cover| |
null |
This is a matching problem and can therefore be solved efficiently.
Make a bipartite graph where one side is $S$, and the other side is $B$, made up of $n$ copies of $M$. If you enumerate the elements of $M$, $m_1,\ldots,m_k$, then $b_{i,j}\in B = m_j$ for all $i\in [n]$. Then draw an edge from $s_\ell$ to $b_{i,j}$... |
null |
The class of chordal graphs is a central graph class in both the area of graph classes, and also in algorithmic graph theory.
By _central_, I mean that it has important graph classes above and below (and on the side of it), and that it relates to very important topics in graph algorithms.
Chordal graphs is a supe... |
The boundary between context-free and context-sensitive is only determined by *one thing*: whether or not it can be decided with a nondeterministic pushdown automata.
With respect to grammar specifically, most practical programming languages are *almost* context-free if not context-free, but the context-free/context... |
This is a matching problem and can therefore be solved efficiently.
Make a bipartite graph where one side is $S$, and the other side is $B$, made up of $n$ copies of $M$. If you enumerate the elements of $M$, $m_1,\ldots,m_k$, then $b_{i,j}\in B = m_j$ for all $i\in [n]$. Then draw an edge from $s_\ell$ to $b_{i,j}$... |
null |
null |
null |
I am presented with the following problem: In an array of n sorted numbers and f(n) unsorted numbers where f(n)=O(log n), find an algorithm to sort the entire array in O(n) time.
What I am getting from this is that I should find an algorithm to sort n + O(log n) numbers in O(n) time. I think the first step would be... |
Sorting O(log n) elements in O(n) time |
|algorithms|time-complexity| |
I'd like to offer a more straightforward method for transforming XOR equations into SAT.
**ster 1:**
Regardless of the number of variables on the right side of the equality, we can shift them to the left by iteratively XOR-ing the same variables one by one. For example:
$$a \oplus b = c \iff a \oplus b \oplu... |
null |
I'd like to offer a more straightforward method for transforming XOR equations into SAT.
**step 1:**
Regardless of the number of variables on the right side of the equality, we can shift them to the left by iteratively XOR-ing the same variables one by one. For example:
$$a \oplus b = c \iff a \oplus b \oplu... |
The distance to clique is the fewest number of vertices to remove such that the resulting graph is a clique.
Let us take the complement graph $\overline G$ of $G$. Now, we instead want to find the fewest number of vertices to remove such that the resulting graph is _edgeless_.
Recall that if $I$ is edgeless (i.e... |
null |
So I am covering succinct trees, and in the lecture, it mentioned that "An n-node tree takes 2n pointers or 2n lg n bits (can be easily reduced to n lg n + O(n) bits). First, question is why 2nlgn bits, and how we can reduce it to nlgn? |
How many bits do the pointers take? |
|memory-access|succinct-data-structures| |
Consider a graph tree $T$, where we are given $k > 1$ unique pairs of nodes $\{u_1,v_1\}\dots \{u_k,v_k\}$. Let $P_{i}$ denote the unique path on $T$ between $u_i$ and $v_i$. Then, my problem is to efficiently find the intersection of all paths $\bigcap_{i=1}^k P_i$ (in terms of vertices). Note that the intersection i... |
Efficient intersection of multiple paths in a tree |
|algorithms|graphs|trees| |
In *Sheeran, Mary, and Gunnar Stålmarck*: **A tutorial on Stålmarck’s proof procedure for propositional logic** there is an example application of the method to`(((p -> p) -> p) -> (p -> q)) -> (((p -> q) -> p) -> q)` in which the authors mention that a triplets is "dropped" once it triggered a change in the equivalenc... |
Stålmarck's method, can triplets be dropped once they triggered equivalences |
|decision-problem|propositional-logic| |
null |
Let P be the language of palindromes over the alphabet Σ = {0, 1}. and let P‘ be the subset of the palindromes with different numbers of 0s and 1s. Is P' context-free? I know that for the language of the set of palindromes with the same numbers of 0s and 1s is not context-free. |
Let P be the language of palindromes over the alphabet Σ = {0, 1}. and let P‘ be the subset of the palindromes with different numbers of 0s and 1s |
|formal-languages|context-free|formal-grammars| |
null |
> Does the CPU continue executing instructions with stale data passed even when it is concluded that a new fetch is needed?
Yes, that's right. This is the culprit in most of the attacks that are called *Spectre* or *MDS*, including this one. I think the best demonstration is the original Meltdown attack: you can jus... |
Intuitively you cannot check palindromicity and (un)equality of numbers using a single pushdown, so also $P'$ must be non-context-free.
Formally proving unequal-repeating-numbers to be non-context-free is quite a challenge, see https://cs.stackexchange.com/q/162133/4287 for the language $\{ a^nb^nc^m \mid n\neq m \}... |
They say “pointer” but use that word in a very nonstandard way. What they actually mean is array indexes. Every item has an index from 0 to n-1. If n < 2^k then you need only k bits to store such an index. The other way round, k = ceil(log n), that is the base-2 logarithm of the number of items, rounded up to an intege... |
If you use some primitive algorithm that sorts n items in O(n^2) then it sorts log n items in O(log^2 n), which is much faster than O(n).
Using quick sort, you can sort n items in O(n log n) and (n / log n) items n O(n). In practice, if n = 1,000,000 and log n = 20, you can merge 1,000,000 / 20 = 50,000 items in O(... |
Here is a useful fact: in a tree, the intersection of two paths, $P_1 \cap P_2$, is another path (or is empty).
Also, you can compute that path explicitly in $O(1)$ time using a few [least common ancestor](https://en.wikipedia.org/wiki/Lowest_common_ancestor) queries and a case analysis. The resulting intersection ... |
null |
null |
null |
This is a somewhat philosophical question, but I would like to know if there is a hard answer. Also, please excuse my likely unconventional terminology here, this is not my field of expertise.
**Clarification:** I am not talking about the multiple realizability of a computation in different media (e.g. the fact that... |
Is computation of a given operation infinitely multiply realizable 'computationally-speaking'? |
|turing-machines|information-theory|philosophy| |
I have a list of objects that have a defined measure of distance between them and I'm trying to store them in a data structure such that I can easily and quickly query which of the objects is closest to a key (like nearest-neighbor). The problem is that these objects aren't points and, as far as I'm aware, can't be con... |
Data Structure for efficient nearest neighbor search using generalized distance? |
|data-structures| |
I have a list of objects that have a defined measure of distance between them and I'm trying to store them in a data structure such that I can easily and quickly query which of the objects is closest to a key which is not necessarily in the list (like nearest-neighbor). The problem is that these objects aren't points a... |
I want to include the distance of a node to the closest obstacle in the cost function, so that the path length is not only minimal, but also not near obstacles.
We know that:
Dijkstra's algorithm uses cost function $f(n) = g(n)$
whereas A* uses cost function $f(n) = g(n) + h(n)$, with $g(n)$ being the cost of the ... |
A* (A-star) search algorithm including closest distance from a node to an obstacle in heuristic and edge cost |
|algorithms|graphs|graph-traversal|heuristics|a-star-search| |
I want to include the distance of a node to the closest obstacle in the cost function, so that the path length is not only minimal, but also not near obstacles.
We know that:
Dijkstra's algorithm uses cost function $f(n) = g(n)$
whereas A* uses cost function $f(n) = g(n) + h(n)$, with $g(n)$ being the cost of the ... |
A* (A-star) search algorithm including closest distance from a node to an obstacle in heuristic and step cost |
null |
null |
This is a somewhat philosophical question, but I would like to know if there is a hard answer. Also, please excuse my likely unconventional terminology here, this is not my field of expertise.
Multiply Realizable: can be instantiated in many different ways but still be the same system. Example, command line Chess is... |
Although everyone seems to have given similar answers, I think (0+10)*(11+1+ϵ)(0+01)* is the solution. On both sides, consecutive 1's should not appear, and in the middle, all cases that satisfy the condition of 'at most one pair' should be considered. |
Although everyone seems to have given similar answers, I think $(0+10)^*(11+1+ϵ)(0+01)^*$ is the solution. On both sides, consecutive 1's should not appear, and in the middle, all cases that satisfy the condition of 'at most one pair' should be considered. |
I am going through Justin Thaler's book - https://people.cs.georgetown.edu/jthaler/ProofsArgsAndZK.pdf - "Proofs, Arguments, and Zero-Knowledge"
He presents the Sumcheck protocol & then claims on Page 41 that the interactive Sumcheck protocol helps solve the SAT problem in better than exponential time.
What Sumch... |
How does the sumcheck protocol help solving the #SAT (circuit satisfiability) problem? |
|complexity-theory|satisfiability|zero-knowledge-proofs| |
null |
It doesn't solve SAT in faster than exponential time. It solves #SAT (not SAT), and the prover still needs exponential time.
It doesn't give you the values which satisfy the circuit. It doesn't need to. #SAT doesn't ask you to find the values that satisfy the circuit. It asks for a count of the number of satisfy... |
Given a graph with $n$ vertices and $m$ edges, $m \le {n \choose 2}$, we index the vertices from 1 to $n$, and denote every edge by $(l,r)$ where $1\le l < r \le n$.
Find the maximum $k$ such that there is a matching consisting of $k$ edges satisfying $l_1<l_2<...<l_k$ and $r_1<r_2<...<r_k$.
This can also be though... |
null |
You can use a [CoverTree][1]. It indexes objects purely by distance. One implementation is available [here][2].
I have my own implementation [here][3] (Java) which is based on a more recent publication ["Faster Cover Trees"][4] by Mike Izbicki and Christian R. Shelton.
You may have to modify my implementation b... |
Here is the proof of a∗ being star-free:
$\Sigma* = \bar{\emptyset} $
$ A∗= \overline{Σ∗(Σ∖A)Σ∗} $
I'm kind of confused whether there could be a similar proof for $a * b$ or $(a * b) *$.
|
Is (a*b) or (a*b)* star-free? |
|formal-languages|regular-languages|kleene-star| |
Here is the proof of a∗ being star-free:
$\Sigma* = \bar{\emptyset} $
$ A∗= \overline{Σ∗(Σ∖A)Σ∗} $
I'm kind of confused whether there could be a similar proof for $a * b$ or $(a * b) *$.
Would this be a proof for $a * b$? :
$ A∗B= \overline{Σ∗(Σ∖A)Σ∗(Σ∖B)} $
For $(A * B )*$ it seems more complicated... |
Have a good day!You can find the correlation coefficient between what you want and every node of a tree , then choose the value with the highest correleation coefficient. |
null |
I have been trying to understand the logical and physical address of some data/instruction the logical address is a address generated by the CPU during a execution cycle.So if I write
this code
int a = 0;
printf("%d",&a);
what will be printed is the logical address right?So everything from the OS which ... |
Logical address vs physical address |
|computer-architecture|cpu| |
The OS has to "know" the correspondence between physical and logical addresses, because it's responsible for configuring the Memory Management Unit to map between them, and some part of the OS kernel has to start up in a memory region where logical and physical addresses are identical in order to be able to do that map... |
The fact that you first pass every value to calculate mean and then calculate variance means you need to store data and that's the problem ! For a lot of applications you want to be able to compute "on the fly" |
Every time your computer executes an instruction, the address of that instruction is a logical address. Every time a computer instruction access data, the address of the data is a logical address.
There will be some table that describe at which physical address the data belonging to some logical address is stored. ... |
$a^*b = (a^*)\cdot b$
$(a^*b)^* = \{\varepsilon\} \cup \{a,b\}^* b$ |
Yuvals method works very well if you know which elements have been modified. If you don’t know which were modified, you make one pass through the array looking for elements followed by a smaller one. One of two must have been modified, so you move them both into a separate array. If there are k elements modified you mo... |
Have a good day!You can find the correlation coefficient between what you want and every node of a binary search tree , then choose the value with the highest correleation coefficient. |
Given a weighted directed graph and a vertex $r$ designated as root, at each step I will do one of the following:
* Add a new edge to the graph.
* Remove an edge from the graph.
After each step I need to find a minimum weight arborescence rooted at $r$. An arborescence is a spanning tree where all edges are dire... |
Is there a fully dynamic algorithm to find a minimum arborescence (like Chu–Liu/Edmonds' algorithm) |
|algorithms|graphs|directed-graphs| |
This problem is known as the preclusion number of a graph, or minimum blocker perfect matching problem. It was shown to be mathcal{NP}-hard in
<cite authors="Lacroix, Mathieu; Mahjoub, A. Ridha; Martin, Sébastien; Picouleau, Christophe">_Lacroix, Mathieu; Mahjoub, A. Ridha; Martin, Sébastien; Picouleau, Christophe_, ... |
Given a weighted directed graph with nonnegative edge weights and a vertex $r$ designated as root, at each step I will do one of the following:
* Add a new edge to the graph.
* Remove an edge from the graph.
After each step I need to find a minimum weight arborescence rooted at $r$. An arborescence is a spanning... |
Is there a fully dynamic algorithm to find a minimum arborescence (like Chu–Liu/Edmonds' algorithm)? |
Let $T = \{0, 1\} ^ {n}$, i.e. set of all $n$-bit binary strings ($n$-tuples). Let $f : T \to T$ be a function, that maps one string to another. $f$ is bijective, but $f^{-1}$ is hard to compute.
It is obviously known, that $f^{k}(t) = t$ for some $k \in \mathbb{N}$, and some $t \in T$, i.e. $f$ has at least one cyc... |
Enumerate all n-tuples in parallel |
|algorithms|combinatorics|parallel-computing|enumeration| |
So I think the above language is regular. I tried using pumping lemma but pumping up or down, changes the value of w1 but has no relation with w2 or w3. I think the language w1w2w3 is just similar to {0,1}* . I can create a NFA for {0,1}* , so that is why the language is regular. w1w2w3 is just like a concatenation of ... |
Is the language regular A2 = {w1w2w3 | w1, w2, w3 ϵ {0, 1}* }? How to prove? |
|formal-languages|regular-languages|automata|regular-expressions|pumping-lemma| |
So I think the above language is regular. I tried using pumping lemma but pumping up or down, changes the value of w1 but has no relation with w2 or w3. The resulting string after pumping will also be in the language. I think the language w1w2w3 is just similar to {0,1}* . I can create a NFA for {0,1}* , so that is why... |
1. If you think the language is regular, there is no point using the pumping lemma. It is used to prove that some languages are NOT regular.
2. The sentence "$\{0,1\}^*$ can represent the NFA for the language" makes absolutely no sense.
3. Your language is equal to $\{0,1\}^*$ (you can choose any $w_1$, and $w_2 =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.