instruction stringlengths 0 29.8k ⌀ |
|---|
You are replacing `magnitude[i]` by `magnitude[SZ-i]`. That won't have any effect on complexity nor ease of implementation. Depending on the way simplifications occur, one or the other could have slightly less index adjustments, but I won't dare a guess which. Little endian seems slightly more in line with the usual pr... |
|programming-languages|operating-systems|compilers|computer-architecture|digital-preservation| |
|filesystems|integrity|digital-preservation| |
Assume I want to insert elements $1$ to $n$ into a data structure exactly once, and perform predecessor query while insert the element. (So insert(x),pred(x) always come in pairs)
The data structure is created from preprocess the list of insertions.
When I start to insert elements, an adversary decide to delete... |
Predcessor query if insertion orders are known? |
|data-structures| |
Do you know any algorithm that calculates the factorial after modulus efficiently?
For example, I want to program:
for(i=0; i<5; i++)
sum += factorial(p-i) % p;
But, `p` is a big number (prime) for applying factorial directly $(p \leq 10^ 8)$.
In Python, this task is really easy, but i really wan... |
null |
Assume I want to insert elements $1$ to $n$ into a data structure exactly once, and perform predecessor queries while inserting these elements (so `insert(x)` and `pred(x)` always come in pairs).
The data structure is created by preprocessing the list of insertions.
When I start to insert elements, an adversary ... |
Predecessor query where the insertion order is known |
NP completeness is about worst case intractability. Depending on which problem you are working on, many classes of instances might be solvable in a reasonable time in practice (although you might need a more specialized algorithm to get the good runtimes).
Consider seeing if there is an efficient reduction from your... |
Let $L_1$, $L_2$, $L_3$, $\dots$ be an infinite sequence of context-free languages, each of
which is defined over a common alphabet $Σ$. Let $L$ be the infinite union of $L_1$, $L_2$, $L_3$, $\dots $;
i.e., $L = L_1 \cup L_2 \cup L_3 \cup \dots $.
Is it always the case that $L$ is a context-free language? |
Is an infinite union of context-free languages always context-free? |
The first trick here is to think of the multiplication table as the transition table of an automaton $A$ with each state representing a letter in your multiplication table, but not worrying about acceptance yet. Then construct the automaton $A_T$ ("$T$" for transpose) for *reverse multiplication* by transposing it...
... |
My goal is to solve the following problem, which I have described by its input and output:
__Input:__
A fixed directed a cyclic graph $G$ with $m$ nodes, $n$ sources, and $1$ sink ($m > n \geq 1$).
__Output:__
The VC-dimension (or an approximation of it) for the neural network with topology $G$.
__More... |
Efficiently computing or approximating the VC-dimension of a neural network |
|algorithms|complexity-theory|machine-learning|neural-networks|vc-dimension| |
Questions related to computability theory, a.k.a. recursion theory |
My goal is to solve the following problem, which I have described by its input and output:
__Input:__
A directed acyclic graph $G$ with $m$ nodes, $n$ sources, and $1$ sink ($m > n \geq 1$).
__Output:__
The VC-dimension (or an approximation of it) for the neural network with topology $G$.
__More specif... |
The first trick here is to think of the multiplication table as the transition table of an automaton $A$ with each state representing a letter in your multiplication table, but not worrying about acceptance yet. So the letters on the left and in the body of the table are actually states -- it would be more accurate to ... |
|programming| |
What are the complete specifications that must be documented in order to ensure the correct execution of a particular program written in Java? For instance, if one were archiving a program for long-term preservation, and no testing or porting would be done.
I need to be able to compile and execute the Java program. ... |
|operating-systems|computer-architecture|digital-preservation| |
What is the most efficient way to compute factorials modulo a prime? |
My goal is to solve the following problem, which I have described by its input and output:
__Input:__
A directed acyclic graph $G$ with $m$ nodes, $n$ sources, and $1$ sink ($m > n \geq 1$).
__Output:__
The [VC-dimension](https://en.wikipedia.org/wiki/Vc_dimension) (or an approximation of it) for the neural... |
|data-structures|runtime-analysis| |
null |
The first trick here is to think of the multiplication table as the transition table of an automaton $A$ with each state representing a letter in your multiplication table, but not worrying about acceptance yet. So the letters on the left and in the body of the table are actually states -- it would be more accurate to ... |
Assume I want to insert elements $1$ to $n$ into a data structure exactly once, and perform predecessor queries while inserting these elements (so `insert(x)` and `pred(x)` always come in pairs).
The data structure is created by preprocessing the list of insertions.
When I start to insert elements, an adversary ... |
|operating-systems|computer-architecture|digital-preservation| |
Hoeven et al. studied the problem of digital preservation through emulation:
*... Digital preservation does not end with the careful storage of digital objects. In order
to keep these objects accessible, a continuous effort towards the development of
strategies for permanent access is required ....*
They ended ... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$ such that the pairwise distance between them is maximized. We can assume Euclidean distance and triangle inequality.
The naive algori... |
Selecting $k$ points so that their pairwise distance is maximized |
|algorithms|computational-geometry| |
Hoeven et al. studied the problem of digital preservation through emulation:
*... Digital preservation does not end with the careful storage of digital objects. In order
to keep these objects accessible, a continuous effort towards the development of
strategies for permanent access is required ....*
They ended ... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$ such that the sum of pairwise distances between the points is maximized. We can assume Euclidean distance and triangle inequality.
Th... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$ such that the pairwise distance between them is maximized. We can assume Euclidean distance and triangle inequality.
The naive algori... |
Assume I want to insert elements $1$ to $n$ into a data structure exactly once, and perform predecessor queries while inserting these elements (so `insert(x)` and `pred(x)` always come in pairs). The predecessor of x is the largest number in the data structure that is smaller than x.
The data structure is created by... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest way from all the other points. We c... |
null |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest away from all the other points. We ... |
Greedily selecting $k$ points that are farthest away from each other |
What are efficient and accurate techniques for monitoring the recoverability and integrity of files in very large preservation archives?
In very large archives, the time taken to recompute checksums periodically (scrubbing) is substantial, perhaps taking more than all the available time depending on the read bandwid... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest away from all the other points. The... |
We know that $\overline{stPATH}$ is in $\mathsf{NL}$ by [Immerman–Szelepcsényi theorem][1] theorem and since $stPATH$ is $\mathsf{NL\text{-}hard}$ therefore $\overline{stPATH}$ is many-one log-space reducible to $stPATH$. But is there a direct/combinatorial reduction that doesn't go through the configuration graph of t... |
Direct reduction from $\overline{PATH}$ to $PATH$ |
|complexity-theory|reductions|space-complexity| |
We know that $\overline{stPATH}$ is in $\mathsf{NL}$ by [Immerman–Szelepcsényi theorem][1] theorem and since $stPATH$ is $\mathsf{NL\text{-}hard}$ therefore $\overline{stPATH}$ is many-one log-space reducible to $stPATH$. But is there a direct/combinatorial reduction that doesn't go through the configuration graph of t... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest away from all the other points. The... |
null |
|algorithms|complexity-theory|linear-algebra| |
|data-structures|arrays| |
In terms of computational complexity, and even in terms of significant differences in running time, it doesn't matter. Pick one.
From a software engineering perspective, having recently debugged bignum code on architectures with different endiannesses, I've found a big-endian representation easier to work with becau... |
Here's a conjecture for regular expressions:
> For regular expression $R$, let the length $|R|$ be the number of symbols in it,
> ignoring parentheses and operators. E.g. $|0 \cup 1| = |(0 \cup 1)^*| = 2$
>
> **Conjecture:** If $|R| > 1$ and $L(R)$ contains every string of length $|R|$ or less, then $L(R) = \Sig... |
"Dense" regular expressions generate $\Sigma^*$? |
|regular-languages|regular-expressions| |
You are replacing `magnitude[i]` by `magnitude[SZ-i]`. That won't have any effect on complexity nor ease of implementation. Depending on the way simplifications occur, one or the other could have slightly less index adjustments, but I won't dare a guess which. Little endian seems slightly more in line with the usual pr... |
Your conjecture is disproved by Keith Ellul, Bryan Krawetz, Jeffrey Shallit and Ming-wei Wang in their paper "Regular Expressions: New Results and Open Problems". While the paper is not available on-line, a [talk][1] is.
In the paper, they define the measure $|\mathrm{alph}(R)|$, which is the number of symbols in $R... |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest away from all the other points. The... |
|formal-languages|regular-languages|regular-expressions| |
null |
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that it is the farthest away from all the other points. The... |
##The problem##
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. As a part of an greedy algorithm, I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that i... |
We know that $\overline{\mathsf{stPATH}}$ is in $\mathsf{NL}$ by [Immerman–Szelepcsényi theorem][1] theorem and since $\mathsf{stPATH}$ is $\mathsf{NL\text{-}hard}$ therefore $\overline{\mathsf{stPATH}}$ is many-one log-space reducible to $\mathsf{stPATH}$. But is there a direct/combinatorial reduction that doesn't go ... |
Direct reduction from $\overline{\mathsf{stPATH}}$ to $\mathsf{stPATH}$ |
> My question:
> Is there a way I can make the greedy picking strategy run in $o(|V|^2)$ time?
It seems to me that you described it. In case I read too far in your description, here is what I've understood. Have an associative data structure associating each element of $V$ with the sum of the distance to elements ... |
##The problem##
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. As a part of an greedy algorithm, I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that i... |
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 this possible? If not, is some kind of proof possible that it is not?
O... |
Is it possible to create a "Time Capsule" using encryption? |
|encryption|digital-preservation| |
##The problem##
I have a set of 2-dimensional points $V$. I am given a random point $p \in V$, an integer $1 \leq k \leq |V|$ and a set $S = \{p \}$. As a part of an greedy algorithm, I must pick a total of $k$ points into my set $S$. The picking strategy is a greedy one: at every step I select the point such that i... |
null |
I came up with a partial answer, but not strictly speaking an answer to the question as stated. I suspect this may be as close as it's possible to get, but I'm not sure.
First, we encode the capsule with the key required for decryption.
I don't know how to get around having some kind of an authority to hold the k... |
I have two problems related paths in a directed graph. Let G(V,E) be a directed graph with source s and target t. Let v be another vertex in G. Find a simple directed path from s to t through v. A simple directed path does not allow any vertex to appear more than once.
My second problem is to find a simple directe... |
Directed path in a directed graph |
|algorithms| |
I have two problems related paths in a directed graph. Let $G(V,E)$ be a directed graph with source $s$ and target $t$. Let $v$ be another vertex in $G$. Find a simple directed path from $s$ to $t$ through $v$. A simple directed path does not allow any vertex to appear more than once.
My second problem is to find ... |
|algorithms|graphs| |
null |
I'm studying for my final in theory of computation, and I'm struggling with the proper way of answering whether this statement is true of false.
By the definition of $\leq_m$ we can construct the following statement,
$w \in A \iff f(w) \in B \rightarrow w \notin A \iff f(w) \notin B$
This is where I'm stuck,... |
If A is mapping reducible to B then the complement of A is mapping reducible to the complement of B |
|reductions| |
I have two problems related to paths in a directed graph. Let $G=(V,E)$ be a directed graph with source $s \in V$ and target $t \in V$. Let $v \in V \setminus \{s,t\}$ be another vertex in $G$.
1. Find a simple directed path¹ from $s$ to $t$ through $v$.
2. Find a simple directed path from $s$ to $t$ that goes ... |
Simple paths with halt in between in directed graphs |
The problem is known as **timed-release cryptography**. For some references/introduction look at:
- "[Time-lock puzzles and timed-release Crypto][1]" by R.R. Rivest, A. Shamir, and D. A. Wagner (1996)
*Our motivation is the notion of "timed-release crypto", where the goal is to encrypt a message so it cannot be ... |
|complexity-theory|reductions| |
As Dave said, it is simple logic: $p \Leftrightarrow q$ is the same as $\lnot p \Leftrightarrow q$. Now put $p= w\in A$ and $q = f(w) \in B$.
$A \leq_m B$ means there is a total computable $f$ s.t. for all $w$,
> $w \in A \Leftrightarrow f(w) \in B$.
By the argument above, this is the same as
> $w \notin A... |
|cryptography|encryption|digital-preservation| |
We know that $st\text{-}non\text{-}connectivity$ is in [$\mathsf{NL}$][1] by [Immerman–Szelepcsényi theorem][2] theorem and since $st\text{-}connectivity$ is $\mathsf{NL\text{-}hard}$ therefore $st\text{-}non\text{-}connectivity$ is many-one log-space reducible to $st\text{-}connectivity$. But is there a direct/combina... |
Direct reduction from $st\text{-}non\text{-}connectivity$ to $st\text{-}connectivity$ |
As Dave said, it follows from a simple logical equivalence: $p \leftrightarrow q$ is the same as $\lnot p \leftrightarrow \lnot q$. Now put $p= w\in A$ and $q = f(w) \in B$.
$A \leq_m B$ means there is a total computable $f$ s.t. for all $w$,
> $w \in A \leftrightarrow f(w) \in B$.
By the argument above, this... |
I asked this [question][1] at generic stackoverflow and I was directed here..
It will be great if some one can explain how to approach partial or fully dynamic graph problems in general.
For example,
Find Shortest Path between two vertices(u,v) in a undirected weighted graph for 'n' instances, when an edge is ... |
How to approach Dynamic graph related problems |
|algorithms|data-structures|graphs| |
null |
Do you know any algorithm that calculates the factorial after modulus efficiently?
For example, I want to program:
for(i=0; i<5; i++)
sum += factorial(p-i) % p;
But, `p` is a big number (prime) for applying factorial directly $(p \leq 10^ 8)$.
In Python, this task is really easy, but i really wan... |
Dynamic graph models have been studied intensively in distributed computing. For distributed algorithms, the computation is structured into rounds and the topology of graphs (=network) might undergo some changes from round to round, which are under control of an adversary. Moreover, every node of the graph runs an algo... |
null |
I asked this [question][1] at generic stackoverflow and I was directed here.
It will be great if some one can explain how to approach partial or fully dynamic graph problems in general.
For example:
- Find Shortest Path between two vertices $(u,v)$ in a undirected weighted graph for $n$ instances, when an edg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.