instruction stringlengths 0 29.8k ⌀ |
|---|
|graphs|finite-automata|optimization|approximation| |
One very good resource is the [Neural Network FAQ][1]. The question depends a lot on your problem. If the problem is linear in nature, there is no reason to have any hidden layers. If the problem is non-linear, often a single hidden layer with around 10 hidden neurons will do the trick.
There is a very similar quest... |
In s-t directed graph, how to find MANY small cuts? |
**Preface:** This question was originally asked on [Theoretical Computer Science][1], and the kind people there referred me to this web site. It is being repeated here in an attempt to find a satisfying answer.
***
Over the years, two novel encryption techniques have come to mind and been implemented as programmi... |
After implementing a novel encryption algorithm, how would one go about analyzing its security or get help from others in doing so? |
|encryption| |
This is not an answer to your question. But as is [often stated][1] in crypto circles:
> Cryptographic protocols and algorithms are difficult to get right, so do not create your own. Instead, where you can, use protocols and algorithms that are widely-used, heavily analyzed, and accepted as secure. When you must cre... |
Perhaps you mean [PP](http://en.wikipedia.org/wiki/PP_%28complexity%29).
>A language L is in PP if and only if there exists a probabilistic Turing machine M, such that
>
>* M runs for polynomial time on all inputs
>* For all x in L, M outputs 1 with probability strictly greater than 1/2
>* For all x not in L, M... |
Perhaps you mean [PP](http://en.wikipedia.org/wiki/PP_%28complexity%29).
>A language L is in PP if and only if there exists a probabilistic Turing machine M, such that
>
>* M runs for polynomial time on all inputs
>* For all x in L, M outputs 1 with probability strictly greater than 1/2
>* For all x not in L, M... |
[Blache et. al, On Approximation Intractability of the Bandwidth Problem, 1997](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.41.5794&rep=rep1&type=pdf) confirms there is no **PTAS** for the problem unless $\text{P} = \text{NP}$, even for (binary) trees. [Unger W, The Complexity of the Approximation of the B... |
Typically, there are a variety of steps in evaluating a new algorithm. They start with the quick review
- is it already known?
- does it vary only in nonrelevant ways from what is known?
which is commonly enough to show vulnerabilities in many amateur attempts at encryption. The point is that there are a num... |
Regular languages are closed under intersection. This often allows to cut away all parts of a language that are not needed to show non-regularity. Complementation serves a similar purpose: if the original language is "complicated", the complement may be simpler so work with (in terms of other closure properties).
>!... |
|complexity-theory|turing-machines|probabilistic-algorithms| |
|artificial-intelligence|neural-networks|neural-computing| |
The answer to this problem is more general: If you need an expert to review a novel algorithm in a field with which you are not completely familiar, your best bet is to read-up on and study that field long enough until you *become that expert yourself*.
If you're serious enough about your interest in an area, they y... |
|cryptography|encryption| |
Dynamic programming can reduce the time needed to perform a recursive algorithm. I know that dynamic programming can help reduce the time complexity of algorithms. Are the general conditions such that if satisfied by a recursive algorithm would imply that using dynamic programming will reduce the time complexity of the... |
When can I use dynamic programming to reduce the time complexity of my recursive algorithm? |
|algorithms|dynamic-programming| |
null |
Dynamic programming is useful is your recursive algorithm finds itself reaching the same situations (input parameters) many times. There is a general transformation from recursive algorithms to dynamic programming known as *memoization*, in which there is a table storing all results ever calculated by your recursive pr... |
That's impossible. Hint: reduction from the Halting problem. |
How do you check if two algorithms (say, Merge sort and Naïve sort) return the same result for any input, when the set of all inputs is infinite? |
How do you check if two algorithms return the same result for any input? |
|untagged| |
|computability|formal-methods|software-engineering| |
It's impossible in general, but many constraints can make it possible. For example, you can check the equivalence of two straight-line code programs using BDDs. Symbolic execution can handle many other cases. |
null |
To elaborate slightly on the "it's impossible" statements, here's a simple proof sketch.
We can model algorithms with output by Turing Machines which halt with their output on their tape. If you want to have machines that can halt by either accepting with output on their tape or rejecting (in which case there's no o... |
In contrast to what the nay-sayers say, there are many effective techniques for doing this.
* Bisimulation is one approach. See for example, Gordon's paper on [Coinduction and Functional Programming][1].
* Another approach is to use operational theories of program equivalence, such as the work of [Pitts][2].
*... |
In contrast to what the nay-sayers say, there are many effective techniques for doing this.
* Bisimulation is one approach. See for example, Gordon's paper on [Coinduction and Functional Programming][1].
* Another approach is to use operational theories of program equivalence, such as the work of [Pitts][2].
*... |
I need to recover a data block from a repeated stream of data. I'm looking to see what algorithms may already exist for this as it does not feel like a novel situation.
Here are the specifics:
1. There is an N-length block of data contained in a stream
2. The block is repeated many times in the stream
3. the... |
Block detection in repeated stream |
|algorithms| |
Not only encryption schemes can have randomness, but in some cases (e.g., [public-key][pk] encryption), they **must** be randomized. This is not a problem since we require an encryption scheme to be **correct**, that is, for any message $m$ and any key $k$ it holds that
$$\Pr \big[\ \text{DEC} \left( \ \text{ENC}\lef... |
To elaborate slightly on the "it's impossible" statements, here's a simple proof sketch.
We can model algorithms with output by Turing Machines which halt with their output on their tape. If you want to have machines that can halt by either accepting with output on their tape or rejecting (in which case there's no o... |
First, I must agree with Dave's answer: In order to be able to compose a proper cipher, one needs to be knowledgeable enough about *analyzing* ciphers. Otherwise, there is a high probability that your cipher suffers from well known attack, and you will be considered as a crank.
That being said, there are several gr... |
null |
I have to make a quick clustering program but the following formula is gibberish to me:
> $Perf(X,C) = \sum\limits_{i=1}^nMin\{||X_i-C_l||^2 | l = 1,...,K\}$
>
> **WHERE:** X is a set of multi-dimensional data and C is a set of centroids for each data cluster.
This formula is a fitness function for an ***Art... |
What does this formula mean? |
|algorithms|matrices| |
Just break it down into parts:
>$ { f(l) | l = 1,...,K } $
This is a simple set construction. The above would simply create a set with all the elements from 1 to K. In your case the `f(l)` is the function:
>$ ||X_i-C_l||^2 $
Given the `||` means the norm, these are vectors you are subtracting (rows of the... |
I try to solve the following coverage problem.
>There are $n$ transmitters with coverage area of 1km and $n$ receivers. Decide in $O(nlogn)$ that all receivers are covered by any transmitter. All reveivers and transmiters are represented by their $x$ and $y$ coordinates.
The most advanced solution I can come wit... |
Coverage problem (transmitter and receiver) |
|algorithms|computational-geometry|search-problem| |
I try to solve the following coverage problem.
>There are $n$ transmitters with coverage area of 1km and $n$ receivers. Decide in $O(n\log n)$ that all receivers are covered by any transmitter. All reveivers and transmiters are represented by their $x$ and $y$ coordinates.
The most advanced solution I can come w... |
The answer to this problem is more general: If you need an expert to review a novel algorithm in a field with which you are not completely familiar, your best bet is to read-up on and study that field long enough until you *become that expert yourself*. And by "expert" I mean somebody that does research and publishes i... |
null |
**Preface:** This question was originally asked on [Theoretical Computer Science][1], and the kind people there referred me to this web site. It is being repeated here in an attempt to find a satisfying answer.
***
Over the years, two novel encryption techniques have come to mind and been implemented as programmi... |
null |
The problem is to find a line that passes through $p$ and has all the other points in $S$ on one side. This is a two-dimensional linear-programming problem, so it can be solved in $O(n)$ time using [textbook geometric algorithms](http://w3.jouy.inra.fr/unites/miaj/public/vigneron/cgcourse/cs372l09.pdf).
But let me de... |
|algorithms|evolutionary-computing| |
I have to make a quick clustering program but the following formula is gibberish to me:
> $Perf(X,C) = \sum\limits_{i=1}^nMin\{||X_i-C_l||^2 \mid l = 1,...,K\}$
>
> **WHERE:** X is a set of multi-dimensional data and C is a set of centroids for each data cluster.
This formula is a fitness function for an [ar... |
Just break it down into parts:
>$ \{ f(l) \mid l = 1,...,K \} $
This is a simple set construction. The above would simply create a set with all the elements from 1 to K. In your case the `f(l)` is the function:
>$ ||X_i-C_l||^2 $
Given the `||` means the norm, these are vectors you are subtracting (rows of... |
If you remove all short-hands resp. unfold the notation, you get
$\qquad \begin{align}
\operatorname{Perf}(X,C) = \quad &\min \{ ||X_1−C_1||^2, ||X_1−C_2||^2, \dots, ||X_1−C_K||^2 \} \\
+ &\min \{ ||X_2−C_1||^2, ||X_2−C_2||^2, \dots, ||X_2−C_K||^2 \} \\
&\ \ \vdots \\
+ &\min \{ ||X_n−C_1||^2, ||X_n−C_2||^2, ... |
|algorithms|terminology|evolutionary-computing| |
It is impossible to devise an algorithm that does prove this equality in general. Hint: reduction from the Halting problem. |
|computability|formal-methods|software-engineering|software-verification| |
What does this performance formula mean? |
I have to make a quick clustering program but the following formula is gibberish to me:
> $\operatorname{Perf}(X,C) = \sum\limits_{i=1}^n\min\{||X_i-C_l||^2 \mid l = 1,...,K\}$
>
> where $X$ is a set of multi-dimensional data and $C$ is a set of centroids for each data cluster.
This formula is a fitness func... |
Not only *can* encryption schemes have randomness, but in some cases (e.g., [public-key][pk] encryption), they **must** be randomized. This is not a problem since we require an encryption scheme to be **correct**, that is, for any message $m$ and any key $k$ it holds that
$$\Pr \big[\ \text{DEC} \left( \ \text{ENC}\l... |
|algorithms|online-algorithms| |
I think what you want is impossible to do without further assumptions on `F`.
Consider the following, rather simple data stream for a target data length of `5`:
123441233512245113451255513555 ...
Note that not a single block contains `12345` (our original data). In order to find a proper combination of dat... |
|algorithms|online-algorithms|communication-protocols| |
Just to cite an example, in [RSA encryption][1], you need to generate two primes $p$ and $q$ and an integer $e$ which will be used to create your public and private keys.
If you generate any of these values in a deterministic way, then their generation can be reproduced, potentially compromising your encryption. If ... |
|algorithms|dynamic-programming|algorithm-design| |
If you just seek to speed up your recursive algorithm, [memoisation](https://en.wikipedia.org/wiki/Memoisation) might be enough. This is the technique of storing results of function calls so that future calls with the same parameters can just reuse the result. This is applicable if (and only if) your function
* do... |
|algorithms|dynamic-programming|efficiency|algorithm-design| |
|complexity-theory|terminology|turing-machines|probabilistic-algorithms| |
In the usual definition of probabilistic poly-time machine it is said that the machine halts in polynomial time for all inputs.
Is the intention really to say that the machine halts for all inputs, or that if it halts it must be in polynomial time? |
Probabilistic poly-time machine always halts on all inputs? |
|algorithms|graphs|optimization|approximation| |
Solving the [maximum flow problem](https://en.wikipedia.org/wiki/Maximum_flow_problem) yields one qualified minimal cut. But I want several (maybe hundreds) small cuts as candidates. The cuts don't have to be minimum cuts, as long as they are small (in weight). How do I do that? |
In s-t directed graph, how to find many small cuts? |
I'm trying to prove that every well-balanced [orientation](https://en.wikipedia.org/wiki/Strong_orientation) of an [Eulerian graph](https://en.wikipedia.org/wiki/Eulerian_graph) is Eulerian.
I want to prove it by showing that for any two vertices $u$ and $v$, their local arc connectivities coincide, that is
$\qqu... |
How to prove every well-balanced orientation of an Eulerian graph is Eulerian? |
The problem is to find a line that passes through $p$ and has all the other points in $S$ on one side. This is a two-dimensional linear-programming problem, so it can be solved in $O(n)$ time using [textbook geometric algorithms](http://w3.jouy.inra.fr/unites/miaj/public/vigneron/cgcourse/cs372l09.pdf).
But let me de... |
I need to recover a data block from a repeated stream of data. I'm looking to see what algorithms may already exist for this as it does not feel like a novel situation.
Here are the specifics:
1. There is an N-length block of data contained in a stream
2. The block is repeated many times in the stream
3. the... |
Would it be useful to propose that a universal analog system could be modelled by an infinite neural net i.e. Any other analog system input/output values can be replicated matched neural network for a given operation, and operations can be chained as required?
While I did formulate this thought on my own, a subseque... |
For my pet project I need to cluster some data which could be easily represented as graph, so I want to use this as an opportunity to educate myself and play with various algorithms. I'd prefer the book on graph clustering as it often more self contained but articles are fine too. Back in the days I used to work in the... |
Could someone suggest me a good introductory book or an article on graph clustering? |
|graphs| |
The problem is to find a line that passes through $p$ and has all the other points in $S$ on one side. This is a two-dimensional linear-programming problem, so it can be solved in $O(n)$ time using [textbook geometric algorithms](http://w3.jouy.inra.fr/unites/miaj/public/vigneron/cgcourse/cs372l09.pdf).
But let me de... |
|algorithms|graphs|reference-request| |
null |
|algorithms|graphs|reference-request|books| |
The book [The Elements of Statistical Learning][1] by Trevor Hastie,
Robert Tibshirani and
Jerome Friedman covers a lot of learning and clustering algorithms including various graph clustering algorithms. Algorithms such as Spectral Clustering are phrased algebraically, as is much of the book. The good thing is that ... |
We receive a stream of $n-1$ pairwise dierent numbers from the set $\left\{1,...,n\right\}$.
How can i show, how to determine the missing number with an algorithm that reads the stream once and uses a memory of only $O(log_2 n)$ |
Streaming data (algorithm) |
|algorithms| |
We receive a stream of $n-1$ pairwise different numbers from the set $\left\{1,...,n\right\}$.
How can I show how to determine the missing number with an algorithm that reads the stream once and uses a memory of only $O(log_2 n)$? |
We receive a stream of $n-1$ pairwise different numbers from the set $\left\{1,...,n\right\}$.
How can I show how to determine the missing number with an algorithm that reads the stream once and uses a memory of only $O(log_2 n)$ bits? |
We say that a [probabilistic Turing machine][1] M runs in time T(n) if *for any input x* M halts in less than T(|x|) steps independently of the random choices it makes during the computation (worst case over all possible computation paths).
For example, the most general definition of *Probabilistic Polynomial-time*,... |
null |
How do you check if two algorithms (say, Merge sort and Naïve sort) return the same result for any input, when the set of all inputs is infinite?
**Update:** Thank you [Ben](http://cs.stackexchange.com/a/2062/1638) for describing how this is impossible to do algorithmically in the general case. [Dave's answer](http:... |
I know that there are non-regular languages, so that L* is regular, but all examples I can find are context senitive but not context free.
In case there are none how do you proof it? |
Is there a context free, non-regular language L, so that L* is regular? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.