Tag Info

Hot answers tagged

14

You are correct about your interpretation of the $e$ stuff. Indeed, this value is $2.2250738585072014 \cdot 10^{-308}$ Which is, to be sure, a number. It's just that, in order to properly store this number, the calculator will need a fair bit of memory to store it accurately, and you've essentially attempted to exhaust it.


4

Actually because $NP$ and $coNP$ are subsets of $EXP$, there always is a deterministic touring machine deciding any of these. The problem is that it is a machine with a very long running time. For an $NP$-language $L$, a deterministic $EXP$-TM deciding $L$ is simply the "try all verification candidates" (These are of polynomially bounded length, also called ...


3

This is indeed a number, it is extremely near by 0. Your number is approximately $$2 \cdot 10^{-308} = 0.\underbrace{00\ldots 0}_{307 \text{ zeros}}2 \; ,$$ which is slightly bigger than zero. I don't know what you want to program, but one often wants to test, if such a result is zero. You should never do something like this: res = 2.2E-10; if (res == ...


2

To continue steven taschuk's suggestion : Let $N$ be some very big number, from which noone knows whether it is a prime number or not (for example the $33$-th Fermat-number). If $N$ is prime or composite, in both cases there is a proof for this statement, but the result is unknown. This can be applied to any decidable question whose answer is unknwon.


2

You said formula give scores in $[0.3,0.4]$, which makes me guess your your raw data is in $[-0.6,-0.2]$. Try: $n\over{n+{(e^{-score})}}$, try varying the values of $n$ (n=5,5.5,6,7 etc will give you output in range $[.7,.8]$ if your raw data is in the domain mentioned above.) $n\over{n+n^{-score}}$, try varying the values of $n$. (n=6,7,8 etc will give ...


2

I guess your current raw scores are in the neighborhood of $-0.7$ or so, which yields a scaled score of $$ \frac{1}{1+e^{0.7}} \doteq 0.33 $$ If you want, you can replace the $1$ in both the numerator and the denominator by $6$, and then you would get $$ \frac{6}{6+e^{-score}} = \frac{6}{6+e^{0.7}} \doteq 0.75 $$ But this is fairly ad hoc. I don't know ...


2

You have the pieces you need. You will show by induction on the number of nodes that $h(c_i)=k_i$. The first step in constructing the Huffman tree $T$ will be to combine $c_{n-1}$ and $c_n$; since $p_{n-1}=p_n=2^{-k}$ the combined node has weight $2^{-(k-1)}$ -- in particular, $1$ over a power of two. So the induction hypothesis applies to the tree $T'$ ...


2

HINT: The induction is on $n$. If $n=2$, the only possibility is that $k_1=k_2=1$: no other combination gives you $p_1+p_2=1$. You can easily verify that in that case $h(c_1)=h(c_2)=1$. For the induction step, assume the result for some $n\ge 2$, and prove it for $n+1$. Note that after you combine the the two least probable characters in the first step of ...


1

Hint: You can reduce the problem to 2-CNF-SAT. Have clauses such as $B_{17}\lor R_{17}$, $\neg B_{17} \lor \neg R_{17}$, and $\neg B_{17}\lor \neg B_{42}$.


1

With very minor variations your idea can be used to design a PDA that recognizes either of the languages $\{a^nb^mc^k:k\ge n+m\}$ and $\{a^nb^mc^k:k>n+m\}$, so these are both context-free. A similar idea also yields PDAs for $\{a^nb^mc^k:k>n\}$ and $\{a^nb^mc^k:k>m\}$. The problem with the language in your question is that while we can use the stack ...


1

Execution time = 1 Memory operations = 0.3 80% of memory operations = 0.24, this now takes 0.06 seconds, 0.18 seconds saved 20% of the memory operations = 0.06 Half of the remaining 20% = 0.03, this now takes 0.015 seconds, 0.015 seconds saved 0.195 seconds saved What had taken 1 seconds,now takes 0.805 seconds. 1/0.79=1.2422, you seem to have done it ...


1

It is quite possible to program a computer to recognize valid first-order proofs presented to it, if we can accept that the proofs have to be written down in a computer-friendly notation. This is not directly connected to whether one can recognize true statements of first order arithmetic. A machine that recognized arithmetic truth would be able to solve ...


1

It is easiest to see the differences using an example, so consider the geometric series $\sum_{k=1}^{j}{ar^{k-1}}$ with initial value $a$ and common ratio $r$. To find the nth term evaluate the summand $ar^{k-1}$ when $k = n$. 1st term = $ar^{1-1} = ar^0 = a$ 2nd term = $ar^{2-1} = ar^1 = ar$ (n-1)th term = $ar^{(n-1)-1} = ar^{n-2}$ nth term = ...



Only top voted, non community-wiki answers of a minimum length are eligible