instruction stringlengths 0 29.8k ⌀ |
|---|
I am studying the complexity of SAT resolution refutation. There is a useful tool named weakening rule
> T[he weakening rule][1]:
B -->B ∨ C
says that from a clause B we can derive the weaker clause B ∨ C for an arbitrary C. We say
that B ∨ C is a weakening of B.
We can add this extra rule without loss of gene... |
null |
For a given number of steps, the $\delta$ is
$$\delta=\frac{x_e-x_s}{n}$$ and you have the constraints $\delta\le\delta_{\max},n\le n_{\max}$ (if I understand anything of your question).
So
$$\left\lceil\frac{x_e-x_s}{\delta_{\max}}\right\rceil\le n\le n_{\max}.$$
----------
There is only a solution ... |
null |
null |
null |
null |
Since your types both reference each other, these are not inductive types, but [coinductive types](https://cs.stackexchange.com/questions/525/what-is-coinduction).$^{1}$ That's because, if you expand out T1 and T2 (as you have done partially in the question), you get an infinite structure:
```
T1 = { a: int, { a: int... |
The usual many-one reduction involves Turing machines transforming an input, $w$, of some language to an input, $f(w)$, of some other language in polynomial time. (Where $w \in L_1 \iff f(w) \in L_2$).
But for $P$-completeness, logspace or NC reductions are often used instead (taken from [wikipedia](https://en.wikip... |
Are any known problems complete for $P$ under "$O(1)$ reductions?" |
|complexity-theory|polynomial-time|constant-time| |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (most lik... |
DMA mode: burst or cycle stealing -- how to know and set? What is blocked? |
|cpu|memory-hardware|memory-access| |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (most lik... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (most lik... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I'm gues... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I'm gues... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I'm gues... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I'm gues... |
In this question I need your help researching time complexity of a dynamic array with insert-last() and delete-last() operations:
We define a data structure and call it dynamic array, we define the operations inseet-last() and delete-last(), we also define a set of rules for this data structure:
1. When the data ... |
Researching the complezity of a dynamic array with insert-last() and delete-last() operations |
|time-complexity|data-structures|asymptotics|arrays| |
Researching the complexity of a dynamic array with insert-last() and delete-last() operations |
I have a matrix (input):
| -- | c1 | c2 | c3 |
|:--:|:--:|:--:|:--:|
| r1 | AA | BB | CC |
| r2 | CC | RR | BB |
| r3 | EE | DD | FF |
| r4 | KK | DD | EE |
| r5 | DD | GG | KK |
| r6 | PP | QQ | KK |
1. Let's call each matrix cell a `namespace`. If two rows begin from the same namespace, then such a names... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA PICe devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I... |
Let C be even. Take C items where $w_{ij} = 1$ and C items where $w_{ij} = 2$.
Your greedy algorithm will put the same C items in each bin, so you find a solution with C items. Instead you can put C items of size 1 into bin 1, then C/2 items each of size 2 into bin 2 and bin 3, giving a solution where you get C ite... |
I couldn't find any answer to the question online but i think i figure it out.
1- when you type on your keyboard any alphabetical letters, you actually sending a binary code NOT the letter itself. So...
2- the alu of the computer it is a hardware circuits which takes the instructions it is based on and execute t... |
I often hear NP-completeness as problems such that, if they were in $P$ all problems in $NP$ are in $P$. The true definition, though, is that NP-complete is a set of languages that all languages in NP reduce to in polynomial time (Cook reduction).
But is this idea that NP-completeness implies all problems are in P i... |
Is finding a Cook reduction from $L_1$ to $L_2$ equivalent to proving $L_2 \in P \Rightarrow L_1 \in P$ |
|complexity-theory|reductions|polynomial-time|polynomial-time-reductions| |
|complexity-theory|reductions|logic|polynomial-time|polynomial-time-reductions| |
null |
In this question I need your help researching time complexity of a dynamic array with insert-last(x) and delete-last() operations:
We define a data structure and call it dynamic array, we define the operations inseet-last(x) and delete-last(), we also define a set of rules for this data structure:
Insert-last(x):... |
Researching the complexity of a dynamic array with insert-last(x) and delete-last() operations |
I often hear NP-completeness as problems such that, if they were in $P$ all problems in $NP$ are in $P$. The true definition, though, is that NP-complete is a set of languages that all languages in NP reduce to in polynomial time.
But is this idea that NP-completeness implies all problems are in P if they are in P a... |
Is finding a Polytime reduction from $L_1$ to $L_2$ equivalent to proving $L_2 \in P \Rightarrow L_1 \in P$ |
**Edit:** A **walk** is a finite or infinite sequence of edges which joins a sequence of vertices. A **trail** is a walk in which all edges are distinct.
A **cycle** in a graph is a non-empty trail in which only the first and last vertices are equal.
We know that determining whether two vertices (or two edges) fall... |
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 system with two DMA PCIe devices.
Device 1 is an input device that regularly DMA writes for 300 microseconds (I... |
I know that, T(m,n) = T(m-1,n) + T(m,n-1) + c it's the recurrence equation of Longest Common Subsequence algorithm. And the time complexity of the LCS in case of recursive method is O(2^n+m).
But, how do I derive the time complexity from the above recurrence relation? |
How to derive time complexity of the Recurrence Relation - T(m,n) = T(m-1,n) + T(m,n-1) + c |
|algorithms|time-complexity|algorithm-analysis|recurrence-relation|recursion| |
I know that, *T(n,m) = T(n-1,m) + T(n,m-1) + c* it's the recurrence equation of Longest Common Subsequence algorithm. And the time complexity of the LCS in case of recursive method is O(2^n+m).
The base condition is: *when m or n = 0, T(m,n) = 0 i.e., T(0,m)=0 and T(m,0)=0*.
But, how do I derive the time complexi... |
How to derive time complexity of the Recurrence Relation - T(n,m) = T(n-1,m) + T(n,m-1) + c |
null |
I know that, *T(n,m) = T(n-1,m) + T(n,m-1) + c* it's the recurrence equation of Longest Common Subsequence algorithm. And the time complexity of the LCS in case of recursive method is O(2^n+m).
The base condition is: *when m or n = 0, T(m,n) = 1 i.e., T(0,m)=1 and T(m,0)=1*.
But, how do I derive the time complexi... |
I know that, *T(n,m) = T(n-1,m) + T(n,m-1) + c* it's the recurrence equation of Longest Common Subsequence algorithm. And the time complexity of the LCS in case of recursive method is O(2^n+m).
The base condition is: *when m or n = 0, T(m,n) = 1 i.e., T(0,n)=1 and T(m,0)=1*.
But, how do I derive the time complexi... |
A **walk** is a finite or infinite sequence of edges which joins a sequence of vertices. A **trail** is a walk in which all edges are distinct.
A **cycle** in a graph is a non-empty trail in which only the first and last vertices are equal.
We know that determining whether two vertices (or two edges) fall on a tria... |
I often hear NP-completeness as problems such that, if they were in $P$ all problems in $NP$ are in $P$. The true definition, though, is that NP-complete is a set of languages in NP that all languages in NP reduce to in polynomial time.
But is this idea that NP-completeness implies all problems are in P if they are ... |
I realized this question is a [duplicate](https://cs.stackexchange.com/questions/6138/problem-with-implementing-brzozowskis-algorithm).
Basically, as @Pseudonym mentioned above, when reverting DFA you should avoid introducing new starting state of the NFA even if there were multiply finish states in DFA. Instead jus... |
**Hint:**
A solution of the homogeneous recurrence is well-known to be
$$T(n,m)=\binom{n+m}n=\frac{(n+m)!}{n!\,m!}$$
by Pascal's identity.
And a particular solution of the non-homogeneous solution is simply
$$T(n,m)=-c.$$ |
null |
I have formulated an instance of a 0-1 Integer Program (IP), which I am trying to determine the complexity of (can this instance be solved in polynomial time or not). As we know, the 0-1 IP is NP-complete, but I suspect my instance can be solved in polynomial time; which of course does not contradict the hardness of th... |
Can the optimization version of a problem be NP-hard while its decision version is in P? |
|complexity-theory|optimization|np-complete|integer-programming| |
I realized this question is a [duplicate](https://cs.stackexchange.com/questions/6138/problem-with-implementing-brzozowskis-algorithm).
Basically, as @Pseudonym mentioned above, when reverting DFA you should avoid introducing new starting state of the NFA even if there were multiple finish states in DFA. Instead jus... |
The assembler translates human-readable instructions to machine-language code, which are mere binary numbers. The codes are made of an opcode (identification number of a specific operation) followed by arguments (register number, memory address, immediate value).
The processor fetches the opcodes one after another a... |
null |
**Hint:** Forget about the stretch of the PRG and let's instead focus on the whether the output of $f$ necessarily looks like a random string (even if we give it a truly random string instead of a PRG output).
**Answer:** The claim is false for a general OWF.
A OWF is not guaranteed to have a "random looking" outpu... |
I am trying to optimize a building layout in a game, and it seems like the problem could be solved by a computer much quicker than by my own trial and error. However, I only have a cursory understanding of programming (mostly JavaScript), so I'm hoping some software exists which can do most of the work for me, or some ... |
Is there a good platform/software/language to make a computer analyze this optimization problem? |
|graphs|optimization| |
null |
I am trying to optimize a building layout in a game, and it seems like the problem could be solved by a computer much quicker than by my own trial and error. However, I only have a cursory understanding of programming (mostly JavaScript), so I'm hoping some software exists which can do most of the work for me, or some ... |
Often, if the decision problem can be solved in polynomial time, the optimization problem can be solved in polynomial time as well. For example, if you could decide in polynomial time if a problem has a solution with at most a certain cost, you may be able to binary search for the minimal possible cost.
Your decisio... |
It is given that the language is not decidable.
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/e1cIB.png
Is this language Turing-recognizable? |
EPSILON(CFG) = {<G,H> | G and H are CFGs where the concatenation is epsilon. is this language Turing-recognizable? |
|undecidability|turing-recognizable| |
No, this only works one way.
If there is a polynomial time reduction from $A$ to $B$, then $B \in P \implies A \in P$. This works irrespective of the what kind of languages $A$ and $B$ are.
The converse is not true. For example, take two languages $A, B \notin P$ such that there is *no* polynomial time reduction ... |
My understanding is that this statement regarding the halting problem is proven:
>Given a Turning Machine (TM) A and an input B, there does not exist any TM C which can, given A and B as input, determine in a finite number of steps whether A halts on input B for all possible A and B.
What I want to know is whether ... |
Does the unsolvability of the halting problem imply the existence of Turing machines which cannot be proven either to halt or not halt? |
|formal-languages|turing-machines| |
I am trying to optimize a building layout in a game, and it seems like the problem could be solved by a computer much quicker than by my own trial and error. However, I only have a cursory understanding of programming (mostly JavaScript), so I'm hoping some software exists which can do most of the work for me, or some ... |
My understanding is that this statement regarding the halting problem is proven:
>Given a Turning Machine (TM) A and an input B, there does not exist any TM C which can, given A and B as input, determine in a finite number of steps whether A halts on input B for all possible A and B.
What I want to know is whether ... |
Consider the language $\overline{\mathsf{EPSILON}_{\mathsf{CFG}}} = \{ <G, H> \mid \text{$G$ and $H$ are CFGs and $L(G) \cap L(H) \neq \{\varepsilon\}$} \}$.
If $\overline{\mathsf{EPSILON}_{\mathsf{CFG}}}$ and $\mathsf{EPSILON}_{\mathsf{CFG}}$ were recognizable, then they would both be decidable*. Since $\mathsf{EP... |
Consider the language $\overline{\mathsf{EPSILON}_{\mathsf{CFG}}} = \{ <G, H> \mid \text{$G$ and $H$ are CFGs and $L(G) \cap L(H) \neq \{\varepsilon\}$} \}$.
If $\overline{\mathsf{EPSILON}_{\mathsf{CFG}}}$ and $\mathsf{EPSILON}_{\mathsf{CFG}}$ were both recognizable, then they would both be decidable*. Since $\math... |
I was working on a problem for some time now, and I made a data structure to solve it. To my surprise, I could not find any instance of this data structure on the internet (though I am certain someone has thought of this).
Put simply, it is a sorted linked list and a sorted array, with the array pointing to spots a ... |
My understanding is that this statement regarding the halting problem is proven:
>There does not exist any TM C that can, given a Turing machine A and input B as inputs, determine in a finite number of steps whether A halts on input B, and that works correctly for all A and B.
What I want to know is whether this ... |
That's a complex set of requirements, and I don't think I understand them all, so I'll suggest a few general approaches for this sort of problem:
One standard approach is to formulate this as an instance of [integer linear programming](https://en.wikipedia.org/wiki/Integer_programming), and use an off-the-shelf ILP ... |
null |
null |
null |
The usual many-one reduction involves Turing machines transforming an input, $w$, of some language to an input, $f(w)$, of some other language in polynomial time. (Where $w \in L_1 \iff f(w) \in L_2$).
But for $P$-completeness, logspace or NC reductions are often used instead (taken from [wikipedia](https://en.wikip... |
null |
Elaborating from my comments above, here is at least one partial answer to your question:
As has been clearly known for about 100 years, there is no program that can correctly solve the halting problem 100% of the time, given any other program we want it to analyze. Or, at least, as Turing put it, such a program "ca... |
Got inspiration while reading history book. Inspired by: [China, the cake of kings and emperors, Le Petit Journal 1898][1]
**Background:**
> After the Second Opium War, United Kingdom(UK), France, Russia, Germany and Japan have a meeting to dividing China the cake.
The cake have fixed size but can be break d... |
Data structure for represent the cake in cake diving problem? |
|algorithms|data-structures| |
Got inspiration while reading history book. Inspired by: [China, the cake of kings and emperors, Le Petit Journal 1898][1]
**Background:**
> After the Second Opium War, United Kingdom(UK), France, Russia, Germany and Japan have a meeting to dividing China the cake.
The cake have fixed size but can be break d... |
Data structure for represent the cake in cake dividing problem? |
null |
null |
null |
When speaking about many-one Karp reductions, the definition is stated below:
$$
A \leq_P B \iff \exists f \colon \: \Sigma^* \mapsto \Gamma^* \: \text{such that} \: (w \in A \iff f(w) \in B)
$$
where $f$ is a polynomial time total computable function. But I think this raises a bit of an issue.
I have an [on... |
How do Turing machines output $f(w)$? |
|complexity-theory|time-complexity|reductions|constant-time| |
How do Turing machines output $f(w)$ for $O(1)$ reductions? |
null |
I have a network of 1,000 computers that are sharing processing jobs. There are a few constraints:
1. Each computer has a maximum ratio of jobs it can perform
- Can be higher than an equal share
2. Computers are not obligated to do work
3. Not all of these computers will be online at any given time
4. ... |
Fault-Tolerant Distributed Work Sharing |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.