instruction stringlengths 0 29.8k ⌀ |
|---|
Questions about problems that arise when you connect multiple computers to form a network. |
Questions about the challenges of solving problems with multiple cooperating but separate agents. |
Questions about design and properties of agents that act in a dynamic environment and make decisions towards some goal without user control. |
Questions about regular expressions, a formalism to describe regular languages.
Note that regular expressions in a computer science context are not the same as [POSIX RegExp](https://en.wikipedia.org/wiki/Regexp#POSIX) or similar. A regular expression in the formal language sense $R$ can be one of
* the empty la... |
Questions about regular expressions, a formalism to describe regular languages. |
Questions about algorithms that solve problems up to some bounded error. |
Questions about algorithmic strategies that quickly solve a problem well most of the time, but give no guarantees. |
From the comment above:
Before processing the stream, allocate $\lceil \log_2 n \rceil$ bits, in which you write $x:= \bigoplus_{i=1}^n \mathrm{bin}(i)$ ($\mathrm{bin}(i)$ is the binary representation of $i$ and $\oplus$ is pointwise exclusive-or). Naively, this takes $\mathcal{O}(n)$ time.
Upon processing the s... |
null |
null |
|algorithms|satisfiability|heuristics|3-sat|sat-solvers| |
|reference-request|runtime-analysis|mathematical-analysis|computer-algebra|mathematical-software| |
Viruses and antivirus technology have a lot to do with CS. Your question reminded me of something I recently read. Here's an excerpt from the book by Williamson & Shmoys, The Design of Approximation Algorithms, page 6. It's justifying the (practical) importance of approximation algorithms, and uses the well-known [set ... |
Regular languages are closed under intersection. This often allows to cut away all parts of a language that are not needed to show non-regularity. Complementation serves a similar purpose: if the original language is "complicated", the complement may be simpler so work with (in terms of other closure properties).
Hi... |
null |
I'd like to understand the Baum-Welch algorithm. I liked this video on the Forward Backward algorithm: http://www.youtube.com/watch?v=7zDARfKVm7s&feature=related
I'm having trouble coming up with good resources for Baum-Welch. Any ideas?
Thanks |
Any *very* user friendly (preferably video) resources on the Baum-Welch algorithm? |
|algorithms|hidden-markov-models| |
I'd like to understand the [Baum-Welch algorithm](https://en.wikipedia.org/wiki/Baum%E2%80%93Welch_algorithm). I liked [this video](http://www.youtube.com/watch?v=7zDARfKVm7s&feature=related) on the Forward-Backward algorithm so I'd like a similar one for Baum-Welch.
I'm having trouble coming up with good resources ... |
Any very user friendly resources on the Baum-Welch algorithm? |
|algorithms|reference-request|hidden-markov-models| |
null |
You should be careful when using theoretical result to argue something cannot be done in practice. There are several dangers that one can fall in:
1. the theoretical result has assumptions that doesn't apply,
2. the problem in practice is not modeled well by the theoretical model,
3. in practice a solution ... |
You should be careful when using theoretical result to argue something cannot be done in practice. There are several dangers that one can fall in:
1. the theoretical result has assumptions that doesn't apply,
2. the problem in practice is not modeled well by the theoretical model,
3. in practice a solution ... |
null |
I need to prove that NP is a subset of the union of DTIME(2^n^c) for all c > 1.
Let L be a language/decision problem in NP. Then L can be decided given a polynomial-size certificate in polynomial time with a turing machine M. So then we enumerate all possible certificates of polynomial size. There are 2^l possible c... |
Proving NP is a subset of the union of exponential DTIME |
|complexity-theory|check-my-proof| |
I have two ways of producing a list of items in a random order and would like to determine if they are equally fair (unbiased).
The first method I use is to construct the entire list of elements and then do a shuffle on it (say a Fisher-Yates shuffle). The second method is more of an iterative method which keeps the... |
Two methods to produce a random order, are they equivalent |
|algorithms|proof-techniques| |
A [simple web search](https://duckduckgo.com/html/?q=baum-welch+algorithm+video) leads to a whole [lecture](http://vimeo.com/7343520) by [Christopher Lee](http://thinking.bioinformatics.ucla.edu/). I did not watch it entirely, but it seems to be a slow, thorough take on the algorithm with an example walk-through on pap... |
I need to prove that $\mathsf{NP}$ is a subset of the union of $\mathsf{DTIME}(2^{n^c})$ for all $c > 1$.
Let $L$ be a language/decision problem in $\mathsf{NP}$. Then $L$ can be decided given a polynomial-size certificate in polynomial time with a turing machine $M$. So then we enumerate all possible certificates o... |
The following is a doubt that I came across while doing a OS home assignment - however, it seems more concept-based than a straightforward coding question, so IMHO I don't think the homework tag is appropriate for this.
In a pure demand paging scheme for multiple processes running at the same time, given a fixed amo... |
Swap space management during pure demand paging |
|memory-management|paging| |
I started reading more and more language research papers. I find it very interesting and a good way to learn more about programming in general. However, there usually comes a section ** where I always struggle with since I lack the theoretical background in computer science: Type Rules.
Are there any good books or o... |
How to read typing rules? |
|type-theory| |
You need an inductive argument similar to the one used [here](http://cs.stackexchange.com/questions/1923/online-generation-of-uniform-samples/1931#1931):
* For the singleton list there is only one possibility, so it is uniformly chosen.
* Assuming that the list with $n$ elements was uniformly chosen (from all per... |
The following problem looks NP-hard to me, but I couldn't show it. Any proof/comment to show the hardness or easiness of it is appreciated.
> Assume $K_n=\langle V,E \rangle$ is a complete weighted directed graph
> with $n$ nodes and $n(n-1)$ edges. Let $w_{ij} \ge 0$ show the weight
> of edge the $ij$ and $c(ij)$... |
NP-Completeness of a Graph Coloring Problem |
|complexity-theory|graphs|np-complete| |
In that Wikipedia page it is recommended "[Type Systems, Luca Cardelli, ACM Computing Surveys][1]", which is a 2-pages survey that can help you to understand how to read a rule. Anyway, how to read a rule is perfectly explained in that Wikipedia page (or even better in the 2-pages survey). However to understand the who... |
You need an inductive argument similar to the one used [here](http://cs.stackexchange.com/questions/1923/online-generation-of-uniform-samples/1931#1931):
* For the singleton list there is only one possibility, so it is uniformly chosen.
* Assuming that the list with $n$ elements was uniformly chosen (from all per... |
|algorithms|proof-techniques|probability-theory|randomized-algorithms|randomness| |
I started reading more and more language research papers. I find it very interesting and a good way to learn more about programming in general. However, there usually comes a section where I always struggle with (take for instance part three of [this](http://math.andrej.com/wp-content/uploads/2012/03/eff.pdf)) since I ... |
|reference-request|terminology|type-theory| |
|operating-systems|memory-allocation|virtual-memory|paging|memory-management| |
In most type systems, the type rules work together to define judgements of the form:
$$\Gamma\vdash e:\tau$$
This states that in context $\Gamma$ the expression $e$ has type $\tau$.
$\Gamma$ is a mapping of the free variables of $e$ to their types.
A type system will consist of a set of axioms and rules (... |
In most type systems, the type rules work together to define judgements of the form:
$$\Gamma\vdash e:\tau$$
This states that in context $\Gamma$ the expression $e$ has type $\tau$.
$\Gamma$ is a mapping of the free variables of $e$ to their types.
A type system will consist of a set of axioms and rules (... |
To provide a full length answer: You are on the right track. To finish the proof you need to show that $DTIME(2^{n^k} n^k) \subseteq DTIME(2^{n^c})$ for some $c$. |
The following problem looks NP-hard to me, but I couldn't show it. Any proof/comment to show the hardness or easiness of it is appreciated.
> Assume $K_n=\langle V,E \rangle$ is a complete weighted directed graph
> with $n$ nodes and $n(n-1)$ edges. Let $w_{ij} \ge 0$ show the weight
> of the edge $ij$ and $c(ij)$... |
null |
Along the lines Mohsen suggested, start with Edge Coloring, convert the graph $G=(V,E)$ to a digraph $D=(V,A)$ on the same vertex set where $\forall uv\in E$ we have $(u,v)$ and $(v,u)$ in $A$, give all arcs $a \in A$ (at this point) weight $w_{a} = 1$, then $\forall xy \notin E$ add $(x,y)$ and $(y,x)$ to $A$ with $w_... |
There is cute interactive online tutorial on sequent calculus, which may help to build some intuitions and to feel how inference works:
[An Interactive Tutorial of the Sequent Calculus][1]
[1]: http://logitext.ezyang.scripts.mit.edu/logitext.fcgi/tutorial |
**EDIT**: The construction below doesn't quite work, as per Tsuyoshi Ito's comment below, it doesn't enforce that $c(ij)=c(ji)$. I leave it up in case it's a useful start though. Also, $T$ shouldn't include arcs with weight $0$.
Along the lines Mohsen suggested, start with Edge Coloring, convert the graph $G=(V,E)$ ... |
You are on the right track. To finish the proof you need to show that $DTIME(2^{n^k} n^k) \subseteq DTIME(2^{n^c})$ for some $c$. |
You are on the right track. To finish the proof you need to show that
$\qquad \displaystyle \mathsf{DTIME}(2^{n^k} n^k) \subseteq \mathsf{DTIME}(2^{n^c})$
for some constant $c$. |
|logic|reference-request|terminology|type-theory| |
null |
In most type systems, the type rules work together to define judgements of the form:
$$\Gamma\vdash e:\tau$$
This states that in context $\Gamma$ the expression $e$ has type $\tau$.
$\Gamma$ is a mapping of the free variables of $e$ to their types.
A type system will consist of a set of axioms and rules (... |
null |
i have the following regular grammar :
$S$ -> $aS$ | $cS$ | $bQ_1$ \\
$Q_1$ -> $bQ_2$ \\
$Q_2$ -> $aQ_3$ | $cQ_3$ | $bQ_1$ \\
$Q_3$ -> $aQ_4$ | $cQ_4$ \\
$Q_4$ -> $\varepsilon$
The question is to transform that into linear grammar and less nonterminals than the regular grammar and my idea was:
$S$ -> $aSa$ | $... |
Transform in linear grammar |
|formal-grammars| |
The following problem looks NP-hard to me, but I couldn't show it. Any proof/comment to show the hardness or easiness of it is appreciated.
> Assume $K_n=\langle V,E \rangle$ is a complete weighted directed graph
> with $n$ nodes and $n(n-1)$ edges. Let $w_{ij} \ge 0$ show the weight
> of the edge $ij$ and $c(ij)$... |
We have the following linear grammar:
E ! aO | bO | bbE | bb
O ! aE | bE | abaE | aba
Does the linear grammar generate a regular language, if yes why ?
Our alphabet is $\Sigma$ = {a,b} and our nonterminals are E and O. We begin by E. |
generation of linear grammar |
|formal-languages|formal-grammars| |
i have the following regular grammar :
$$S \rightarrow aS | cS | bQ_1$$
$$Q_1 \rightarrow bQ_2$$
$$Q_2 \rightarrow aQ_3 | cQ_3 | bQ_1$$
$$Q_3 \rightarrow aQ_4 | cQ_4$$
$$Q_4 \rightarrow \varepsilon$$
The question is to transform that into a linear grammar with less nonterminals than the regular grammar and my ... |
null |
Judging from the wording of your question you are still confused about what it means for a grammar to be linear but I wont address that here. If you want to make the grammar smaller you could do the following: remove $Q_4$ from the right hand side of all production rules and remove all rules which start with $Q_4$. You... |
The following problem looks NP-hard to me, but I couldn't show it. Any proof/comment to show the hardness or easiness of it is appreciated.
> Assume $K_n=\langle V,E \rangle$ is a complete weighted directed graph
> with $n$ nodes and $n(n-1)$ edges. Let $w_{ij} \ge 0$ show the weight
> of the edge $ij$ and $c(ij)$... |
null |
To answer this question I will visit some prerequisite understanding. Pure demand paging cannot be accomplished without hardware support. All modern computer architectures support paging, however many have different implementation details.
x86 processors use what is called a page table to keep track of virtual addr... |
To answer this question I will visit some prerequisite understanding. Pure demand paging cannot be accomplished without hardware support. All modern computer architectures support paging, however many have different implementation details.
x86 processors use what is called a page table to keep track of virtual addr... |
We have the following linear grammar:
$$E \rightarrow aO | bO | bbE | bb$$
$$O \rightarrow aE | bE | abaE | aba$$
Does the linear grammar generate a regular language, if yes why ?
Our alphabet is $\Sigma$ = {a,b} and our nonterminals are E and O. We begin by E. |
null |
The following problem looks NP-hard to me, but I couldn't show it. Any proof/comment to show the hardness or easiness of it is appreciated.
> Assume $K_n=\langle V,E \rangle$ is a complete weighted directed graph
> with $n$ nodes and $n(n-1)$ edges. Let $w_{ij} \ge 0$ show the weight
> of the edge $ij$ and $c(ij)$... |
null |
Knuth considered this idea in V1 of TAoCP. He observed that we would need a new device to replace the flip-flop, and he proposed calling it the **flip-flap-flop**. Was he serious? Well, Knuth has quite a [sense of humor](http://en.wikipedia.org/wiki/Donald_Knuth#Humor).
But it looks like somebody has [implemented th... |
Given an integer $n$ and set of triplets of distinct integers
$$S \subseteq \{(i, j, k) \mid 1\le i,j,k \le n, i \neq j, j \neq k, i \neq k\},$$
find an algorithm which either finds a permutation $\pi$ of the set $\{1, 2, \dots, n\}$ such that
$$(i,j,k) \in S \implies (\pi(j)<\pi(i)<\pi(k)) ~\lor~ (\pi(i)<\pi(k)<\pi... |
Note that your definition is equivalent to the more informal one from [Wikipedia](https://en.wikipedia.org/wiki/Linear_grammar):
> [A] grammar is linear if it is context-free and all of its productions' right hand sides have at most one nonterminal.
So every regular grammar is linear *by definition*. That is why ... |
It can be useful to first figure out what *language* the grammar generates and then tailor a grammar. In this case, try and find a (concise) regular expression that describes the generated language.
>! $(a\mid c)^* (bb)^+ (a\mid c)^2$ |
To answer this question I will visit some prerequisite understanding. Pure demand paging cannot be accomplished without hardware support. All modern computer architectures support paging, however many have different implementation details.
x86 processors use what is called a page table to keep track of virtual addr... |
**Alternative Formulation**
I came up with an alternative formulation to the below problem. The alternative formulation is actually a special case of the problem bellow and uses bipartite graphs to describe the problem. However, I believe that the alternative formulation is still NP-hard. The alternative formulation... |
How to prove correctness of a shuffle algorithm? |
You need an inductive argument similar to the one used [here](http://cs.stackexchange.com/questions/1923/online-generation-of-uniform-samples/1931#1931):
* For the singleton list there is only one possibility, so it is uniformly chosen.
* Assuming that the list with $n$ elements was uniformly chosen (from all per... |
You need an inductive argument similar to the one used [here](http://cs.stackexchange.com/questions/1923/online-generation-of-uniform-samples/1931#1931):
* For the singleton list there is only one possibility, so it is uniformly chosen.
* Assuming that the list with $n$ elements was uniformly chosen (from all per... |
null |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.