instruction
stringlengths
0
29.8k
⌀
Non-Deterministic Turing Machine That Accepts RE-R language
|turing-machines|nondeterminism|recursively-enumerable|
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of brunches: 1) An input is accepted if there is at least one node in the tree that is an accept. 2) An input is rejected if all branches are rejected, which means that it is a finite tree. 3) An input is not-accepted if there are loop no...
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of brunches: 1) An input is accepted if there is at least one node in the tree that is an accept. 2) An input is rejected if all branches are rejected, which means that it is a finite tree. 3) An input is not-accepted if there are loop no...
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of brunches: 1) An input is accepted if there is at least one node in the tree that is an accept. 2) An input is rejected if all branches are rejected, which means that it is a finite tree. 3) An input is not-accepted if there are loop no...
null
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of branches: 1) An input is accepted if there is at least one node in the tree that is an accept. 2) An input is rejected if all branches are rejected, which means that it is a finite tree. 3) An input is not-accepted if there are loop no...
As far as I know for Non-Deterministic Turing Machine (NTM) there are 4 kind of branches: 1) An input is accepted if there is at least one node in the tree that is an accept. 2) An input is rejected if all branches are rejected, which means that it is a finite tree. 3) An input is not-accepted if there are loop no...
[**Pages 90-91**](https://books.google.co.nz/books?id=drZNEAAAQBAJ&pg=PA90&lpg=PA90&dq=%22determine+an+asymptotic+upper+bound+on+the+recurrence%22&source=bl&ots=pcRh1vj919&sig=ACfU3U0aFGqmoKPINrieY765_wJ0_6ANAw&hl=en&sa=X&ved=2ahUKEwiAqJG7m7j_AhXjmlYBHemvAxEQ6AF6BAgKEAM#v=onepage&q=%22determine%20an%20asymptotic%20uppe...
Substitution method for the upper bound of a recurrence without an explicit base case
|algorithms|algorithm-analysis|recurrence-relation|divide-and-conquer|
$L^\complement$ = the complement of L is it true that if $L\in NP-P$ and $L\leq_p L^\complement \rightarrow P=NP$ basically asking if the following statements are correct $if (L\in NP-P) and (L^\complement \in NP)\rightarrow L\in P\rightarrow P=NP $ or $if (L\in NPC) and (L^\complement \in NP)\ri...
if L is in NP\P and its complement is also in NP does that mean L is in P? (meaning that P=NP)
|complexity-theory|computability|np-complete|np|p-vs-np|
null
{"Voters":[{"Id":149321,"DisplayName":"user51462"}],"DeleteType":1}
I'm not sure I fully understood the above reduction. here is an example: $U$ = {$v_1, v_2, v_3, v_4$} $V$ = {{$v_1$}, {$v_2$}, {$v_3$}, {$v_4$}} $L$ = {$l_1, l_2$} suppose the first two subsets has the label $l_1$ and the last two the label $l_2$. A solution for min label cover would be for instance {$v_1, v_3$} ...
{"Voters":[{"Id":149321,"DisplayName":"user51462"}]}
[**Pages 90-91**](https://books.google.co.nz/books?id=drZNEAAAQBAJ&pg=PA90&lpg=PA90&dq=%22determine+an+asymptotic+upper+bound+on+the+recurrence%22&source=bl&ots=pcRh1vj919&sig=ACfU3U0aFGqmoKPINrieY765_wJ0_6ANAw&hl=en&sa=X&ved=2ahUKEwiAqJG7m7j_AhXjmlYBHemvAxEQ6AF6BAgKEAM#v=onepage&q=%22determine%20an%20asymptotic%20uppe...
[**Pages 90-91**](https://books.google.co.nz/books?id=drZNEAAAQBAJ&pg=PA90&lpg=PA90&dq=%22determine+an+asymptotic+upper+bound+on+the+recurrence%22&source=bl&ots=pcRh1vj919&sig=ACfU3U0aFGqmoKPINrieY765_wJ0_6ANAw&hl=en&sa=X&ved=2ahUKEwiAqJG7m7j_AhXjmlYBHemvAxEQ6AF6BAgKEAM#v=onepage&q=%22determine%20an%20asymptotic%20uppe...
Did you missed the following step? > Given a listing of $L$ ordered by finish times and another listing, $L'$, ordered by start times, then **a merging of these two lists**, as in the merge-sort algorithm (Section 8.1), gives us what we want. Let us use the example in *Figure 12.6: The telescope scheduling problem...
[**Pages 90-91**](https://books.google.co.nz/books?id=drZNEAAAQBAJ&pg=PA90&lpg=PA90&dq=%22determine+an+asymptotic+upper+bound+on+the+recurrence%22&source=bl&ots=pcRh1vj919&sig=ACfU3U0aFGqmoKPINrieY765_wJ0_6ANAw&hl=en&sa=X&ved=2ahUKEwiAqJG7m7j_AhXjmlYBHemvAxEQ6AF6BAgKEAM#v=onepage&q=%22determine%20an%20asymptotic%20uppe...
null
[SMT][1] (satisfiablity-modulo-theories) solvers can provide an (almost-) push-button solution for at least a subset of such problems, especially for those that use machine-arithmetic, IEEE-floats, etc., where efficient decision procedures do exist. There's also good support for arrays and data-types, along with reason...
1. The confusion comes from the fact that the $n_0$ doesn't need to have the same value in both definitions. In the inductive proof, it's mentioned that $n_0$ is taken to be $2$, while the base cases of the recurrence are using $n_0 = 4$ so that $T(2)$ and $T(3)$ are constants. 2. The definition of $f(n) = O(g(n))$...
null
null
null
$L^\complement$ = the complement of L is it true that if $L\in NPComplete $ and $L\leq_p L^\complement \rightarrow P=NP$ basically asking if the following statements are correct $if (L\in NPComplete ) and (L^\complement \in NP)\rightarrow L\in P\rightarrow P=NP $
if L is in NP-Complete and its complement is also in NP does that mean L is in P? (meaning that P=NP)
I'm working on an exercise (not relevant for evaluation) that involves constructing an equivalent nondeterministic stack machine from a given machine with epsilon-transitions. However, I'm having trouble understanding Definition 2, specifically the line [![enter image description here][1]][1] Could someone pleas...
Constructing an equivalent Pushdown Automaton
|automata|pushdown-automata|
$L^\complement$ = the complement of L is it true that if $L\in NPComplete $ and $L\leq_p L^\complement \rightarrow P=NP$ basically asking if the following statements are correct $if (L\in NPComplete ) and (L^\complement \in NP)\rightarrow L\in P\rightarrow P=NP $
null
null
null
null
Even if there were, remember that there is [no free lunch in search and optimization](https://en.m.wikipedia.org/wiki/No_free_lunch_in_search_and_optimization). An optimization algorithm *necessarily* trades proficiency in one class of problems for inefficiency in another class of problems. This is related to why the f...
Here is a plausible heuristic. It has no guarantees of approximation factor, but might be useful in practice given the problem sizes you mentioned. Pick a threshold $\tau$, say $\tau=100$, chosen to balance running time vs quality of approximation. Execute the following algorithm: - Initialize $h$ to an empty has...
*Belated citation add: see [Fischer](https://www.ams.org/journals/tran/1965-117-00/S0002-9947-1965-0175771-6/S0002-9947-1965-0175771-6.pdf) or [Gordon](https://www.sciencedirect.com/science/article/pii/0022000079900370) for more on essentially this line of thought.* ***** As observed above, "locally" the problem ...
Along the lines of rexkogitans's remark that proofs by induction are fertile ground for false proofs: one of my favorites is that every natural number can be uniquely described in fifteen English words or less. Let the set of counterexamples be $S$ and assume, for contradiction, that $S$ is nonempty. Every nonempty ...
null
I have $n$ items $a_1, a_2, a_3 \cdots a_n$ and I want to find the least number of groups, but there is a list of constraints that $a_i$ can't be in the same group as $a_j$. Is this problem NP-Hard or is there a solution which does not Require Brute-Forcing the problem. For Example I have $n=5$ items: $a_1, a_2, a_3...
Grouping Items with constraints
|algorithms|
I have $n$ items $a_1, a_2, a_3 \cdots a_n$ and I want to find the least number of groups, but there is a list of constraints that $a_i$ can't be in the same group as $a_j$. Is this problem NP-Hard or is there a solution which does not Require Brute-Forcing the problem. For Example I have $n=5$ items: $a_1, a_2, a_3...
Spaghetti sort can sort numbers in linear time. Assume without loss of generality that the numbers to be sorted are all in the interval $(0,1)$. A whole spaghetti has length $1$. 1. For each number cut one spaghetti to the corresponding length. This clearly takes $O(n)$. 2. Grab all the spaghetti and hit the w...
I've come back to this as I solved it but forgot to post my reasoning. The statement above simply states that if we execute a statement S on a state s twice, the resulting state should be the same. Hence, we can "determine" the final result unambiguously.
null
This variant of #Positive 2-SAT is defined as follows : for example ,We are given a set of variables : (a,b,c,d,e) The set of all possible positive 2-literal clauses from the given set of variables are : **A = [ ab ,ac ,ad ,ae ]** **B = [ bc ,bd ,be ]** **C = [ cd ,ce ]** **D = [ de ]** this ve...
Complexity of a variant of #Positive-2-SAT
|complexity-theory|
null
Not an optimal answer, just a possible solution, close to brute-force. - list all integers from all $S_k$ and store them in a map; to each integer, associate the list of sets that contain it; sort these lists by set index. For $m$ distinct integers and an average list length $l$, this process will take like $O(m \,l...
This variant of #Positive 2-SAT is defined as follows : for example ,We are given a set of variables : (a,b,c,d,e) The set of all possible positive 2-literal clauses from the given set of variables are : **A = [ ab ,ac ,ad ,ae ]** **B = [ bc ,bd ,be ]** **C = [ cd ,ce ]** **D = [ de ]** this ve...
I wrote the following table for all the closures in those classes. is anything there incorrect? also, would appreciate help with coNP and coRE closures. couldn't find much information about it online. [![enter image description here][1]][1] Edit: updated table: [![enter image description here][2]]...
I know P is closed under all Boolean operations, but what about NP? is NP closed under set difference and symmetric difference? is this table accurate? [![][1]][1] Edit: updated table: [![enter image description here][2]][2] [1]: https://i.stack.imgur.com/k87Uc.png [2]: https://i.stack.imgur.com...
I know that there is no way to prove that P = NP, but how would one go about proving constant time /= P (i.e. O(1) /= POLY(n))? (Or perhaps that any two other complexity classes do not equal each other). If anyone has any papers on this, that would be really helpful :).
How to prove O(1) /= POLY(n)?
|complexity-theory|
Not an optimal answer, just a possible solution, close to brute-force. - list all integers from all $S_k$ and store them in a map; to each integer, associate the list of sets that contain it; sort these lists by set index. For $m$ distinct integers and an average list length $l$, this process will take like $O(m \,l...
As far as I can determine by looking for examples with Google, the answer seems to be: it can be done, but please don't. Regarding context-sensitive rules, Chomsky wrote: *Rules of this kind are quite common in actual grammatical description* (on p. 363 of: [Handbook Of Mathematical Psychology Volume II, Chapter 6][...
Take the problem of determining whether the input, a natural represented as a binary string, is an even natural. This can easily be solved by a TM in $O(N)$: just go to the end of the input and check the last bit. (Note that $N$ here is the length of the input string.) This problem can not be solved in $O(1)$. By...
Take the problem of determining whether the input, a natural represented as a binary string, is an even natural. This can easily be solved by a TM in $O(N)$: just go to the end of the input and check the last bit. (Note that $N$ here is the length of the input string.) This problem can not be solved in $O(1)$. By...
**Input:** code $u$ of a Turing Machine working on a binary alphabet. **Question:** Does $M_u$ accept all words $w \in \{0,1\}^*$. This is of course an undecidable problem. I wonder if the problem is semi-decidable or the complement of the problem is semi-decidable. Initiatively it can't be semi-decidable t...
Semi-decidability of Fullness problem for Turing Machines
|formal-languages|turing-machines|automata|
I'm a little confused by the concept of a "negative" edge weight. All of the examples I have seen represent negative edge weights as negative numbers. Is it possible for an edge weight to carry a negative weight, and be represented as a positive number? As an example, suppose we had a graph of a network where the ...
Can negative edge weights in a graph be positive numbers?
|graphs|graph-traversal|weighted-graphs|theory|
In a graph with 99 vertices, two vertices have a degree of 3, and the degree of the other vertices is 4. Show that the graph contains an odd cycle. I figured I have to show that the graph cannot be divided into two classes meaning there is an odd cycle , but I cannot show how?(
Show that the graph on 99 vertices cannot be divided into two classes
|graphs|discrete-mathematics|
null
I have the following question (prefacing this with the fact that this is a question from an exam, I am currently studying but am stumped so reaching out for help). >The answer to the following question must **NOT** use Strassen's algorithm and every arithmetic operation is considers as $O(1)$.<br> Given two square ...
Matrix Multiplication with a matrix consisting of a single shifted row
|time-complexity|matrices|fast-fourier-transform|
null
null
Helman-JáJá's is a beautiful parallel algorithm, but [the original paper][1] (if I may say so) does not do a particularly great job of communicating some of that beauty to non-experts (this, incidentally, is also my only criticism of JáJá's wonderful [text on parallel algorithms][2]). Technically, it is a prefix comput...
Helman-JáJá =========== Helman-JáJá's is a beautiful parallel algorithm, but [the original paper][1] (if I may say so) does not do a particularly great job of communicating some of that beauty to non-experts (this, incidentally, is also my only criticism of JáJá's wonderful [text on parallel algorithms][2]). Tech...
This variant of #Positive 2-SAT is defined as follows : for example ,We are given a set of variables : (a,b,c,d,e) The set of all possible positive 2-literal clauses from the given set of variables are : 1. **A = [ ab ,ac ,ad ,ae ]** 2. **B = [ bc ,bd ,be ]** 3. **C = [ cd ,ce ]** 4. **D = [ de ]** ...
**#Positive-2SAT** is the problem of counting the number of satisfying assignments to a given Positive 2-CNF formula i.e 2-CNF formulas in which each literal is a positive occurrence of a variable. The following variant of #Positive 2-SAT is defined as follows : for example ,We are given a set of variables : (...
Maybe not exactly what you're looking for, but the Monty Hall problem is famously counterintuitive. There are three doors. One conceals a car, and the other two goats. You select one door. The host opens another door, and it has a goat. By changing your choice to the other closed door, you double your odds of choosi...
When my professor explained how the OS handles memory, he described demand paging, and how when a process starts up, the code page with the first instruction is loaded into memory, and everything else is loaded on-demand. I haven't been able to find more information on this, but I'm curious if the stack would be al...
Page allocation for a program
|operating-systems|memory-management|virtual-memory|process-scheduling|paging|
From my understanding, physical memory (main memory -- DRAM) is addressed differently than disk. This is all a bit of an abstraction to me, and I am hoping to make my understanding more concrete. - Page tables store physical addresses in RAM. They may be marked invalid in the hardware to generate a trap to the OS (p...
Memory (physical addressing) and disks
|data-structures|operating-systems|memory-management|virtual-memory|paging|
Helman-JáJá =========== Helman-JáJá's is a beautiful parallel algorithm, but [the original paper][1] (if I may say so) does not do a particularly great job of communicating some of that beauty to non-experts (this, incidentally, is also my only criticism of JáJá's wonderful [text on parallel algorithms][2]). Tech...
From my understanding, physical memory (main memory -- DRAM) is addressed differently than disk. This is all a bit of an abstraction to me, and I am hoping to make my understanding more concrete. - Page tables store physical addresses in RAM. They may be marked invalid in the hardware to generate a trap to the OS (p...
Memory (physical addressing)
I am wondering how disk addresses are accessed from a program. From my understanding, the two main facilities are programmed I/O (instructions) and memory-mapped I/O (simply loads and stores). The second is usually just loads and stores into a specific part of memory that maps into the device. - Is it common for m...
Disk addressing
|data-structures|operating-systems|memory-management|memory-hardware|
It depends on the operating system, in general. Some don't load the first code page, but let the load-on-demand system handle that! The ABI does determine the state of the user program at the point where its entry is invoked. There may or may not be a user stack set up. In the SysV ABI for x86-64 follow, the user...
User programs generally do not "address" disk directly. Nor is the data from disk mapped into address space. The general way that data is transferred between disk and memory is via DMA. Many disk host controllers also provide a slower way to do it as well using memory-mapped I/O registers or I/O ports, to make thing...
null