instruction stringlengths 0 29.8k ⌀ |
|---|
At lesson my teacher sayd that a graph with $N$ vertices to be certainly connected should have
$ {\frac{n(n-1)}{2}+1 \space }$ edges showing that (the follow is taken from the web but says the same thing):
>The non-connected graph on n vertices with the most edges is a complete graph on
$n-1$ vertices and one i... |
How many edges must a graph with N vertices have in order to guarantee that it is connected? |
|graphs| |
At lesson my teacher sayd that a graph with $n$ vertices to be certainly connected should have
$ {\frac{n(n-1)}{2}+1 \space }$ edges showing that (the follow is taken from the web but says the same thing):
>The non-connected graph on n vertices with the most edges is a complete graph on
$n-1$ vertices and one i... |
The (I think) original proof is by [Hartmanis, Lewis & Stearns][1], conveniently available for free :).
My rough understanding of it is that it goes via equivalence to the class of regular languages in the sense that you only need a constant amount of space to decide a regular language (just whatever state it's up t... |
Don't know why I didn't just give an answer, rather than a comment, but for posterity:
Your reasoning is correct, the $n$ vertex graph with the maximal number of edges that is still disconnected is a $K_{n-1}$ with an additional isolated vertex. Hence, as you correctly calculate, there are $\binom{n}{2} = \frac{(n-1... |
Show that for $l(n) = \log \log n$, it holds that $\text{DSPACE}(o(l)) = \text{DSPACE}(O(1))$.
It's well known fact in Space Complexity, but how to show it explicitly? |
Space complexity lower bound |
|complexity-theory|regular-languages|space-complexity|lower-bounds| |
You are probably in the realm of asynchronous parallel computations where units of work are performed by processors at their pace and communication is performed explicitly. This model is a good approximation to many real life parallel computers such as PC clusters or multicore CPUs.
You have an algorithm that can be... |
So here is the main idea behind this fact. Let us denote by $C$ all possible configuration of the $l(n)$-space bounded TM. Notice that $|C|\le 2^{c\cdot l(n)}$, where $c$ is a constant depending on $M$.
We assume that the input tape is a two-way tape. Let $w$ be a word of size $n$, such that for all smaller words $... |
null |
The formula is worthless without a proof.
Suppose we have a graph on $n$ vertices which is not connected. Then it is possible to divide into two disjoint subgraphs, say one with $i$ vertices and another with $n - i$ vertices. The component with $i$ vertices has at most $i (i - 1)/2$ edges, while the component with $... |
When in a Parallel algorithm we say:
> "This algorithm is done in $O(1)$ time using $O(n\log n)$ work, with $n$-exponential probability, or alternatively, in $O(\log n)$ time using $O(n)$ work, with $n$-exponential probability."
Then Can we Implement this algorithm for a Quad-Core Computer (and just 4 threads) wi... |
A question about parallel algorithm complexity |
|algorithm-analysis|runtime-analysis|parallel-computing| |
Space complexity below $\log\log$ |
At lesson my teacher said that a graph with $n$ vertices to be certainly connected should have
$ {\frac{n(n-1)}{2}+1 \space }$ edges showing that (the follow is taken from the web but says the same thing):
>The non-connected graph on n vertices with the most edges is a complete graph on
$n-1$ vertices and one i... |
The formula is worthless without a proof.
Suppose we have a graph on $n$ vertices which is not connected. Then it is possible to divide into two disjoint subgraphs, say one with $i$ vertices and another with $n - i$ vertices. The component with $i$ vertices has at most $i (i - 1)/2$ edges, while the component with $... |
Here's something more complicated, which performs $n + o(n)$ comparisons, and achieves an approximately correct list with high probability.
Suppose you want to partition a set $V$ of $n$ elements into a disjoint union $L \cup S$ of a set of larger elements and a set of smaller elements, where every $s \in S$ is boun... |
in a 32-bit floating number with normalized mantissa and excess-64 exponent base 16 the no 16^(-65) denotes
a)floating point overflow
b)negative floating point overflow
c)all 0's in exponent ad mantissa field
d)the minimum re-presentable positive number
i think that minimum representable no sud be 1 * 16^-6... |
in a 32-bit floating number with normalized mantissa and excess-64 exponent base 16 the no 16^(-65) denotes |
|numerical-analysis|floating-point|rounding| |
There is an at-times dizzying array of symbols used in math and CS papers. Yet many assume basic familiarity that seems rarely taught in one place. I am looking for a dictionary something like the following, especially from a CS perspective.
* It would list all the basic mathematical symbols and give their meanings... |
Looking for a dictionary of math/CS notation |
I got as far as
\begin{align}
w \vDash \neg (a U b) &\Leftrightarrow \neg (w \vDash a U b)
\Leftrightarrow \neg (\exists_{i\geq0} : w^i \vDash b \land \forall_{0\leq k < i} : w^k \vDash a) \\
&\Leftrightarrow \forall_{i\geq0} : \neg(w^i \vDash b) \lor \exists_{0\leq k < i} : \neg(w^k \vDash a)
\end{align}
b... |
LTL: Show $\neg(aUb) \Leftrightarrow \neg b U (\neg a \land \neg b) \lor G \neg b$ |
|linear-temporal-logic| |
In a 32-bit floating number with normalized mantissa and excess-64 exponent base 16, the number $16^{-65}$ denotes
1. Floating point overflow.
2. Negative floating point overflow.
3. All 0's in the exponent and mantissa fields.
4. The minimum representable positive number .
I think that minimum represe... |
null |
In a 32-bit floating number with normalized mantissa and excess-64 exponent base 16, the number $16^{-65}$ denotes |
Some background info:
You may want to start by studying perceptrons and the learning algorithm (a building block for SVMs). It may also be useful to read up a bit on kernel methods (dealing with high dimensional data) in machine learning and Lagrange multipliers and how to apply them in different optimization tasks.
... |
> To know something's secret name is to steal its power. - Dr. Daniel Jackson
For the times when we can only draw the symbol and want a name.
See: [shapecatcher][1]
You draw the symbol and if there is a unicode char for it, it will find it and give you a name. If there are many such as =, it will list many... |
I'm trying to decide which of the following statements are true:
$(i)$ $NSpace(\log \log n)=coNSpace(\log \log n )$
$(ii)$ $NSpace(\lg^2n)=coNSpace(\lg^2n)$
$(iii)$ $NSpace(\sqrt n)=coNSpace(\sqrt n)$
I thought immediately that $(i)$ is correct since $\lg \lg n < \lg n$ and since $\ NL = coNL$ i thought tha... |
Equality of $NSpace$ and $coNSpace$ classes |
|complexity-theory| |
null |
I came across a couple of solutions to one of the problems that is in the CLRS textbook (pg. 637 23.2-5 edition 3). I am wondering if anyone can make a clarification as to the stated running time of the solution.
Q: Given that we know the edge weights on a graph are between $1$ and some constant $W$, how fast can ... |
null |
I can't think of any counter-example for (i) right now. But (ii) and (iii) are true due to the Immerman–Szelepcsényi theorem[1], according to which $NSPACE(s(n)) = co-NSPACE(s(n))$ for all $s(n) \geq log(n)$.
\[1]: [Wikipedia - Immerman–Szelepcsényi theorem](http://en.wikipedia.org/wiki/Immerman%E2%80%93Szelepcs%C3%... |
You can use [this sheet][1]. It has a lot of handy formulas and some definitions.
You can also use [Wikipedia's list of mathematical symbols][2] propsed by Kyle Jones in comments.
There is also [Worfram MathWorld][3] which is a great resource, but you need to know what are you looking for.
When it comes to pri... |
I'm trying to decide which of the following statements are true:
1. $\mathsf{NSpace}(\log \log n) = \mathsf{coNSpace}(\log \log n )$
2. $\mathsf{NSpace}(\lg^2n) = \mathsf{coNSpace}(\lg^2n)$
3. $\mathsf{NSpace}(\sqrt n) = \mathsf{coNSpace}(\sqrt n)$
I thought immediately that (1) is correct since $\lg \lg n ... |
Equality of NSpace and coNSpace classes |
|complexity-theory|space-complexity| |
The format you are using is not IEEE-754 but an [IBM FP format][1]. The mantissa is fractional, so the binary representation 0001_0000_0000_0000_0000_0000 means 0.1 (base 16). With a zero value in the exponent field, the exponent would be -64. So you can see that $16^{-65}$ would be the smallest *normalized* positiv... |
null |
$aUb$ means that $a$ holds up to (and not necessarily including) the first point where $b$ holds, which must exist. There are two ways in which this can fail: $b$ never holds, or the first time that $a$ fails precedes the first time in which $b$ is true. The first case is handled by $G \lnot b$. The second case is hand... |
Here is an $O(VE)$ algorithm, which is substantially better than $O(V^3)$ if the graph is sparse. First do a topological sort, in time $O(V+E)$. Now work your way backwards, storing which vertices are reachable. At a vertex of outdegree $d$, this requires $O(dV)$ work, so in total you get $O(VE)$.
|
The solution is to preprocess the adjacency matrix so that each vertex now has a list of adjacent vertices. When decreasing keys, you address each edge at most twice, so this part of the algorithm runs in $O(E)$.
The basic observation here is that you can implement a priority queue in $O(W)$ if the number of differe... |
Suppose through l1 Minimization I obtained two sparse probability distributions $P, Q$ which may contain many zero terms. Then I would like to compute the KL-Divergence of them $D(P || Q) = \sum_i {p_i\log(\frac{p_i}{q_i})}$. However, since the probability distribution is parse, it might occur that $p_i \not= 0$ and $q... |
l1 Minimization of Probability Distribution and KL-Divergence |
|machine-learning|information-theory| |
A question about the clique problem (specifically k-clique). Is there any algorithm that takes advantage of graphs without connected components to find cliques of a given size `k`, if such cliques exist? |
K-Clique in Graph w/o Connected Components |
|algorithms|graphs| |
A question about the clique problem (specifically k-clique). Is there any algorithm that takes advantage of graphs without "islands" to find cliques of a given size `k`, if such cliques exist? |
K-Clique in Graph w/o "Islands" |
null |
In principle, chess is solvable like any other game. As the other answers have pointed out, however, this is not expected to happen anytime soon.
*Edit: it has been pointed out in the comments that [1] is a hoax so skip the rest of this answer.*
That said, there has been some recent developments in this directio... |
Have you looked into [Jensen-Shannon Divergence](http://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence)? It avoids the situation you described by adding a midpoint. Formally we have,
$$\mathrm{JSD}(P||Q) = \frac{1}{2} \mathrm{KL}(P||M) + \frac{1}{2} \mathrm{KL}(Q||M)$$ where $M = \frac{1}{2}(P + Q)$. Informal... |
null |
A question about the clique problem (specifically k-clique). Is there any algorithm that takes advantage of the properties of connected graphs to find cliques of a given size `k`, if such cliques exist? |
K-Clique in Connected Graphs |
This seems like a fair/good question to me, but I think the answer must be negative. Here's my argument.
Suppose you had an algorithm $A$ for solving CLIQUE on connected graphs (somehow taking advantage of the connectivity property). Then I can construct an algorithm $B$ for solving CLIQUE on general graphs that is ... |
null |
I can't think of any counter-example for (i) right now. But (ii) and (iii) are true due to the Immerman–Szelepcsényi theorem[1], according to which $\text{NSPACE}(s(n)) = \text{co-NSPACE}(s(n))$ for all $s(n) \geq \log(n)$.
\[1]: [Wikipedia - Immerman–Szelepcsényi theorem](http://en.wikipedia.org/wiki/Immerman%E2%80... |
null |
Suppose through l1 minimization I obtained two sparse probability distributions $P, Q$ which may contain many zero terms. Then I would like to compute the KL-Divergence of them $D(P || Q) = \sum_i {p_i\log(\frac{p_i}{q_i})}$. However, since the probability distribution is sparse, it might occur that $p_i \not= 0$ and ... |
null |
Suppose through $\ell_1$ minimization I obtained two sparse probability distributions $P, Q$ which may contain many zero terms. Then I would like to compute the KL-Divergence of them $D(P || Q) = \sum_i {p_i\log(\frac{p_i}{q_i})}$. However, since the probability distribution is sparse, it might occur that $p_i \not= 0... |
$\ell_1$ Minimization of Probability Distribution and KL-Divergence |
This seems like a fair/good question to me, but I think the answer must be negative. Here's my argument.
Suppose you had an algorithm $A$ for solving CLIQUE on connected graphs (somehow taking advantage of the connectivity property). Then I can construct an algorithm $B$ for solving CLIQUE on general graphs that is ... |
null |
Suppose we have a list of unbounded integers, written in binary, and we want to write a (formal) proof that the list is sorted in ascending order.
Such a proof might look (informally) like: "2 < 3, and 3 < 5, and ... and 71 < 79, so the list is sorted."
It would seem such a proof must have length $\Omega(n)$ wher... |
Lower bound on size of proof that a list of integers is sorted |
|proof-techniques|lower-bounds|descriptive-complexity| |
As pointed out in the previous answer, you cannot do very well if you simply assume that your input is a connected graph. However, you can do better if you make certain assumptions on your graph's structure. That is, one can ask: given a class of graphs $\mathcal G$, will the clique problem be solvable in polynomial ti... |
Given a deterministic Turing machine with an input stripe and a work stripe which uses $log_2n+100$ ($n$ represents the input length) and uses $2006$ work Aleph Bet signs and $27$ inner states. I wonder how come the running time of such machine is $O(n^{1+log_22006}\cdot log_2n)$ (The answer is the correct choice for t... |
How come this turing machine running time is $O(n^{1+log_22006}\cdot log_2n)$ |
|complexity-theory|time-complexity| |
Using the formula from wikipedia for [Bloom filter false positives](http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives), your proposal would have a false positive probability of about 0.00726%. This assumes, among other things, that good hash functions are used. The formula is:
$(1 - [1 - (1/... |
null |
|proof-techniques|lower-bounds|descriptive-complexity| |
Suppose we have a list of unbounded integers, written in binary, and we want to write a (formal) proof that the list is sorted in ascending order.
Such a proof might look (informally) like: "2 < 3, and 3 < 5, and ... and 71 < 79, so the list is sorted."
It would seem such a proof must have length $\Omega(n)$ wher... |
Given a deterministic Turing machine with an input stripe and a work stripe which uses $log_2n+100$ ($n$ represents the input length) and its set of tape alphabet is of size $2006$ and $27$ inner states. I wonder how come the running time of such machine is $O(n^{1+log_22006}\cdot log_2n)$ (The answer is the correct ch... |
Given a deterministic Turing machine with an input stripe and a work stripe which uses $log_2n+100$ ($n$ represents the input length) and its set of tape alphabet is of size $2006$ and it has $27$ inner states. I wonder how come the running time of such machine is $O(n^{1+log_22006}\cdot log_2n)$ (The answer is the cor... |
null |
This bound comes from the number of possible configurations. If you do more steps than you have configurations, you are in a cycle.
So let us quickly get a bound for the number of configurations. You have $100+\log n$ possible positions for the head on the work tape and $n$ positions for the head on the input tape. ... |
Given a deterministic Turing machine with an input tape and a work tape. The work tape is restricted to $\log_2 n+100$ cells ($n$ represents the input length) and its tape alphabet is of size $2006$. Moreover, the Turing machine has $27$ states.
I wonder how come the running time of such machine is $O(n^{1+log_2 2... |
|complexity-theory|time-complexity|turing-machines| |
I'm trying to find a polynomial time algorithm for finding the minimum vertex cover for a graph. I've written the algorithm below; I know this problem is NP-hard, which means there are probably some graphs for which this algorithm will not work.
I need some help in finding the flaw in this algorithm and also, an ind... |
Flaw in this Vertex Cover Algorithm |
|algorithms|graphs|np-complete|np-hard| |
I'm trying to find a polynomial time algorithm for finding the minimum vertex cover for a graph. I've written the algorithm below; I know this problem is NP-hard, which means there are probably some graphs for which this algorithm will not work.
I need some help in finding the flaw in this algorithm and also, an ind... |
Trying to take "high priority" i.e. high degree vertices over their neighbors will not work in all cases. This algorithm chooses $n-1$ for $C_n$ ([Cycle Graph](http://en.wikipedia.org/wiki/Cycle_graph) on $n$ vertices). It should choose either $n-1/2$ or $n/2$ if its odd or even. It also fails for [Perfect Graphs](http... |
Given a deterministic Turing machine with an input tape and a work tape. The work tape is restricted to $\log_2 n+100$ cells ($n$ represents the input length) and its tape alphabet is of size $2006$. Moreover, the Turing machine has $27$ states.
I wonder how come the running time of such machine is $O(n^{1+\log_2 ... |
How come this turing machine running time is $O(n^{1+\log_2 2006}\cdot \log_2n)$ |
When talking about proofs, you need to explain three things: (1) formal proof system, (2) what you want to prove, (3) what you want to prove it from.
You seem to imply that item 3 should be $n$ different axioms, listing the contents of the array. In that case, you're right that you will need to invoke all axioms to ... |
null |
Using the formula from wikipedia for [Bloom filter false positives](http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives), your proposal would have a false positive probability of about 0.00726%. This assumes, among other things, that good hash functions are used. The formula is:
$(1 - (1 - [1/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.