instruction
stringlengths
0
29.8k
⌀
NP-completeness proof of coloring problem
|graphs|np-complete|trees|np-hard|colorings|
null
I have the following graph: $G =(V,E)$ and I also have a set of colors $\mathcal{C}=[0,1,2,3,...,c-1]$. (c is equal or smaller than the size of all nodes). I want to know if I can find a coloring procedure that can assign a color to each node(all nodes must be colored) in the way that each node can find all distinctive...
NP-hardness of colorful $r$-neighborhood
Given a graph $G =(V,E)$, a set of colors $\mathcal{C}=\{0,1,2,3,...,c-1\}$, and an integer $r$, I want to know if I can find a coloring procedure that can assign a color to each nodes (all nodes must be colored) in such a way that each node can find all distinctive colors around it within a radius of $r$, i.e., for ev...
As far as I know, all existing strongly polynomial algorithms for flows and assignment problem have $\Omega(V^3)$ complexity (assuming the graph is dense). Is there any theoretical result or conjecture that explains this? I know that there are conjectured complexity lower bounds for problems in **P** based on 3SUM/APSP...
Lower bounds on max-flow and assignment problems
|complexity-theory|network-flow|lower-bounds|assignment-problem|
null
I have asked a [question][1] on math.SE about if there is a way to do it better than by brute force, but this time I am interested in the complexity of the problem itself. I will repeat the problem, with a slight change to it: > Suppose, you have a box $B$ with $n$ items and you pull $k<n$ items out of it. Items hav...
Complexity class of a problem asking for a chance of receiving an item
|complexity-theory|decision-problem|probability-theory|
I don't have an answer to your problem, but I have an answer for a different problem. Let the _Annotated Colorful Neighborhood_-problem be as follows. **Annotated 2-Colorful 1-Neighborhood**<br /> **Input**: $G = (V, E), k, S \subseteq V$<br /> **Output**: Is there a coloring of vertices of $V \setminus S$ such...
Let $S_\ge = \{\langle M \rangle \mid |L(M)| \ge 10\}$. You can prove that it is Turing-recognizable by applying the definition directly. The following algorithm terminates on machines in $S_\ge$ and runs forever on machines that are not in $S_\ge$: * Let $c := 0$ * For $k = 0,1,2,\ldots$: * For every string $...
null
null
As far as I know, all existing strongly polynomial algorithms for flows and assignment problem have $\Omega(V^3)$ complexity in arithmetic model (assuming the graph is dense). Is there any theoretical result or conjecture that explains this? I know that there are conjectured complexity lower bounds for problems in **P*...
Let $S_\ge = \{\langle M \rangle \mid |L(M)| \ge 10\}$. You can prove that it is Turing-recognizable by applying the definition directly. The following algorithm terminates on machines in $S_\ge$ and runs forever on machines that are not in $S_\ge$: * Let $c := 0$ * For $k = 0,1,2,\ldots$: * For every string $...
null
null
I am trying to understand the probing model proposed by Yao in the paper ["Should Tables Be Sorted?"][1]. Yao suggests a "Basic Model" (in the section appropriately titled "Basic Model") but there seems to be some disconnect in the way [I remember hash tables][2] and the way it is presented here. Consider sorted tab...
Trouble Understanding Yao's "Basic Model" for Hashing
|hash-tables|
{"Voters":[{"Id":39237,"DisplayName":"Dair"}],"DeleteType":1}
{"Voters":[{"Id":39237,"DisplayName":"Dair"}]}
Theorem (Correctness of BFS) - Let G=(V,E) be a directed/undirected graph and suppose BFS is run on it from a given source vertex s∈V. - upon termination of the algorithm we should have d[v]=δ(s,v) for all v∈V, where δ(s,v) is the shortest path from s to v. (**Note**: the main difference between d and δ is that d...
Are you able to construct a boolean circuit that computes the majority function of n bits where the circuit only takes up O(n) space? If so, what would that circuit look like? I have a feeling it has to do with a Full Adder, but I am unsure.
Can you compute a majority function of n-bits using an O(n) size circuit?
|complexity-theory|circuits|
Interpret each input as a 1-bit number, and sum all the inputs in a binary-tree fashion. At the $i$-th level of the tree you're dealing with numbers with at most $i+1$ bits. Hence the number of gates on the generic $i$-th level is $O(i \cdot \frac{n}{2^i})$ and the overall number of gates is $O\left( \sum_{i=1}^{\l...
I know that propositional satisfiability is NP-complete and that if I add first-order quantifiers I get the complete problems for the polynomial hierarchy and PSPACE. What happens if my formulas are relations $R(x_1,...,x_n)$ over boolean variables?
Complexity of satisfiability for relational logic on the booleans
|complexity-theory|logic|satisfiability|
Given a graph $G =(V,E)$, a set of colors $\mathcal{C}=\{0,1,2,3,...,c-1\}$, and an integer $r$, I want to know if I can find a coloring procedure that can assign a color to each nodes (all nodes must be colored) in such a way that each node can find all distinctive colors around it within a radius of $r$, i.e., for ev...
Given a graph $G =(V,E)$, a set of colors $\mathcal{C}=\{0,1,2,3,...,c-1\}$, and an integer $r$, I want to know if I can find a coloring procedure that can assign a color to each nodes (all nodes must be colored) in such a way that each node can find all distinctive colors around it within a radius of $r$, i.e., for ev...
NP-hardness of distance-colouring of graphs
null
TL;DR: $n \le C(f) \le n+1$. We can easily prove that $C(f) \ge n$. Consider the set of $x \in \{(,[\}^n$. There are $2^n$ such $x$-values. Each matches a different set of $y$-values. So, you need to send at least $n$ bits to distinguish among these $x$-values. Also, we trivially have $C(f) \le 2n$, as there ...
It is well-known that $\mathsf{MIP} = \mathsf{NEXPTIME}$, and recently there was a breakthrough stating that $\mathsf{MIP^*} = \mathsf{RE}$. This was very confusing because it seemed like the (malicious) provers should become more powerful about fooling the verifier, for the provers was equipped with a new toy, name...
What's the intuition behind MIP* being bigger than MIP?
|complexity-theory|complexity-classes|interactive-proof-systems|
NP-hardness of modified distance-colouring of graphs
null
Nothing much changes. Every relation $R(x_1,\dots,x_n)$ is equivalent to $\exists t_1,\dots,t_m . \varphi(x_1,\dots,x_n,t_1,\dots,t_m)$ for some fresh variables $t_1,\dots,t_m$ (see the [Tseitin transform](https://en.wikipedia.org/wiki/Tseytin_transformation)). Consequently: Satisfiability remains NP-complete. In...
As far as I know, all existing [strongly polynomial algorithms](https://en.wikipedia.org/wiki/Time_complexity#Strongly_and_weakly_polynomial_time) for flows and assignment problem have $\Omega(V^3)$ complexity [in the arithmetic model](https://en.wikipedia.org/wiki/Arithmetic_circuit_complexity) (assuming the graph is ...
Every tree is also a graph. Therefore, you can use breadth-first search directly on a tree. It doesn't require recursion; you can use a queue and a loop. As soon as you encounter a node that satisfies the condition, you stop and return immediately, without continuing the search.
I have asked a [question][1] on math.SE about if there is a way to do it better than by brute force, but this time I am interested in the complexity of the problem itself. I will repeat the problem, with a slight change to it: > Suppose, you have a box $B$ with $n$ items and you pull $k<n$ items out of it. Items hav...
null
Strings in your grammar could potentially terminate with a sequence of $bc$s because of the following, which is not desired. $S \rightarrow ASBSC$ $C \rightarrow bcC \ | \ \epsilon$ --- The correct grammar in this case would be: $S \rightarrow aSe \ | \ A \ | \ \epsilon$ $A \rightarrow aAd \ | \ B \ ...
null
Following @Tassle's comment here is what I have gathered since more careful reading: The $\{1,3\}$, $\{2,3\}$, etc. are not key value pairs they are values to be inserted into a table. The boxed values are potential arrangements for a table given the corresponding insertion. For the example Yao considers for $n=2...
null
null
null
null
null
What Agda is showing you in the source code in *both cases* are the propositional proofs, i.e., elements of the identity type. In Agda the judgemental (definitional) equality is *invisible* to the user. Agda uses it in the background to verify that terms have required types. When it has to compare $a$ and $b$, it norma...
for two's complement, complement bits and add 1(after addition discard carry), so complement of 00000000=11111111, now add 1, 100000000, discard last carry bit (write result in 8 bits again), we get 00000000. notice that in 2's complement notation, number 0 has one and only 1 representation, while in 1's complement (a...
Consider a Reed-Solomon code over a finite field of $\mathbb{F}_q$. Why is the typical block size chosen to be $q-1$ `[1][2][3]`? The reasoning I saw around this is that in order to maximize the rate for a fixed minimum distance. But wouldn't choosing $q$ as the code size would be even slightly better? Does it have to ...
Why is the block size chosen to be q-1 for Reed-Solomon codes?
|coding-theory|error-correcting-codes|
null
How to calculate the maximum step of sorting network? Based on image below, it has most comparators at second index which is 9 comparators than another indices. That's mean, overall networks need 9 forward propagation steps which is the 9 is the maximum step of sorting network. This network has 6 elements input. ...
maximum step of sorting network
|sorting|network-flow|
null
If a CPU is able to execute multiple instructions in parallel, and fetching/decoding/scheduling instructions happen in batches, and there's multiple execution units, etc. What does the IP register points to among all the instructions being executed at the same time?
Regarding CPU ILP: what actually consistitutes "the current instruction"?
|computer-architecture|
I want to learn how to write objective functions for any problem or real-life action(not mathematical problems) can anyone suggest a good source? On online I am mostly finding objective functions for mathematical problems. Can anyone tell from where can i learn those ?
I want to learn how to write objective functions for any problem or real-life action(not mathematical problems) can anyone suggest a good source? On online I am mostly finding objective functions for mathematical problems. Can anyone tell from where can i learn or practice those ?
null
null
The problem you describe (for $r=1$) falls under the so-called $[\sigma,\rho]$-partitioning framework with several hardness results available (see e.g., [1]). In such a problem, we want to color the vertices of a graph in $k$ colors such that for each vertex, the number of neighbors it has with its own color in in $p$ ...
An automaton should come with a plan. What is stored or represented in each of the states? When the requirement asks us to check all substrings of a certain length the plan might start with a substring automaton that keeps in its state the last $k$ symbols seen. A window, sliding over the input string. Below an exam...
null
At [12:11 in this video](https://youtu.be/3d0kk88IE8c?t=729) the creator talks about unverified rumors the <strong>Q* algorithm</strong> can break AES-192 encryption. If this is true, would this mean <strong>P = NP</strong>?
If Q* can break encryption would that prove P=NP?
|np|artificial-intelligence|cryptography|
When you read about the instruction set of a processor, in order not to blow up the brain of the reader, we pretend that instructions are executed one after the other. AND whatever the processor does, it acts AS IF that’s how it works. In reality there are multiple different states related to the IP. There is an in...
You would have to show how being able to break AES-192 encryption would make it possible to solve some NP-complete problem. There would have to be an algorithm like this: “Given is an instance P of an NP-complete problem. Given P we construct one or more instances of AES-192 encryption, break them all, and use the r...
I was wondering if there is a reason behind clearing all the values in a list and reusing it, as opposed to deleting the list and creating a new one. Are there any practical advantages of using `clear()` method, aside from situations where the list is referenced in multiple locations, and deleting it might lead to unin...
What is the practical use of list.clear() method in Python?
|python|
I've implemented [linear BVH as described in Karras 2012](https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/), and I was using triangles' centroids for Morton Code generation. I found recent papers and implementations use triangles' bounding boxes' centroids for Morton Code generation a...
Morton-code based Linear BVH: Why do triangle's bounding boxes' centroids give higher-quality trees than triangles' centroids?
|trees|
I've implemented [linear BVH as described in Karras 2012](https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/), and I was using triangles' centroids for Morton Code generation. I found recent papers and implementations use triangles' **bounding boxes'** centroids for Morton Code generati...
I've implemented [linear BVH as described in Karras 2012](https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/), and I was using triangles' centroids for Morton Code generation. I found recent papers and implementations use triangles' **bounding boxes'** centroids for Morton Code generati...
I've implemented [linear BVH as described in Karras 2012](https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/), and I was using triangles' centroids for Morton Code generation. I found recent papers and implementations use triangles' **bounding boxes'** centroids for Morton Code generati...
What do you mean by deleting a list? for example, if you go on another iteration in the loop, however you want cleared list and not with some random items from previous iteration. my answer is more useless, because you can use some other language features to achieve exactly same result. interesting discussion about lis...
Actually you can study computer science and mathematics All you have to do is search for institution that offers computer science and statistics. Or if that will not help you can learn Data analyst Data science Machine learning And many other thou these are short courses, they are heckit i would advice just try...
null
null
null
I made some code about "integer interpolation" for running approximate alpha blending at FPGA which have low quantities of logic gate. Let's refer to "II" as integer interpolation. "II" made applying Russian peasant algorithm. The different point of Russian peasant between "II", Russian peasant is algorithm for ...
better ways to integer interpolation?
|algorithms|approximation|integers|mathematical-programming|graphics|
I have been trying to implement an approximation algorithm for the max traveling salesman problem with triangle inequality, and each paper I've read references the step of finding the max cycle cover in O(n^3) time. I know how to find it in O(n^6) time by creating a new graph with a vertex for every edge and using a pe...