Most Popular
1500 questions
14
votes
9 answers
Do passwords need a max length?
I understand that password storage generally uses hashing for security due to it being irreversible and that the stored hash is just compared to the hash of the password inputed by a user attempting to log in. As hashes are fixed length, does that…
Ethan
- 241
- 2
- 3
14
votes
1 answer
Universal Hashing in Practice
A family $H$ of hash functions $h: U \rightarrow \{0,\ldots,M-1\}$ is universal if
$$\forall x,y \in U, x \neq y \Rightarrow \Pr_{h \in H}[h(x) = h(y)] \leq \frac{1}{M}$$
You can find more about universal hashing this wikipedia article.
The concept…
Dai
- 1,460
- 10
- 12
14
votes
2 answers
Ackermann Function without Recursion or Stack
I have been studying the necessity of a WHILE loop when defining the Ackermann Function.
I am looking to write a program to compute the Ackermann function in a high level language such as Python or JavaScript to compare it to the WHILE language.
The…
CoalLad
- 143
- 1
- 6
14
votes
2 answers
Closure against right quotient with a fixed language
I'd really love your help with the following:
For any fixed $L_2$ I need to decide whether there is closure under the following operators:
$A_r(L)=\{x \mid \exists y \in L_2 : xy \in L\}$
$A_l(L)=\{x \mid \exists y \in L : xy \in L_2\}$.
The…
Jozef
- 1,727
- 4
- 14
- 22
14
votes
4 answers
Is it possible to create a "Time Capsule" using encryption?
I want to create a digital time capsule which will remain unreadable for some period of time and then become readable. I do not want to rely on any outside service to, for instance, keep the key secret and then reveal it at the required time. Is…
Micah Beck
- 585
- 3
- 10
14
votes
1 answer
Direct reduction from $st\text{-}non\text{-}connectivity$ to $st\text{-}connectivity$
We know that $st\text{-}non\text{-}connectivity$ is in $\mathsf{NL}$ by Immerman–Szelepcsényi theorem theorem and since $st\text{-}connectivity$ is $\mathsf{NL\text{-}hard}$ therefore $st\text{-}non\text{-}connectivity$ is many-one log-space…
Kaveh
- 22,661
- 4
- 53
- 113
14
votes
1 answer
How can you bound the error of an approximation without knowing the optimal solution?
I been looking at this site and it says that people found solutions for TSP tours that are just 0.031% higher than the optimal tour is. Without finding the optimal tour how does they know what length it is supposed to be?
Ilya Gazman
- 919
- 3
- 15
- 33
14
votes
2 answers
Circle Intersection with Sweep Line Algorithm
Unfortunately I am still not so strong in understanding Sweep Line Algorithm. All papers and textbooks on the topic are already read, however understanding is still far away. Just in order to make it clearer I try to solve as many exercises as I…
com
- 3,199
- 3
- 27
- 39
14
votes
1 answer
How to map the tapes of a "k-tape" Turing Machine into the single tape of a "1-tape" Turing Machine
I'm reading Sipser and I'm finding it hard to understand what the process is such that if you give me k Turing machines with k tapes, I can spit out an equivalent Turing machine with only one tape. An example would be nice. Actually, a worked out…
user678392
- 441
- 2
- 5
- 12
14
votes
2 answers
Comparison between Aho-Corasick algorithm and Rabin-Karp algorithm
I am working on string searching algorithms that support multiple pattern search. I found two algorithms that seem like the strongest candidates in terms of running time, namely Aho-Corasick and Rabin-Karp. However, I could not find any…
Hawk
- 241
- 3
- 7
14
votes
2 answers
Recover a set with the information of the sums of all its subsets
I have a set $S$, which contains $n$ real numbers, which generically are all different. Now suppose I know all the sums of its subsets, can I recover the original set $S$?
I have $2^n $ data. This is far more than $n$, the number of unknowns.
S. Kohn
- 283
- 1
- 6
14
votes
0 answers
What can be proven regarding the differences in power between unary ECMAScript regex functions and primitive recursive functions?
In 2014, inspired by Regex Golf, I started exploring, along with a mathematician going by the name teukon, what could be done in the unary domain in ECMAScript regex that went significantly beyond matching primes and powers of 2 (both of which were…
Deadcode
- 241
- 1
- 5
14
votes
1 answer
Hardness of a problem which is the sum of two NP-Hard problems
Consider the problem of computing an exponential sum over a certain function $g(x)=f(x)+h(x)$, that is computing
$$\sum_{x}g(x)=\sum_{x}f(x)+\sum_{x}h(x)$$
now if we know that $\sum_{x}f(x)$ and $\sum_{x}h(x)$ are two NP-Hard problems, what can we…
rano
- 251
- 2
- 6
14
votes
3 answers
Who needs linearizability?
I've been reading about the differences between serializability and linearizability, which are both consistency criteria for replicated systems such as replicated databases. However, I don't know in which cases linearizability would be needed, even…
Eduardo Bezerra
- 245
- 2
- 8
14
votes
1 answer
Randomized Selection
The randomized selection algorithm is the following:
Input: An array $A$ of $n$ (distinct, for simplicity) numbers and a number $k\in [n]$
Output: The the "rank $k$ element" of $A$ (i.e., the one in position $k$ if $A$ was sorted)
Method:
If there…
Amumu
- 431
- 5
- 12