Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
23
votes
1
answer
423
views
Is there any nongeneral CFG parsing algorithm that recognises EPAL?
EPAL, the language of even palindromes, is defined as the language generated by the following unambiguous context-free grammar:
$S \rightarrow a a$
$S \rightarrow b b$
$S \rightarrow a S a$
$S \right …
8
votes
1
answer
12k
views
Proof that $a^{n^2}$ is not regular
Show that $L=\{a^{n^2} | n \geq 0\}$ is not regular
Hey guys. I'm taking a CS class and this stuff is really new to me so bear with me.
I tried to look if I get some contradiction by using the pumpi …
2
votes
1
answer
53
views
Solving $\text{key}=(\sum_{K=0}^n\frac{1}{a^K})\bmod m$ with High limits
I was solving this equation:
$$\text{key}=\left(\sum_{K=0}^n\frac{1}{a^K}\right)\bmod{m}.$$
Given
$$ 1,000,000,000 < a, n, m \; < 5,000,000,000, $$
$$ a, m \text{ are coprime}. $$
I solved it by brute …
2
votes
1
answer
334
views
How to reduce MaxUNSAT to MaxSAT?
Is it possible to reduce MaxUNSAT to MaxSAT in a polynomial way ?
When considering the MaxSAT problem, one often considers also the MinUNSAT problem, which is almost the same. And for a propositional …
2
votes
2
answers
209
views
Rigorous proof against pseudorandom generator
I am trying to teach myself the principles of cryptograhpy, and want to solve the following question:
Let G be the algorithm that takes an input x = (x1, . . . , xn) from
{0, 1} n (so each xi ∈ {0, 1 …
6
votes
1
answer
217
views
What's a fast algorithm to decide whether there is an $A_G$ corresponding to a given $\chi_G...
Given an adjacency matrix $A_G$ of an undirected graph $G$, it is easy and straightforward to compute the characteristic polynomial $\chi_G(\lambda)$. What about the other way around? The problem can …
1
vote
1
answer
2k
views
Average number of full nodes in a binary search tree
Let $f(N)$ be the average number of full nodes (nodes with two children) in an $N$-node binary search tree.
Determine the values of $f(0)$ and $f(1)$.
Given that for $N > 1$,
$\qquad \displaystyle …
5
votes
2
answers
740
views
If a predicate is not computable, what can be said about its negation?
Doing the following exercise:
Let $\overline{HALT(x,y)}$ be defined as
$\overline {HALT(x,y)} \iff \text{program number y never halts on input x}$
Show that it is not computable.
Just want to make s …
2
votes
1
answer
3k
views
reducing subset-sum to partition
Subset-sum: Given a list of numbers, find if a non-empty sublist has sum 0 (there's a variation where we want sum=k instead of 0, but 0 is easier for analysis)
Partition: Given a list, can it be part …
3
votes
3
answers
717
views
Proof by restriction: when is it valid to restrict to a special case?
I was reading a few notes on Proof by Restriction and I am confused:
A Valid Proof by Restriction is the following:
Directed Hamiltonian Cycle Problem is NP Complete because if we look only at instanc …
3
votes
1
answer
127
views
Is matching with mismatches a special(parametrized) case of Closest String problem?
I am a bit confused. Somehow I have a problem connecting two problems together. The Closest String problem and the problem of matching with mismatches. They seam to be related but, I fail to see the c …
2
votes
2
answers
3k
views
What is the system's mean time to failure?
I have the following homework problem:
A 10 TB disk drive has an MTTF of 6,000,000 hours. How much data can we store in a system comprised of these disks, if we want the system MTTF to be at least 1 …
4
votes
1
answer
1k
views
Finding simpler equivalent regular expressions
I'm doing an exercise from my book that says:
Let $r$ and $s$ be arbitrary regular expressions over the alphabet $\Sigma$. Find a simpler equivalent regular expression:
a. $r(r^*r + r^*) + r^*$
b. $( …
1
vote
1
answer
106
views
How to write stack programs for arithmetic terms?
I have been given a question about a stack program which I can not solve.
Write a stack program to evaluate the term
$\qquad (((A+B)-(A*B))*C)/(((A-B-C))⁄2)$
How do I approach this problem?
-1
votes
1
answer
272
views
WP pseudocode for Dijkstra does not work
I mean Dijkstra's algorithm for the shortest path.
In all descriptions that I saw (including wikipedia),
on every step,
it always selects the nearest neighbor based on examining their weights.
Imagine …