instruction stringlengths 0 29.8k ⌀ |
|---|
Can protein folding destroy cryptography? |
null |
They say that [protein folding][1] is an [NP-hard][2] problem, meaning that if we could figure out how any protein folds, we could solve any NP problem in polynomial time. However, doesn't this basically destroy the field of cryptography?
Suppose I want to factor a large [semiprime][3]. Couldn't I convert it into a ... |
If there is no calculus,we can't solve a problem like “surface area”.
Is there some math problem that can be solved thanks to category theory?
If there is no such math problem, it means that category theory is an “abstract theory”:it can explain things clearly, but without it, man can solve the same problems too,... |
Is there some math problem that must use category theory to solve? |
Why does Python behave so absurdly when dealing with numbers with decimal points? |
null |
In the book *The Algorithm Design Manual$^{[1]}$*, the author writes:
> Power in any hierarchically structured organization is reflected by a tree,
where each node in the tree represents a person, and edge $(x, y)$ implies that $x$ directly supervises (or dominates) $y$. *The person at the root sits at the “top of t... |
Why is the heap data structure called 'heap'? |
|data-structures|terminology|heaps| |
null |
We consider languages over the alphabet {a,b,c}. Given a character t in the alphabet and a non-negative integer j, by t^j we mean the string consisting of exactly j occurrences of t.
Now let m be an unknown but fixed positive integer in the following language definitions:
L1 = { a^n a^n | n <= m }
L2 = { a^n b... |
Which language can be parsed recursive decents? |
|formal-languages|parsers|chomsky-hierarchy| |
I'm doing Neural Architecture Search (NAS) by varying the number of layers and neurons per layer for a neural network (connections are feed-forward throughout), and then training it on a fixed task to test its performance. The end goal is to perform topological data analysis (TDA) on the best and worst architectures (g... |
Analyzing network architecture with TDA |
|machine-learning|network-topology| |
Yes, this is correct, due to the computational equivalence of nondeterministic turing machines to deterministic ones. You can try all possible certificates in exponential time. |
null |
null |
I know that by definition, all NP problems can be reduced to NP-Complete problems. But does that also applies the other way around?
Can all NP-Complete be reduced to NP problems?
My understanding is that it cannot be done, since that would mean that both are equally complex, therefore NP=NP-Complete.
But the a... |
Can all NP-complete problems be reduced to NP? |
|complexity-theory|np-complete|np| |
null |
I realize that Java bytecode uses (absolute/relative) address offset instead of (symbolic) labels in its jumping instructions such as `goto`. Then I know that backpatching is indeed useful during intermediate code generation. (*Maybe* JavaCC uses backpatching.) |
null |
Let's say we have boolean functions $f_1, \cdots, f_n$, each of which operates on pairwise disjoint variables (i.e. the variables for each function are unique to that function). Then, how can we show that $L(f_1 \oplus \cdots \oplus f_n) \geq \frac{1}{2}\sum_{i = 1}^n L(f_i)$ (where we use the De Morgan basis)? Here, w... |
null |
I want to prove that if a graph is 2-vertex-connected, then it can be produced by $K_3$ (the simple triangle), using only edge division ("splitting" an edge, $(u,v)$, by creating a new vertex, $x$, deleting the edge $(u,v)$ and adding the edges $(u,x),(x,v)$) and edge addition (just adding any edge).
I want to prove... |
If a graph is 2-vertex-connected, then it can be produced by $K_3$, using only edge division and addition |
|graphs| |
> I know that by definition, all NP problems can be reduced to NP-Complete problems.
This is wrong.
The definition of NP-complete is as follows:
> If a problem is NP *and* all other NP problems are polynomial-time reducible to it, the problem is NP-complete.
By this definition, each NP-complete problem is a... |
The only way to know is to try it; or to find someone else who has tried it (e.g., by searching the research literature for a published paper that has tried this approach). |
{"Voters":[{"Id":79440,"DisplayName":"Nathaniel"},{"Id":755,"DisplayName":"D.W."}],"SiteSpecificCloseReasonIds":[5]} |
Give a real world, normalized example where table T1 has primary key (A, B), T2 has primary key (B, C) and T3 has primary key (A, C) and table 4 has a primary key (A, B, C) where (A,B) is a foregin key on T1, (B, C) is a foregin key on T2, and (A, C) is a foregin key on T3?
The motivation is this form is allowed i... |
null |
Can you enumerate the set of all words over a finite alphabet? |
Can you enumerate the set of all words over a finite alphabet? |
|complexity-theory|regular-languages| |
**Hint:**
The set of words of length $l$ is made of all strings of length $l-1$ appended with one of the letters.
Check that
- they are all different,
- none is missing.
|
null |
We consider languages over the alphabet {a,b,c}. Given a character t in the alphabet and a non-negative integer j, by t^j we mean the string consisting of exactly j occurrences of t.
Now let m be an unknown but fixed positive integer in the following language definitions:
L1 = { a^n a^n | n <= m }
L2 = { a^n b... |
Which language can be parsed recursive descent? |
I have a list of $n$ items, labeled $1$ to $n$, where each item gives a score to every other item, so I get a square matrix of scores. Each vote is a natural number. Items also score themselves. Example:
$$
\begin{array}{c|lcr}
scores & 1 & 2 & 3 & 4 \\
\hline
1 & 3 & 3 & 9 & 11 \\
2 & 7 & 1 & 12 & 5 \\
3 & 11... |
Algorithm: sorting a set of numbers based on a "score matrix" |
|algorithms|sorting| |
null |
null |
They say that [protein folding][1] is an [NP-hard][2] problem, meaning that if we could figure out how any protein folds, we could solve any NP problem in polynomial time. However, doesn't this basically destroy the field of cryptography?
Suppose I want to factor a large [semiprime][3]. Couldn't I convert it into a ... |
null |
Just take $L = \{ 0x \mid x \in L_1 \} \cup \{ 1y \mid y \in L_2\}$. |
null |
I have a list of $n$ items, labeled $1$ to $n$, where each item gives a score to every other item, so I get a square matrix of scores. Each vote is a natural number. Items also score themselves. Example:
$$
\begin{array}{c|lcr}
scores & 1 & 2 & 3 & 4 \\
\hline
1 & 3 & 3 & 9 & 11 \\
2 & 7 & 1 & 12 & 5 \\
3 & 11... |
I have a list of $n$ items, labeled $1$ to $n$, where each item gives a score to every other item, so I get a square matrix of scores. Each vote is a natural number. Items also score themselves. Example for $n=4$:
$$
\begin{array}{c|lcr}
scores & 1 & 2 & 3 & 4 \\
\hline
1 & 3 & 3 & 9 & 11 \\
2 & 7 & 1 & 12 & 5 ... |
null |
Your answer is basically correct. As Arno says, your confusion arises from not being careful with quantifiers.
There are two possible versions of the question, and neither you nor the user in the linked thread made it very clear which one is the intended one.
Version 1: "Given an NP-complete problem A, *does there ... |
Your answer is basically correct. As Arno says, your confusion arises from not being careful with quantifiers.
There are two possible versions of the question, and neither you nor the user in the linked thread made it very clear which one is the intended one.
Version 1: "Given an NP-complete problem A, *does there ... |
I need to create a randomized function between two participants, 1 and 2. The two participants have both n bit sized strings, and they want to determine whatever they have the same strings.
1 and 2 can communicate using only log(n) bits. The probability of error should be at most 1/3, but the function can be run mult... |
Create a randomized function with a communication size restriction |
|randomized-algorithms|pseudo-random-generators| |
Randomized function with a communication size restriction |
One thing I do during compilers I've written is backpatching for recursive closures:
```
def foo(x):
def bar():
bar(x-1)
another_function(bar)
```
The closure for `bar` needs to call itself, but we don't know where we are until we're done compiling the function. So we emit a placeholder, and then onc... |
One thing I do during compilers I've written is backpatching for recursive closures (in ML syntax):
```
let c = 333 in
let rec f1 x = f2 (x - c)
and f2 x = f1 (x - c)
in
f1 3
```
This compiles down into something like:
```
f1 = make_closure(c, f2 <-- f2 doesn't exist yet, so this is a placeholder)... |
One thing I do during compilers I've written is backpatching for recursive closures (in ML syntax):
```
let c = 333 in
let rec f1 x = f2 (x - c)
and f2 x = f1 (x - c)
in
f1 3
```
This compiles down into something like:
```
f1 = make_closure(c, f2 <-- f2 doesn't exist yet, so this is a placeholder)... |
I came across a modification of the classic house robber problem where there is a cost to robbing each house, and we want to maximize the amount robbed using the array (exactly as in the original problem) but with the added constraint that we now have some array C, and C[i] is the cost to rob a particular house. We do... |
House Robber Problem Variation with Risk/Cost to Rob Each House |
|dynamic-programming| |
There are many papers on document structure analysis. I suggest you read them, rather than trying to reinvent the wheel. As they say, a week in the lab can save a day in the library.
I think there may be some misconceptions. The way we evaluate neural networks is by trying them on a representative workload to see... |
null |
null |
Of course. One way is to enumerate all the words of length 0 (if you consider them words), then all the words of length 1, then all the words of length 2, and so on.
Obviously, the set is infinite, so the enumeration never ends, but every word is enumerated at a finite step in the process. |
I have a list of $n$ items, labeled $1$ to $n$, where each item gives a score to every other item, so I get a square matrix of scores. Each score is a natural number. Items also score themselves. Example for $n=4$:
$$
\begin{array}{c|lcr}
scores & 1 & 2 & 3 & 4 \\
\hline
1 & 3 & 3 & 9 & 11 \\
2 & 7 & 1 & 12 & 5... |
A colleague and I with pretty low-grade practical backgrounds decided it's time to try learning theory. This question is asked in a slide-deck he tracked down somewhere or another online without an answer to go with it. We're both leaning towards a simple disproof by Counter-Example:\
$A = {a,b}$\
$B = {ab,a,b}$\
Bu... |
Languages: Prove or Disprove that $A* = B* \rightarrow A=B$ |
|formal-languages|kleene-star| |
A colleague and I with pretty low-grade practical backgrounds decided it's time to try learning theory. This question is asked in a slide-deck he tracked down somewhere or another online without an answer to go with it. We're both leaning towards a simple disproof by Counter-Example:\
$A = \{a,b\}$\
$B = \{ab,a,b\}\$... |
Languages: Prove or Disprove that $A^* = B^* \rightarrow A=B$ |
A colleague and I with pretty low-grade practical backgrounds decided it's time to try learning theory. This question is asked in a slide-deck he tracked down somewhere or another online without an answer to go with it. We're both leaning towards a simple disproof by Counter-Example:\
$A = \{a,b\}$\
$B = \{ab,a,b\}$\... |
null |
1) Compute the size of nodes A, B of the following tree [![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/ba1dC.png |
I have a list of $n$ items, labeled $1$ to $n$, where each item gives a score to every other item, so I get a square matrix of scores. Each score is a natural number. Items also score themselves. Example for $n=4$:
$$
\begin{array}{c|lcr}
scores & 1 & 2 & 3 & 4 \\
\hline
1 & 3 & 3 & 9 & 11 \\
2 & 7 & 1 & 12 & 5... |
If $A$ and $B$ are indeed meant to be alphabets here, they would contain only symbols, and your counterexample isn't valid. In fact, if $A$ and $B$ are alphabets, the claim is true.
However, I would rather expect $A$ and $B$ to be formal languages here, in which case you have found a perfectly reasonable counterexam... |
null |
I don't think you'd ever have to backpatch a control flow address in intermediate code, where you'd at best have abstract labels. One of the reasons we have intermediate code is not to have to do irrelevant low-level things like that in the compiler.
However, we can generalize. Intermediate code may be processed suc... |
null |
null |
The ad-hoc algorithm for the problem with $m$ horizontal and $n$ vertical line segments might be the following one:
**Step 1**. Project beginning and ending points of all segments on the $OX$ axis and create an array of ***events***, corresponding to $x$-coordinates of these points. Each event consists of three comp... |
The ad-hoc algorithm for the problem with $m$ horizontal and $n$ vertical line segments might be the following one:
**Step 1**. Project beginning and ending points of all segments on the $OX$ axis and create an array of ***events***, corresponding to $x$-coordinates of these points. Each event consists of three comp... |
null |
null |
Just use an exact algorithm for the directed Steiner tree problem. Being NP-hard does not matter, in practice you will get optimal solutions to huge problems. See the following software:
https://scipjack.zib.de/ |
I want to extend $\alpha$-equivalence to cover substitution.
That is, I will implement `runSubst_Term : Subst -> Tm -> Tm` and prove:
```coq
Theorem runSubst_Term_main_property (sub : Subst) (tm : Tm)
: AlphaSubst sub tm (runSubst_Term sub tm).
```
where the definitions of `Subst`, `Tm`, `AlphaSubst` are belo... |
I want to extend $\alpha$-equivalence to cover substitution.
That is, I will implement `runSubst_Term : Subst -> Tm -> Tm` and prove:
```coq
Theorem runSubst_Term_main_property (sub : Subst) (tm : Tm)
: AlphaSubst sub tm (runSubst_Term sub tm).
```
where the definitions of `Subst`, `Tm`, `AlphaSubst` are belo... |
_I hope this is the correct subpage of SE, if not please direct me to the more appropriate place._
Imagine the following scenario:
You are put into a random but known position inside a given maze. The maze contains, in addition to walls (█) and pathways (.), the following things:
- R - A **refresh point** whic... |
Pathfinding in a known maze with step limitations, points of interest and more |
|algorithms|graphs|path|maze| |
I have a list of $n$ items, where each item gives a score to every other item, so I get a $n\times n$ square matrix $M$ of scores. Each score is a natural number. Items also score themselves. Example for $n=4$:
$$
\begin{array}{c|lcr}
scores & A & B & C & D \\
\hline
A & 3 & 3 & 9 & 11 \\
B & 7 & 1 & 12 & 5 \\
... |
null |
null |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.