instruction
stringlengths
0
29.8k
⌀
null
There are two things that I think is wrong with your example, hence your argument. First the string $s = (01)^{p-1}1$ *may not* always produce a string from $L = \{ s | \text{ such that } s \text{ ends in 11} \}$ since in the statement for the pumping lemma, $p \ge 1$. So in your case if $p = 1$ then $s$ is just $1$. ...
There are two things that I think is wrong with your example, hence your argument. First the string $s = (01)^{p-1}1$ *may not* always produce a string from $L = \{ s | \text{ such that } s \text{ ends in 11} \}$ since in the statement for the pumping lemma, $p \ge 1$. So in your case if $p = 1$ then $s$ is just $1$. ...
null
I’m reading Leslie Lamport’s white paper, “[Time, clocks, and the ordering of events in a distributed system][1]”. His explanation for total ordering has me a bit confused in the following excerpt. [![enter image description here][2]][2] 1. I've interpreted this as if event x's timestamp is less than event y ...
Can a distributed system designed with logical clocks truly derive a total ordering of events?
|distributed-systems|clocks|
null
I was wondering if there are any mathematical functions or algorithms that take a known minimum amount of time to calculate. The closest thing I could find to this is Proof of Work algorithms used for blockchain, but the speed at which hashes for these are calculated is affected by device hardware. I'm interested to kn...
Function / Algorithm that take fixed time to compute
|time-complexity|runtime-analysis|
There are two types of sets $\mathcal{X} = \{X_{1}, X_{2}, \ldots, X_{n_{1}} \}$ and $\mathcal{Y} = \{Y_{1}, Y_{2}, \ldots, Y_{n_{2}}\}$ such that $X_i, Y_j \subseteq [m]=[\mathrm{poly}(n)]$ and $n = n_{1} + n_{2}$. Given a sequence $\alpha$ over $\mathcal{X} \cup \mathcal{Y}$, the goal is to find the longest (increas...
The Mizar system is a huge repository of math proofs. See the [wikipedia][1] page and the [official website][2]. > of all of the known mathematical proofs that can be expressed using English statements From [wikipedia/Mizar_system#Mizar_language][3]: > The distinctive feature of the Mizar language is its reada...
null
There is no complexity class for this, at least none of which I am aware of. Anyway, I would not define embarassingly parallel computations like this: basically, your second term $O(log(g(n))$ does not exist for embarassingly parallel computations. Indeed, by definition, if the computation is embarassingly parallel, th...
null
put this code into https://turingmachine.io/ ``` name: Binary to Decimal source code: | input: '100#' blank: ' ' B : ' ' start state : Right table: Right : [0,1] : R '#' : {L : q0} q0: 0 : {write : 1, L} 1 : {write : 0, R : q1} ' ' : {R : clear} q1...
null
Here is an example: When you unlock an iPhone, you enter a passcode, and the passcode needs to be checked. That takes exactly 80ms, no matter how fast your phone is. Why? To check the passcode, the passcode is hashed n times, and then the hashed passcode isn't just checked, but used to decrypt a key, and if the pas...
null
In the SKI combinator calculus, Kxy returns the constant function which always returns x. Since y is always ignored, why not just define K as having a single parameter, namely, x? What is the purpose of having a variable y which is guaranteed to be ignored by K? I'm guessing that there would be some deleterious effect ...
K in SKI combinator calculus: why doesn't it take one parameter since it ignores its second?
|logic|combinatory-logic|
null
Maybe it would help to think about it comparing to functions: $K$ can be interpreted as the function with two arguments that returns the first. In Python, it would be ```python def K(x, y): return x ``` $I$ is the identity function. It can be written as: ```python def I(x): return x ``` Are...
In the SKI combinator calculus, Kxy returns the constant function which always returns x. Since y is always ignored, why not just define K as having a single parameter, namely, x? What is the purpose of having a variable y which is guaranteed to be ignored by K? I'm guessing that there would be some deleterious effect ...
In the SKI combinator calculus, Kxy returns the constant function which always returns x. Since y is always ignored, why not just define K as having a single parameter, namely, x? What is the purpose of having a variable y which is guaranteed to be ignored by K? I'm guessing that there would be some deleterious effect ...
If I understand what you are asking, I don't believe this is likely to be possible. It is possible you might be interested in timelock puzzles, which address some of the issues you raise with [proof-of-work](https://en.wikipedia.org/wiki/Proof_of_work) and [computational puzzles](https://en.wikipedia.org/wiki/Client_P...
null
null
null
I apologise if I did not use the terminology entirely correctly in the title - this problem seems to me quite similar to an assignment problem, and likely something that occurs in real life in business. **The problem**: - In this problem we have a set of assets (in the economics/finance sense) $\left\{ a_i \right\...
A kind of generalised assignment problem where we minimise error relative to a goal "weight"/"value"
|algorithms|optimization|combinatorics|assignment-problem|
I apologise if I did not use the terminology entirely correctly in the title - this problem seems to me quite similar to an assignment problem, and likely something that occurs in real life in business. **The problem**: - In this problem we have a set of assets (in the economics/finance sense) $\left\{ a_i \right\...
I apologise if I did not use the terminology entirely correctly in the title - this problem seems to me quite similar to an assignment problem, and likely something that occurs in real life in business. **The problem**: - In this problem we have a set of assets (in the economics/finance sense) $\left\{ a_i \right\...
I apologise if I did not use the terminology entirely correctly in the title - this problem seems to me quite similar to an assignment problem, and likely something that occurs in real life in business. **The problem**: - In this problem we have a set of assets (in the economics/finance sense) $\left\{ a_i \right\...
A kind of generalised assignment problem where we minimise error relative to a goal "weight"/"value" - how to solve it?
I apologise if I did not use the terminology entirely correctly in the title - this problem seems to me quite similar to an assignment problem, and likely something that occurs in real life in business. **The problem**: - In this problem we have a set of assets (in the economics/finance sense) $\left\{ a_i \right\...
It is known that the general traveling salesman problem is NP-hard. Even when the distances follow the triangle inequality. But let's take the problem very literally. There are actual cities (points) on a 2-d euclidean space and a tour must be devised to visit all of them in the smallest total distance. We are given th...
Is the traveling salesman on a map NP-hard?
|np|graph-traversal|traveling-salesman|
null
null
This is called the Geometric Traveling Salesman problem. It was proved to be NP-complete by Garey, Graham and Johnson in 1976 and Papadimitriou in 1977. Source: *Computers and Intractability* (Garey and Johnson)
The Mizar system is a huge repository of math proofs. See the [wikipedia][1] page and the [official website][2]. > of all of the known mathematical proofs that can be expressed using English statements From [wikipedia/Mizar_system#Mizar_language][3]: > The distinctive feature of the Mizar language is its reada...
null
null
null
null
Is there a reason why you cannot use flash memory as a HD? Less moving parts and more affordable. Whats not to like? Why dont we see Pci-express cards with a couple of terrabytes of flash memory that you can use as a HD?
Is there any reason why you cannot use flash memory for a hard disk?
|memory-hardware|
null
The first flash disk was introduced in 1987. That's 36 years ago. https://en.wikipedia.org/wiki/Solid-state_drive#Flash-based_SSDs So, no, there is no reason.
If L is NP-complete then how can I prove that $L_1$: $L_1= (1$ { $0, 1$ }$^∗) \cup ${ $0x | x \in L$} is also NP- complete. My thoughts: A reduction from (for example) SAT to L can be converted to a reduction to { $0x | x \in L$} by adding a 0 to the output.
$L_1= (1$ { $0, 1$ }$^∗) \cup ${ $0x | x \in L$} is NP- complete
|np-complete|reductions|np|
There is a somewhat trivial reduction from $L$ to $L_1$… Consider $x\in \Sigma^*$. Then $x\in L \Leftrightarrow 0x\in L_1$. Clearly this reduction is polynomial. I am sure that you can prove that $L_1\in \mathsf{NP}$.
I have a PhD in theoretical physics, where I had worked on mathematical models of hydrodynamics around compact objects. I have basic knowledge of programming in C/C++ and Python. Currently, I am more interested in computational work, particularly on numerical simulations and machine learning algorithms for data mining ...
How to get started with computational research after a PhD in Physics?
|machine-learning|career|
The question is in the title. What do you call "root nodes" in directed graphs. Is there a commonly accepted term? "Root" implies there's only one, which is not the case. I've scanned half a dozen glossaries before asking. I'm starting to suspect that no, there's no agreed moniker.
In a directed acyclic graph, what do you call the nodes with in-degree zero?
|graphs|
I am working currently on Path-Packing problems and found this Book: https://jeffe.cs.illinois.edu/teaching/algorithms/book/Algorithms-JeffE.pdf My question is about exercise 23b on page 184. I was able to show with Greedy that I can find a maximum vertex-disjoint set of paths of length $k$ but only if we assume...
Find maximum number of vertex-disjoint pathes of length $k$ in a tree with no restrictions for the pathes
|dynamic-programming|trees|
The proof contains two main statements: 1. prove that $RE$ (the set of all semi-decidable languages) is closed under $\le_{m}$ reduction (many-one reduction). It means that if we have a reduction $L_{1} \le_{m} L_{2}$ and $L_{2} \in RE$, then $L_{1} \in RE$. (**hint**: construct a recognizer for $L_{1}$ using TM for a...
I'm interested in this functions \begin{align*} g(m) &= \begin{cases} \text{defined} & \text{if turing machine $m$ computes $g$} \\ \text{defined} & \text{if turing machine $m$ loops on $m$} \\ \text{undefined} & \text{otherwise} \\ \end{cases} \end{align*} \begin{align*} f(m,n) &=...
Is there an unsound solution to the halting problem that makes the following functions computable?
|turing-machines|halting-problem|termination|
null
The class DP is defined as the set of languages L for which there are two languages $L1 \in NP$ , $L2 \in coNP$ such that $L = L1 \cap L2$. (Do not confuse DP with $NP \cap coNP$, which may seem superficially similar.) Show that (a) EXACT INDSET ∈ DP. (b) Every language in DP is polynomial-time reducible to EX...
EXACT INDSET is DP-complete
|np-complete|np|complexity-classes|induction|co-np|
Prefetching is a task that the compiler feels like it should be suited for. Prefetching requires knowing in advance what data the program is about to load, and the compiler has a ton of information at its disposal about control flow and what data the program is likely to access in the new future. And yet, when I cou...
Can compilers improve performance in real workloads by inserting prefetches in their output?
|compilers|cpu|cpu-cache|
I believe the common term for that is [**source**](https://mathworld.wolfram.com/Source.html).
I believe the common term for that is [**source**](https://mathworld.wolfram.com/Source.html). While a node with 0 out-degree is called a [**sink**](https://mathworld.wolfram.com/DigraphSink.html).
Hint: show that $\texttt{EXACT INDSET} = \texttt{INDSET}\cap L$ with $L = \{\langle G, k\rangle \mid G \text{ has no independent set of size }\geqslant k + 1\}$ and show that $L$ is $\text{co}\mathsf{NP}$-complete.
I have the following alphabet $\Sigma = \{0,\dots,9\}$ and the following language over $\Sigma \cup \{\#\}$: $$L=\{\#w \ |\ w \in\Sigma^*,\sum_{i\geq1}^{10}w_i\ \text{is prime}\}\\$$ This language represents all numbers wich have a prime as digit sum. I now want to show that this language is not context free. I wan...
How to use the Pumping Lemma to show that a language is not context free?
|context-free|pumping-lemma|
Find maximum number of vertex-disjoint paths of length $k$ in a tree with no restrictions for the paths
Can't understand how to apply pumping lemma to see if a language is context-free or not. Hi, i tried to verify the context-free's pumping lemma, and the language seems to be not context-free but i can't understand if i'm correct. I tried writing all factorizations, but i don't know when i have to stop or if there's ...
Is L = {w w^r w | w ∈ a(b+c)*a } a context-free language?
|complexity-theory|context-free|pumping-lemma|
|context-free|pumping-lemma|
Can't understand how to apply pumping lemma to see if a language is context-free or not. I tried to verify the context-free's pumping lemma, and the language seems to be not context-free but I can't understand if I'm correct. I tried writing all factorizations, but I don't know when I have to stop or if there's a wa...
Is $L = \{w w^r w | w \in a(b+c)^*a \}$ a context-free language?
Assume $L$ is context-free and let $n$ be its pumping length. Let $u = ab^naab^naab^na = (ab^na)^3$. Since $(ab^na)^R = ab^na$, it is clear that $u\in L$. That means, since $|u| \geqslant n$, that the there exists a decomposition $u = vwxyz$ such that: 1. $|wxy|\leqslant n$; 2. $wy\neq \varepsilon$; 3. for $k\geqs...
Hint: show that $\texttt{EXACT INDSET} = \texttt{INDSET}\cap L$ with: $$L = \{\langle G, k\rangle \mid G \text{ has no independent set of size }\geqslant k + 1\}$$ and show that $L$ is $\text{co}\mathsf{NP}$-complete.
We know according to the pumping lemma if a language is regular, then a string already exists and it can be separated into 3 parts ( called decompositions ), 1 string can have multiple decompositions. If we were to cross check this property with, basically prove for regular langauges, then we would need to prove it ...
When applying pumping lemma to prove that a language is not regular, do we need to apply it to all decompositions of a string or just one?
|automata|pumping-lemma|
We know according to the pumping lemma if a language is regular, then a string already exists and it can be separated into 3 parts ( called decompositions ), 1 string can have multiple decompositions. If we were to cross check this property with, basically prove for regular langauges, then we would need to prove it ...
null
The problem you describe is [strongly NP-hard][1] since it generalizes the [3-PARTITION][2] problem. Hence you can expect no efficient algorithm for it, unless [P = NP][3]. To see that it generalizes the 3-PARTITION problem, take an instance S of 3-PARTITION that is composed of 3m positive integers summing to mT. N...