instruction
stringlengths
0
29.8k
⌀
|operating-systems|process-scheduling|
First, some context to the question I am asking. There are different queues: *Job Queue:* Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory. *Ready Queue:* The set of all processes that are in main memory and are waiting for CPU ...
There are different queues of processes (in an operating system): *Job Queue:* Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory. *Ready Queue:* The set of all processes that are in main memory and are waiting for CPU time is kept i...
<!-- Figure source: http://pastebin.com/2pNjLM23 --> ### A note on methodology I thought a bit about this problem, and came to a solution. When I read [Saeed Amiri's answer](http://cs.stackexchange.com/questions/1071/is-there-an-algorithm-which-finds-sorted-subsequences-of-size-three-in-on-time/1073#1073), I real...
null
I am trying to implement bidirectional search in a graph. I am using two breadth first searches from the start node and the goal node. The states that have been checked are stored in two hash tables(closed lists). How can I get the solution(path from the start to the goal), when I find that a state that is checked by ...
How to reconstruct the solution in bidirectional search
|searching|
Imagine a different problem: if you had to place $k$ sticks of equal heights in $n$ slots then the expected distance between sticks (and the expected distance between the first stick and a notional slot $0$, and the expected distance between the last stick and a notional slot $n+1$) is $\frac{n+1}{k+1}$ since there are...
I found an appropriate answer. I was asking about the job queue (which I already described). The diagram included in this answer comes from a [ power-point][4] that uses concise language to explain processes and schedulers and relates the topic to the diagram. It may be of intrest to other users, also learning this...
There are different queues of processes (in an operating system): *Job Queue:* Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory. *Ready Queue:* The set of all processes that are in main memory and are waiting for CPU time is kept i...
$E[V]$ is roughly half the expected number of comparisons performed by randomized quicksort. **Assuming the sticks have distinct heights**, we can derive a closed-form solution for $E[Y]$ as follows. For any indices $i\le j$, let $X_{ij} = 1$ if $Y_j = \max\{Y_i,...,Y_j\}$ and $X_{ij}=0$ otherwise. (If the eleme...
|algorithms|searching|
I am trying to implement bidirectional search in a graph. I am using two breadth first searches from the start node and the goal node. The states that have been checked are stored in two hash tables (closed lists). How can I get the solution (path from the start to the goal), when I find that a state that is checked b...
|algorithms|graphs|shortest-path|
How to construct the found path in bidirectional search
Let us get a feeling for $\operatorname{Before}(\beta)$ and $\operatorname{After}(\beta)$ first. Consider a derivation tree which contains $\beta$; "contains" here means that you can cut away subtrees so that $\beta$ is a subword of the tree's front. Then, the before (after) set are all potential fronts of the tree's p...
[Bob Warfield][1] wrote a blog post ([A Picture of the MultiCore Crisis)][2] that has the [kind of graph][3] you're looking for. **Update** It [sounds like][4] the Stanford [CPU DB][5] has what you're looking for, though it seems to be down at the moment. [1]: http://www.smoothspan.com/management.html [...
The constructive equivalence of linear-time fixed point formulae (the logic is called $\nu$TL by some) and Buechi automata is given in a paper by Mads Dam from 1992. > [Fixed Points of Buchi Automata][1], FST&TCS 1992. See page 4 for the construction of a $\nu$TL formula from a Buechi automaton. The construction ...
I'm currently reading about machine learning and wondered how to apply it to playing [Connect Four][1]. In my opinion, the input features have to be the state (disc of player 1, disc of player 2, empty) of the 7x6=42 grid fields. The output would be the number of the row to put the disc into. Because that is a d...
Machine learning algorithm to play Connect Four
|machine-learning|
I'm currently reading about machine learning and wondered how to apply it to playing [Connect Four][1]. My current attempt is a simple multiclass classificator using a sigmoid function model and the one-vs-all method. In my opinion, the input features have to be the state (disc of player 1, disc of player 2, empt...
Let us get a feeling for $\operatorname{Before}(\beta)$ and $\operatorname{After}(\beta)$ first. Consider a derivation tree which contains $\beta$; "contains" here means that you can cut away subtrees so that $\beta$ is a subword of the tree's front. Then, the before (after) set are all potential fronts of the tree's p...
There are different queues of processes (in an operating system): *Job Queue:* Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory. *Ready Queue:* The set of all processes that are in main memory and are waiting for CPU time is kept i...
I am trying to implement bidirectional search in a graph. I am using two breadth first searches from the start node and the goal node. The states that have been checked are stored in two hash tables (closed lists). How can I get the solution (path from the start to the goal), when I find that a state that is checked b...
|machine-learning|board-games|
Two things: (this may be naive) 1) Does anyone believe there is a sub-exponential time algorithm for subset-sum? It seems obvious to me that you would have to look through all possible subsets to prove the negation of an existential statement. 2) If subset-sum can be polynomial time reduced to 3SAT and we agr...
subset-sum and 3SAT
|time-complexity|reductions|p-vs-np|
> Does anyone believe there is a sub-exponential time algorithm for subset-sum? I'm sure there's someone somewhere who believes it, but the vast majority of computer scientists believe that there is no such algorithm. However no one has proved this yet. > It seems obvious to me that you would have to look through...
Two things: (this may be naive) 1) Does anyone believe there is a sub-exponential time algorithm for subset-sum? It seems obvious to me that you would have to look through all possible subsets to prove (the negation of) an existential statement. It seems obvious in the same way that if somebody asked you "Is x in...
|time-complexity|np-complete|reductions|p-vs-np|
Two things (this may be naive): 1. Does anyone believe there is a sub-exponential time algorithm for the [Subset-sum problem](http://en.wikipedia.org/wiki/Subset_sum_problem)? It seems obvious to me that you would have to look through all possible subsets to prove (the negation of) an existential statement. It seem...
Subset-sum and 3SAT
null
null
There *is* an algorithm for subset-sum that runs faster than $O(2^n)$! That is, it is faster than examining all possible subsets. This proves that your intuition is wrong. [Wikipedia has a nice writeup of this algorithm.][1] > If Subset-sum can be polynomial time reduced to [3SAT](http://en.wikipedia.org/wiki/K-SAT#...
|time-complexity|np-complete|reductions|
I am confused about how taps are chosen for Linear Feedback Shift Registers. I have a diagram which shows a LFSR with connection polynomial: C(X) = X^5 + X^2 + 1. The five stages are labelled: R4 R3 R2 R1 R0 and the taps come out of R0 and R3. How are these taps decided? When I am given a connection polynomial bu...
Choosing taps for Linear Feedback Shift Register
|cryptography|computer-security|
I am confused about how taps are chosen for Linear Feedback Shift Registers. I have a diagram which shows a LFSR with connection polynomial $C(X) = X^5 + X^2 + 1$. The five stages are labelled: $R4, R3, R2, R1$ and $R0$ and the taps come out of $R0$ and $R3$. How are these taps decided? When I am given a connecti...
Let us get a feeling for $\operatorname{Before}(\beta)$ and $\operatorname{After}(\beta)$ first. Consider a derivation tree which contains $\beta$; "contains" here means that you can cut away subtrees so that $\beta$ is a subword of the tree's front. Then, the before (after) set are all potential fronts of the tree's p...
So here is one of my adventurous attempts on SE research having a majors on CS. I was interested on evaluating a catalogue that students would be using to observe how is it being used probabilisticly. The catalogue works by choosing cells in a temporal sequence, so for example: Student A have: (t1,Cell3),(t2,...
Is it viable to use an HMM to evaluate how well a catalog is being used?
|empirical-research|
|empirical-research|hidden-markov-models|
So here is one of my adventurous attempts on SE research having a majors on CS. I was interested on evaluating a catalogue that students would be using to observe how is it being used probabilisticly. The catalogue works by choosing cells in a temporal sequence, so for example: - Student A have: ($t_1$,$Ce...
I am confused about how taps are chosen for Linear Feedback Shift Registers. I have a diagram which shows a LFSR with connection polynomial $C(X) = X^5 + X^2 + 1$. The five stages are labelled: $R4, R3, R2, R1$ and $R0$ and the taps come out of $R0$ and $R3$. How are these taps decided? When I am given a connecti...
The taps are decided by the polynomial in a straightforward way: for $x^n$, you connect the $n$th tap. Note that in your diagram the *first* tap is $R_4$, the 2nd is $R_3$ etc.. Since your polynomial is $X^5+X^2+1$ the feedback is an XOR of the output of the 2nd tap ($R_3$) and the 5th tap ($R_0$). The "$+1$" of th...
|cryptography|pseudo-random-generators|shift-register|
|cryptography|pseudo-random-generators|
The taps are decided by the polynomial in a straightforward way: for $x^n$, you connect the $n$th tap. Note that in your diagram the *first* tap is $R4$, the 2nd is $R3$ etc.. Since your polynomial is $X^5+X^2+1$ the feedback is an XOR of the output of the 2nd tap ($R3$) and the 5th tap ($R0$). The "$+1$" of the po...
I once had a veteran in my course that created an algorithm that she would first ask the cooking algorithm and all sort of crazy recipes would come out. Then, she would train the cooking algorithm and eventually he would suggest very good cooking recipes after being treined with real recipes. I believe she used som...
What theory underlies an algorithm that suggests cooking recipes?
|artificial-intelligence|
The taps are decided by the polynomial in a straightforward way: for $X^n$, you connect the $n$th tap. Note that in your diagram the *first* tap is $R4$, the 2nd is $R3$ etc.. Since your polynomial is $X^5+X^2+1$ the feedback is an XOR of the output of the 2nd tap ($R3$) and the 5th tap ($R0$). The "$+1$" of the po...
null
Expanding on the answer of @Aryabhata: Fix an $i$, and assume the item $y_i$ is at position $j$. The exact value of the height is immaterial, what matters is whether the items are greater than or equal to $y_i$ or not. Therefore consider the set of items $Z^{(i)}$, where $z_k^{(i)}$ is 1 if $y_k\geq y_i$, and $z_k^...
null
It is a bit strange that you are talking about reducing SUBSET-SUM to 3SAT to conclude $P \neq NP$ from the hypothesis of non-existence of a sub-exponential algorithm for SUBSET-SUM. The fact that SUBSET-SUM is in $NP$, coupled with the hypothesis that it has no polynomial time algorithms is enough to show that $P \...
I don't have enough rep points to comment. So, I am posting an answer. Edit: My earlier post(below) contains some remarks which might lead the OP to think that I am against the usage of Stats in software engineering. If so, I'd like to make myself clear. I am not against Stats. Stats analysis can tell you X *m...
|complexity-theory|time-complexity|np-complete|reductions|
I once had a veteran in my course that created an algorithm that would suggest cooking recipes. At first, all sort of crazy recipes would come out. Then, she would train the cooking algorithm with real recipes and eventually it would suggest very good ones. I believe she used something related to Bayes Theorem or C...
How to devise an algorithm that suggests feasible cooking recipes?
|machine-learning|artificial-intelligence|recommendation-systems|
null
**Ad Question 1:** Assuming that your assumptions on how the catalogue is used -- that is the choice of the next cell only depends on the current (or constantly many preceeding) cell(s), *not* the (full) history -- then yes, you can use a Markov Chain to model it. However, you do not seem to need the "Hidden" part; ...
So here is one of my adventurous attempts on Software Engineering research with major in CS. I was interested on evaluating a catalogue that students would be using to observe how is it being used probabilistically. The catalogue works by choosing cells in a temporal sequence, so for example: - Student A h...
Is it viable to use an HMM to evaluate how well a catalogue is used?
|probability-theory|empirical-research|hidden-markov-models|
It is a bit strange that you are talking about reducing SUBSET-SUM to 3SAT to conclude $P \neq NP$ from the hypothesis of non-existence of a sub-exponential algorithm for SUBSET-SUM. The fact that SUBSET-SUM is in $NP$, coupled with the hypothesis that it has no polynomial time algorithms is enough to show that $P \...
I was interested on evaluating a catalogue that students would be using to observe how is it being used probabilistically. The catalogue works by choosing cells in a temporal sequence, so for example: - Student A has: ($t_1$,$Cell_3$),($t_2$,$Cell_4$) - Student B has: $(t_1,Cell_5),(t_2,Cell_3),(t_3,Cell_...
It is a bit strange that you are talking about reducing SUBSET-SUM to 3SAT to conclude $P \neq NP$ from the hypothesis of non-existence of a sub-exponential algorithm for SUBSET-SUM. The fact that SUBSET-SUM is in $NP$, coupled with the hypothesis that it has no polynomial time algorithms is enough to show that $P \...
null
On Alpha-Beta pruning, NegaScout claim that it can accelerate the process by set [Alpha,Beta] to [Alpha,Alpha-1]. I'm not understand the whole process of NegaScout. How it works? What's its recovery mechanism when its guessing failed? Thank you~
How does NegaScout algorithm works?
|algorithms|data-structures|
It is a bit strange that you are talking about reducing SUBSET-SUM to 3SAT to conclude $P \neq NP$ from the hypothesis of non-existence of a sub-exponential algorithm for SUBSET-SUM. The fact that SUBSET-SUM is in $NP$, coupled with the hypothesis that it has no polynomial time algorithms is enough to show that $P \...
On Alpha-Beta pruning, NegaScout claims that it can accelerate the process by setting [Alpha,Beta] to [Alpha,Alpha-1]. I do not understand the whole process of NegaScout. How does it work? What is its recovery mechanism when its guessing failed?
It is a bit strange that you are talking about reducing SUBSET-SUM to 3SAT to conclude $P \neq NP$ from the hypothesis of non-existence of a sub-exponential algorithm for SUBSET-SUM. The fact that SUBSET-SUM is in $NP$, coupled with the hypothesis that it has no polynomial time algorithms is enough to show that $P \...
|algorithms|algorithm-analysis|searching|
|algorithms|graphs|search-algorithms|
|algorithms|algorithm-analysis|search-algorithms|
null
I'm pretty sure this question hasn't been answered here, or even asked, so I think I should ask it. In computer science, what is the difference between "decision" and "verification"?
In Computer Science What is the Difference between the terms "Decision" and "Verification"?
|complexity-theory|computability|undecidability|decision-problem|
For every computable function $f$ does there exist a problem that can be solved at best in $\Theta(f(n))$ time or is there a computable function $f$ such that every problem that can be solved in $O(f(n))$ can also be solved in $o(f(n))$ time? This question popped into my head yesterday. I've been thinking about it f...
For every computable function $f$ does there exist a problem that can be solved at best in $\Theta(f(n))$ time?
|complexity-theory|
I'm currently reading about machine learning and wondered how to apply it to playing [Connect Four][1]. My current attempt is a simple multiclass classificator using a sigmoid function model and the one-vs-all method. In my opinion, the input features have to be the state (disc of player 1, disc of player 2, empt...
For every computable function $f$ does there exist a problem that can be solved at best in $\Theta(f(n))$ time or is there a computable function $f$ such that every problem that can be solved in $O(f(n))$ can also be solved in $o(f(n))$ time? This question popped into my head yesterday. I've been thinking about it f...
In Michael Sipser's *Theory of Computation* on page 270 he writes: >P = the class of languages for which membership can be decided quickly. NP = the class of languages for which membership can be verified quickly. What is the difference between "decided" and "verified"?
What is the difference between "Decision" and "Verification" in complexity theory?
|complexity-theory|decision-problem|
For every computable function $f$ does there exist a problem that can be solved at best in $\Theta(f(n))$ time or is there a computable function $f$ such that every problem that can be solved in $O(f(n))$ can also be solved in $o(f(n))$ time? This question popped into my head yesterday. I've been thinking about it f...
>For every computable function $f$ does there exist a problem that can be solved at best in $\Theta(f(n))$ time or is there a computable function $f$ such that every problem that can be solved in $O(f(n))$ can also be solved in $o(f(n))$ time? If $f$ is [a time-constructible function](https://en.wikipedia.org/wiki/C...
I will try to provide something of a framework in the hopes it grants deeper insight. When you get to something this fundamental there are unexpected pitfalls everywhere. For example: what is it to "solve" a problem? Often in computer science we consider only the "decision" variant, in which we are given an input an...