instruction stringlengths 0 29.8k ⌀ |
|---|
|graphs|np-complete|combinatorics|decision-problem| |
null |
null |
I am unable to understand this proof
L is recursively enumerable if and only if L is Turing recognizable
If anyone can prove this, that would be great help |
Need help with a proof: L is recursively enumerable if and only if L is Turing recognizable |
|recursively-enumerable| |
|turing-machines|computability|recursively-enumerable| |
|graphs|np-complete|reference-request|combinatorics|decision-problem| |
Outside computing, a *procedure* is a way of doing things. It usually has specific steps in a specific order, possibly to be executed by different parties.
In computing, an *algorithm* is a way of performing a certain computational task. For instance, [quicksort][1] is an algorithm for inline sorting. In the case of... |
It's hard to give hints without solving the problem for you.
Some general hints:
- When working with regular expressions, the $^+$ sign ("one or more") is a useful shorthand:
$X^+ = XX^* = X^*X$
$X^* = \epsilon \cup X^+$
For instance, in this case, we can write:
$L_1 = L(b^*+b^*a(b+ab^*a)^*... |
If $L$ is recursively enumerable then, given $x \in \Sigma^*$, you can iterate over all $y \in L$ and check whether $x=y$. If that's the case accept, otherwise continue with the next $y$. After examining the last $y \in L$ (if any) reject. If $x \in L$ this eventually accepts. If $x \not\in L$ this either never halts o... |
If $L$ is recursively enumerable then, given $x \in \Sigma^*$, you can iterate over all $y \in L$ and check whether $x=y$. If that's the case accept, otherwise continue with the next $y$. After examining the last $y \in L$ (if any) reject. If $x \in L$, this procedure eventually accepts. If $x \not\in L$ this procedure... |
I am unable to understand this proof
> L is recursively enumerable if and only if L is Turing recognizable
If anyone can prove this, that would be great help |
null |
null |
null |
# Algorithms/Data-Structures to calculate transitive call graphs in the presence of virtual dispatch?
I am trying to write a program to analyze Java programs and figure out the
transitive closure of the callgraph of each main method. Consider the program
below:
```java
class Foo{
void runOne();
void... |
Algorithms/Data-Structures to calculate transitive call graphs in the presence of virtual dispatch? |
|algorithms|graphs|programming-languages|search-algorithms|compilers| |
We show that the minimum dominating set (MDS) problem is $\mathsf{NP}$-hard on $3$-regular triangle-free graphs. We show this by a reduction from the bipartite graphs of maximum degree $3$.
The MDS problem is $\mathsf{NP}$-hard on the bipartite graphs with maximum degree $3$ as shown in [Theorem 6 of this paper](ht... |
We show that the minimum dominating set (MDS) problem is $\mathsf{NP}$-hard on $3$-regular triangle-free graphs. We show this by a reduction from the bipartite graphs of maximum degree $3$.
The MDS problem is $\mathsf{NP}$-hard on the bipartite graphs with maximum degree $3$ as shown in [Theorem 6 of this paper](ht... |
A denotational semantic for the lambda calculus can be given by solving the domain equation
$$
D \simeq [D →_c D]_\bot
$$
in the category of $\omega$-complete CPOs, where $→_c$ denotes the space of $\omega$-continuous functions. The existence of an (initial) solution to this domain equation is a classic result by... |
If I use a [spring system](https://en.wikipedia.org/wiki/Spring_system) to visualize data:
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/r6bhx.png
where the tension between the nodes is proportional to the similarity of nodes in some abstract space, it seems possible that a physics s... |
How hard is it to find a spring network configuration with the lowest energy? |
|complexity-theory|graphs|optimization| |
Proof width (the size of the largest clause in a proof) plays an important part in refuting an unsatisfiable formula. If a formula has a bounded-width resolution proof of its unsatisfiability, then the length of the proof is polynomially bounded, since there are only $O(n^k)$ distinct $k$-clauses over $n$ variables. We... |
If I use a [spring system](https://en.wikipedia.org/wiki/Spring_system) to visualize data:
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/r6bhx.png
where the total tension between the nodes should be minimized, it seems possible that a physics simulation of this graph does not arrive ... |
I have a question I need to give the NFA of the following language: L={w belongs to (a,b)*/w starts with aa or ends with aa} with or being not exclusive meaning I can have a word that starts with aa and ends with aa.
I did this:
[![enter image description here][1]][1]
but if I turn it into the DFA I get this:
... |
nfa of the Language L={w belongs to (a,b)*/w starts with aa or ends with aa} with or being not exclusive |
|formal-languages|automata|finite-automata| |
The incorrect behavior of the DFA comes from the fact that NFA is also wrong.
Look at the initial state: it contains a self-transition labelled $b$. You are effectively "discarding" all leading $b$s.
Instead, your NFA/DFA needs to check whether a word starts with $aa$ and "remember" it (via new states).
Probably ... |
I've been trying to fully understand the paper "Wide Neural Networks of Any Depth Evolve as
Linear Models Under Gradient Descent" (available [here](https://proceedings.neurips.cc/paper/2019/file/0d1a9651497a38d8b1c3871c84528bd4-Paper.pdf)), but I'm stuck on the linearization part, specifically section 2.2. The idea is... |
Understanding gradient flow of a linearized wide neural network |
|neural-networks|kernel-functions| |
I have a question I need to give the NFA of the following language: L={w belongs to (a,b)*/w starts with aa or ends with aa} with or being not exclusive meaning I can have a word that starts with aa and ends with aa.
I did this:
[![enter image description here][1]][1]
but if I turn it into the DFA I get this:
... |
null |
null |
Given a [spring system](https://en.wikipedia.org/wiki/Spring_system):
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/r6bhx.png
where the total tension between the nodes should be minimized, it seems possible that a physics simulation of this graph does not arrive at the lowest energy ... |
|neural-networks|gradient-descent|kernel-functions| |
null |
null |
null |
After asking [this question](https://cs.stackexchange.com/questions/160860/partition-of-two-sets-for-multi-line-fitting-np-hard) on cs.stackexchange, I came across [this question](https://stackoverflow.com/questions/8197845/how-to-fit-more-than-one-line-to-data-points) on stackoverflow where we can read this sentence i... |
Fit of two lines to an arbitrary set of points - NP-Hardness |
|complexity-theory|np-hard|clustering| |
null |
In the context of #P and PP, we have #P complete problems, for example #SAT, however the version I saw proofs this by showing a reduction that keeps the same amount of results but not the same probability. My question is, is it also complete under probability. What I mean by this is this:
Let's define %P as the set ... |
Probability keeping reduction? |
|complexity-theory|np-complete|subset-sum| |
In the context of #P and PP, we have #P complete problems, for example #SAT, however the version I saw proofs this by showing a reduction that keeps the same amount of results but not the same probability. My question is, is it also complete under probability. What I mean by this is this:
Let's define %P as the set ... |
|complexity-theory|np-complete| |
Given a set of points in $\mathbb{R}^d$, my problem consists in fitting two lines by minimizing the sum of the squared euclidean distances between the points and the closer line.
Related to this problem, after asking [this question](https://cs.stackexchange.com/questions/160860/partition-of-two-sets-for-multi-line-f... |
My problem is:
> Given $n$ points in $\mathbb{R}^d$, I want to find a partition of these $n$ points into $k=2$ clusters. For each cluster, instead of computing the centroid as in the usual k-means problem, I construct the one-dimensional subspace (what I call a line) minimizing the sum of squared distances between t... |
null |
In the context of #P and PP, we have #P complete problems, for example #SAT, however the version I saw proofs this by showing a reduction that keeps the same amount of results but not the same probability. My question is, is it also complete under probability. What I mean by this is this:
Let's define %P as the set ... |
In the context of #P and PP, we have #P complete problems, for example #SAT, however the version I saw proofs this by showing a reduction that keeps the same amount of results but not the same probability. My question is, is it also complete under probability. What I mean by this is this:
Let's define %P as the set ... |
In the context of #P and PP, we have #P complete problems, for example #SAT, however the version I saw proofs this by showing a reduction that keeps the same amount of results but not the same probability. My question is, is it also complete under probability. What I mean by this is this:
Let's define %P as the set ... |
null |
I suspect you might be interested in Class Hierarchy Analysis (CHA), Rapid Type Analysis (RTA), or Variable Type Analysis (VTA). These are three methods for efficient construction of a call graph in object-oriented languages like Java. For instance, some of these algorithms are implemented in SOOT.
There is also o... |
A *total dominating set* $S\subset V(G)$ is a set of vertices such that $\forall v\in V(G)$, $v$ has a neighbour in $S$. The *minimum total dominating set* of $G$ is a total dominating set of $G$ of minimum possible size. The *minimum total domination number* of $G$ is represented by $\gamma_t(G)$.It is known that MTDS... |
On hardness of finding total dominating sets in triangle-free graphs |
|graphs|reference-request|np-hard|combinatorics| |
If I go into google browser and type in the name of a website, this is the application layer of the OSI. HTTP protocol is being used and is a request-response, so when exactly does my computer send the request to the server and when do I get the response?
I understand the encapsulation of data until it gets to the p... |
How does OSI model and TCP/IP work? |
|computer-networks| |
I need to solve the following type of problem. I have a list of many connected lines forming a closed contour. But these lines are in random order and I would like to rearrange them in such a way that each line is in the list exactly before and after the two adjacent lines that start and end at the start and end point ... |
Order list of lines to make them form a closed contour |
|algorithms|graph-traversal| |
I need to solve the following type of problem. I have a list of many connected lines forming a closed contour. These lines come as the output of a [MarchingSquare][1] algorithm. Consequently they are lines that have their start and end points on the sides of a grid. Furthermore, the lines never intersect except at the ... |
1. Don't work with distances but with the indexes of the grid edges (assign distinct numbers to all sides, vertical or horizontal). In marching squares, every point is repeated on two neighboring cells, on their shared edge, and there is no more than one point per edge.
2. Generate all line segments and store their ... |
1. Don't work with distances but with the indexes of the grid edges (assign distinct numbers to all sides, vertical or horizontal). In marching squares, every point is repeated on two neighboring cells, on their shared edge, and there is no more than one point per edge.
2. Generate all line segments and store their ... |
null |
I have a degree in maths and i am interested in learning about Convolutional Neural Networks from a mathematical/ theory point of view. Can someone point me towards some resource.
I already have a basic knowledge of Convolutional Neural Networks (and other Neural Networks) |
What is currently the best theoretical book (or notes) about Convolutional Neural Networks? |
|machine-learning| |
Can I suggest Deep Learning from Ian Goodfellow, Yoshua Bengio and Aaron Courvile. It has a whole chapter on Convolutional Neural Networks and the background to all Neural Networks. Furthermore the Bibliography has a list of key papers if you want to dig deeper or into recent developments. |
No, Python is not a context-free language. It is a programming language that follows a syntax defined by a context-sensitive grammar. Context-free languages are a subset of formal languages that can be described by context-free grammars, where the structure of the language is determined solely by the arrangement of i... |
Were _w_ is any string composed over the alphabet $\Sigma = \{0,1\}$.
1. For the first part of the exercise I've tried decomposing the problem into three different ones, mainly the first one is for the string before the 0 the second one for the 0 itself and the third for the rest of the string after the 0. This is w... |
Show that the language $L=\{w|w$ has odd length and the middle symbol is a $0\}$ is Context-Free and constuctd a PDA that accepts it |
|formal-languages|context-free|pushdown-automata|stacks|chomsky-hierarchy| |
Show that the language $L=\{w|w$ has odd length and the middle symbol is a $0\}$ is Context-Free and construct a PDA that accepts it |
Were _w_ is any string composed over the alphabet $\Sigma = \{0,1\}$.
1. For the first part of the exercise I've tried decomposing the problem into three different ones, mainly the first one is for the string before the 0 the second one for the 0 itself and the third for the rest of the string after the 0. This is w... |
Were _w_ is any string composed over the alphabet $\Sigma = \{0,1\}$.
1. For the first part of the exercise I've tried decomposing the problem into three different ones, mainly the first one is for the string before the 0 the second one for the 0 itself and the third for the rest of the string after the 0. This is w... |
**How does the internet works?**
I could answer this question in one sentence or we could be here for hours. But I want to keep things simple and easy to understand.
The internet is literally a mesh of wires spread around the world that connect different devices to each other. Even if you do not see a physical wi... |
The problem is indeed $\mathsf{NP}$-hard on bipartite graphs (which are triangle-tree) of degree at most $3$. See Theorem 6 of [this paper](https://dl.acm.org/doi/abs/10.1145/1655925.1655948). |
In your solution there is no guarantee that the words generated by $S_1$ and $S_2$ will have the same length. The trick is to generate both sides simultaneously:
$$S \to 0S0 \mid0S1 \mid1S0 \mid1S1 \mid 0.$$
As for the second part, there are [mechanical procedures][1] to convert a CFG into a PDA.
[1]: https:... |
if by absurdly there is a 3/2-approximation algorithm for *INDIPENDENT SET* then does there exist a 3/2-approximation algorithm for *VERTEX COVER*?
the implication should be true because independent is reduced to to *VERTEX COVER*, right?
|
if there is a 3/2 approximation algorithm for independent set then there is a 3/2 approximation algorithm for vertex cover? |
|complexity-theory|reductions|approximation|vertex-cover| |
**How does the internet works?**
I could answer this question in one sentence or we could be here for hours. But I want to keep things simple and easy to understand.
The internet is literally a mesh of wires spread around the world that connect different devices to each other. Even if you do not see a physical wi... |
Try to prove it. Don't just assume "it should be true"; write out the proof in detail. Specify the algorithm for finding a 3/2 approximation for Vertex Cover concretely. Provide a proof that its output is a 3/2 approximation.
If you try to do that, you should be able to answer your own question for yourself. |
Suppose I have some sequence of code $C$ in a high level language (C++, Python, Java, etc.) which needs to be converted into machine code which we will call $M$. Obviously machine code varies from system to system, so assume we are on a fixed machine
Under a uniform cost model, we can say that every instruction of $... |
Assuming constant operation cost, are we guaranteed that computational complexity calculated from high level code is "correct"? |
|complexity-theory|time-complexity|asymptotics|compilers| |
null |
Yes, this is reasonable as a first cut approximation. As always, there are caveats.
A theoretical model is a model. It is used for making predictions, but models typically are not perfect, and there are some factors that they don't take into account.
I'm not sure what you mean by function calls, but some functi... |
The answer actually depends on the how many machine operations are utilized by an operation of the high-level language. If each operation of $C$ takes a constant machine operations, then the answer to your questions is *yes*.
However, you can design a high level language that implements a multiplication using addit... |
Based on the same question asked here: https://cs.stackexchange.com/questions/159955/bundle-diameter-calculation-algorithm-with-different-wire-sizes
Best answer was this: https://scipython.com/blog/packing-circles-in-a-circle/
However, there are wires in electrical design that function as a "twisted pair". Is the... |
Bundle diameter calculation algorithm with different wire sizes accounting for twisted pairs? |
|algorithms|mathematical-programming| |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.