instruction
stringlengths
0
29.8k
⌀
Can anyone explain Nilsson's sequence score in 8-puzzle more clearly?
|algorithms|graph-theory|data-structures|heuristics|
|algorithms|data-structures|graph-theory|machine-learning|heuristics|
How to prove that $NP^C \neq coNP^C$ ? I am just looking for a such oracle TM $M$ and a recursive language $L(M) = L$ for which this holds. I know the proof where you show that there is an oracle $A$ such that $P^A \neq NP^A$ and an oracle $B$ such that $P^B = NP^B$. I have a hint that I should find such oracle C by ex...
$NP^C \neq coNP^C$. How to find $C$?
|complexity-theory|relativization|
A partial answer to your question is the group-theoretic approach first developed by [Cohn and Umans][1] and further developed by Cohn, Kleinberg, Szegedy and Umans. It can "sort of" capture Strassen and Coppersmith-Winograd for matrix multiplication. [1]: http://arxiv.org/abs/math/0307321
null
Grammars seem to be used for different purposes. In formal languages, they are used to describe sequences of symbols. In programming language theory, they are used to describe objects in a term algebra (possibly enriched with some implicit, extra structure such as variable scoping rules). My question is, are these t...
Grammar in formal languages versus programming language theory
|formal-languages|programming-languages|
Programming language theory usually does not care about parsing: it does not address this problem. So when you have this grammar in programming language theory: e ::= 1 | e e it does mean the same thing as in formal language theory but programming language theory really only talks about the generated [syntax ...
On top of jmad's [answer][1] I'll add that when talking about programming languages one usually distinguishes between _concrete syntax_ and _abstract syntax_. Concrete syntax is the one the programmer uses and when dealing with it one generally wants an unambiguous grammar, so often spurious elements such as semi-c...
I've decided to read [Operating Systems Concepts][1] by Silberschatz, Galvin Gagne (8th edition) over the summer. I've gotten to a topic that's confusing me - interrupts and their role as it relates to operating systems. The text says that an operating system will begin a first process such as "init" and then wait ...
What is meant by interrupts in the context of operating systems?
null
The operating system is driven by interrupts. This means that: If there are no processes to execute, no I/O devices to service, and no users to whom to respond, an operating system will sit quietly, waiting for something to happen. Events are almost always signaled by the occurrence of an interrupt or a trap, a trap...
null
I am learning the [A* search algorithm][1] on a 8-puzzle problem. I don't have questions about A*, but I have some for the heuristic score - Nilsson's sequence score. [Justin Heyes-Jones web pages - A* Algorithm][2] explains A* very clearly. It has a picture for Nilsson's sequence scores. ![Nilsson's sequence...
More clear explanation of Nilsson's sequence score in 8-puzzle problem
null
I am learning the [A* search algorithm][1] on an 8-puzzle problem. I don't have questions about A*, but I have some for the heuristic score - Nilsson's sequence score. [Justin Heyes-Jones web pages - A* Algorithm][2] explains A* very clearly. It has a picture for Nilsson's sequence scores. ![Nilsson's sequenc...
More clear explanation of Nilsson's sequence score in an 8-puzzle problem
null
Nilsson's sequence score for 8-puzzle problem in A* algorithm
|algorithms|machine-learning|search-algorithms|heuristics|
Hope this help: Current pos: Goal: *AC ABC HBD H*D GFE GFE How to calculate the score: *Center* B in the center -> +1 *Distances (manhattan distance)* A must move LEFT -> +1 B must move UP -> +1 *Successors (clockwise)* ...
Hope this help: Current pos: Goal: *AC ABC HBD H*D GFE GFE How to calculate the score: *Center* B in the center -> 1 *Distances (manhattan distance)* A must move LEFT -> 1 B must move UP -> 1 *Successors (clockwise)* cu...
null
The internet is growing rapidly. There are probably some data flying around on this, but how can you accurately get them if you are not Google? Is there any way to estimate how much data is added to the Internet each second? Are there any studies about this?
How to measure the growth rate of the internet?
|computer-networks|empirical-research|
Is there any way to estimate how much data is added to the Internet each second? Are there any studies about this?
What is the growth rate of the Internet?
|computer-networks|
The modification is not difficult. I will explain the required modification below, but first let's have a brief view at the original proof. In the original proof $A=\bigcup_n A_n$ is built in steps where at step $i$ with make sure that $i$th machine in $\mathsf{P}$, $M_i$, doesn't decide the language $\{x \mid \exis...
As Max said the modification is not difficult, I suggest that you do not read the rest of this answer and think about the problem a little bit more, there is only one part that need modification and remembering the definition of when a $\mathsf{coNP}$ machine rejects will help fix that part. I will explain the required...
How to prove that $\mathsf{NP}^A \neq \mathsf{coNP}^A$ ? I am just looking for a such oracle TM $M$ and a recursive language $L(M) = L$ for which this holds. I know the proof where you show that there is an oracle $A$ such that $\mathsf{P}^A \neq \mathsf{NP}^A$ and an oracle $A$ such that $\mathsf{P}^A = \mathsf{NP...
An oracle to separate NP from coNP
As Max said the modification is not difficult, I suggest that you do not read the rest of this answer and think about the problem a little bit more, there is only one part that needs modification and remembering the definition of when a $\mathsf{coNP}$ machine accepts will help you fix that part. I will explain the...
|complexity-theory|np-complete|reductions|linear-programming|
|complexity-theory|np-complete|graphs|spanning-trees|
As Max said the modification is not difficult, I suggest that you do not read the rest of this answer and think about the problem a little bit more, there is only one part that needs modification and remembering the definition of when a $\mathsf{coNP}$ machine accepts will help you fix that part. I will explain the...
Seems this question has been bumped by the system because it has no answer yet: The idea JeffE proposed is to reduce the Hamiltonian Path problem (a known NP-complete problem) to this version of the spanning tree problem. This is not hard to do: given a graph and two nodes we want to find an HPath between, we can...
Combinatorics plays an important role in computer science. We frequently utilize combinatorial methods in both analysis as well as design in algorithms. For example one method for finding a $k$-vertex cover set in a graph might just inspect all $\binom{n}{k}$ possible subsets. While the binomial functions grows exponen...
Recurrences and Generating Functions in Algorithms
|algorithms|algorithm-analysis|combinatorics|
null
To fine the median of an unsorted array, we can make a min-heap in O(nlogn) time for n elements, and then we can extract one by one n/2 elements to get the median. But this approach would take O(nlogn) time. Can we do the same by some method in O(n) time?If we can, then please tell
To Find the median of an unsorted array
|algorithms|homework|time-complexity|
To fine the median of an unsorted array, we can make a min-heap in $O(n\log n)$ time for $n$ elements, and then we can extract one by one $n/2$ elements to get the median. But this approach would take $O(n \log n)$ time. Can we do the same by some method in $O(n)$ time? If we can, then please tell.
|algorithms|time-complexity|
Given the following tree: ![tree][1] Which traversal method would give as result the following output: CDBEA? The answer in the book is *Postorder*, but I think postorder would output: DEBCA. Am i wrong? [1]: https://i.stack.imgur.com/GbJzO.png
Tree traversal doubt
|graph-theory|
|algorithms|graph-theory|
You are not wrong. A _postorder_ traversal visits the left subtree, then the right subtree, then the root of the current tree (recursively).
Given the following tree: ![tree][1] Which traversal method would give as result the following output: CDBEA? The answer in my study guide is *Postorder*, but I think postorder would output: DEBCA. Am I wrong? [1]: https://i.stack.imgur.com/GbJzO.png
Combinatorics plays an important role in computer science. We frequently utilize combinatorial methods in both analysis as well as design in algorithms. For example one method for finding a $k$-vertex cover set in a graph might just inspect all $\binom{n}{k}$ possible subsets. While the binomial functions grows exponen...
null
So I'm reading *"Introduction to Machine Learning"* 2nd edition, by Bishop, et. all. On page 27 they discuss the Vapnik-Chervonenkis Dimension which is, > *"The maximum number of points that can be shattered by H [the hypothesis class] is called the Vapnik-Chervonenkis (VC) Dimension of H, is denoted VC(H) and meas...
Question on the Vapnik-Chervonenkis Dimension
|machine-learning|vc-dimension|
Given the following tree: ![tree][1] Which traversal method would give as result the following output: CDBEA? The answer in my study guide is *Postorder*, but I think postorder would output: DEBCA. Am I wrong? [1]: https://i.stack.imgur.com/GbJzO.png
See if this explanation can help you: Current pos: Goal: *AC ABC HBD H*D GFE GFE How to calculate the score: *Center* B in the center -> 1 *Distances (manhattan distance)* A must move LEFT -> 1 B must move UP -> 1 sum of dis...
Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is fixed, I want to answer in $O(1)$ queries of the form: "how many times $m$ appears in the array between indices $i$ and $j$? The array should be preprocessed in linear time. In particular I'd like to know if there's a reduction to Range Minimu...
Problem similar to RMQ
|algorithms|arrays|algorithm-design|
Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is a constant, I want to answer in $O(1)$ queries of the form: "how many times $m$ appears in the array between indices $i$ and $j$? The array should be preprocessed in linear time. In particular I'd like to know if there's a reduction to Range M...
null
Is there any way to estimate how much data is added to the world wide web each second? Are there any studies about this?
What is the growth rate of the world wide web?
null
Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is a constant, I want to answer in $O(1)$ queries of the form: "how many times $m$ appears in the array between indices $i$ and $j$? The array should be preprocessed in linear time. In particular I'd like to know if there's a reduction to Range M...
Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is a constant, I want to answer in $O(1)$ queries of the form: "how many times $m$ appears in the array between indices $i$ and $j$? The array should be preprocessed in linear time. In particular I'd like to know if there's a reduction to Range M...
null
In terms of references and their implementation on the heap and the stack how equality testing for arrays is different from that for integers?
Heap and Stack and equality testing
|stack|
null
Vapnik-Chervonenkis Dimension: why cannot four points on a line be shattered by rectangles?
What is postorder traversal on this simple tree?
|algorithms|trees|
Preprocess an array for counting an element in a slice (reduction to RMQ?)
In terms of references and their implementation on the heap and the stack, how is equality testing for arrays different from that for integers?
Equality testing of arrays and integers
|programming-languages|semantics|program-execution|
Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is a constant, I want to answer in $O(1)$ queries of the form: "how many times does $m$ appear in the array between indices $i$ and $j$"? The array should be preprocessed in linear time. In particular I'd like to know if there's a reduction to Ra...
null
How do i build a random source that outputs the bits 0 and 1 with $prob(0) = prob(1) = 0.5$. We have access to another random source $S$ that outputs $a$ or $b$ with independent probabilities $prob(a)$ and $prob(b) = 1 - prob(a)$ that are unknown to us. How do i state an algorithm that does the job and that does not...
Making random sources uniformly distributed
|algorithms|probability-theory|randomized-algorithms|probabilistic-algorithms|randomness|
{"Voters":[{"Id":39,"DisplayName":"Gilles"}]}
Two processors $A, B$ with inputs $a \in \{0, 1\}^n$ (for $A$) and $b \in \{0, 1\}^n$ (for $B$) want to decide whether $a = b$. $A$ does not know $B$’s input and vice versa. A can send a message $m(a) \in \{0, 1\}^n$ which $B$ can use to decide $a = b$. The communication and computation rules are called a *proto...
Fingerprinting Algorithm
|algorithms|probability-theory|probabilistic-algorithms|