instruction stringlengths 35 29.1k |
|---|
I came here to ask for help with a two-tape Turing machine for the following language.
$L = \{ a^{n^2} | n \ge 0 \}$
I tried following the advice on this site: Turing machine that accepts L={an2|n≥1}
[duplicate]
because it was the one with the most answers, but I'm still not sure about the algorithm.
If I understood it... |
Integers between 0 and a square-free number $r$ minus one can be represented by their value modulo each of $r$'s prime factors, according the Chinese remainder theorem.
Given a number represented like that, is there an efficient way to calculate its representation for $r^2$, that is, its remainder modulo each of $r$'s ... |
Why is this language regular: $L=\{w~|~\#_a(w) \ge \#_b(w)\}○\{w~|~\#_a(w) \le \#_b(w)\}$?
Where $\#_a(w)$ is defined as the number of $a$ in $w$.
Isn't that a concatenation between 2 CFL?
Thanks!
|
Boolean Satisfiability (CNF-SAT) problem in $n$ variables may contain a CNF formula with $O(2^n)$ clauses in the worst case.
My question is: Wouldn't a program reading a CNF formula have to asymptotically run $O(2^n)$ steps? Is the search for a sub-exponential CNF-SAT algorithm moot?
|
I know that interface means a point where any two things meet and interact, but I can't seem to wrap my head around the term when they use it in computers.
A chipset performs interface and peripheral functions for the processor. What does it mean?
What do you mean when you say the chipsets are the circuitry that provid... |
I am implementing A No-Reference Perceptual Blur Metric paper.
Somewhere in the prep steps they mention the use of vertical Sobel filter for finding vertical edges.
The algorithm is summarized in Fig. 1. First we apply an edge detector
(e.g. vertical Sobel filter) in order to find vertical edges in the
image. We then ... |
I was studying Turing languages for an exam and I came up with this problem for wich I haven't found a solution online. This is my question:
Let's say we have $L_1, L_2 \subseteq\{0,1\}^*$. $L_1$ is
Turing-recognisable and $L_2$ is Turing-decidable.
Is $L_u = L_1 \cup L_2$ decidable? Is it recognisable?
My guess is t... |
According to wikipedia, the Frontier supercomputer is the largest supercomputer in the world, at 1 exaFLOPS, and cost 600 million USD.
I am quite surprised that the largest supercomputer only has 1 exaFLOPs, because of the following:
The AMD Instinct MI250X has about 100 teraFLOPS, i.e. 0.1 petaFLOPS.
Hence, if you s... |
Most CV algorithms deal with 2D images produced by cameras. However, sometimes we need to process 3D “images” (I don’t know how to call them). For example, CT and MRI produce 3D radiographs. Traditionally these radiographs are cut into many slices for doctors to read. Because human eyes can only see 2D images (and most... |
I have an array $a$ with $n$ elements, all of which have an associated weight. For example:
$a = \{ (A,2), (B,5), (C,9), ..., (Z,1) \}$, such that element $A$ has weight $w_A=2$, element $B$ has weight $w_B=5$ and so on. The array is not necessarily sorted.
Now, I would like to obtain a sample from this array where eac... |
Assume I have a euclidean TSP solver that is optimal, but it can only solve inputs with exactly $N$ vertices. Let's call it the N-solver.
Now, I have an input with $K$ vertices in the 2D plane, where $K < N$. Can I convert this $K$ sized input to an $N$ sized input where I can feed it into my N-solver and obtain an opt... |
Definitions
Define the density $\rho_L$ of a language $L$ to be a function $\rho_L : \mathbb{N} \rightarrow \mathbb{N}$ where $\rho_L(n)$ is the number of words in $L$ of length $n$.
Question
Let $L \subseteq \Sigma^*$ be a regular language with density $\rho_L(n) \leq b^n$ for some constant $b \in \mathbb{N}$ with $b ... |
I am tasked to design a turing machine which calculates the function:
$f(n) = 2n \iff 0 \le n \le 2$, or $4n+2 \iff n>2$
Where "n" is given in binary.
Now, I'm not in the slightest way sure how to do this. This is what I came up with so far:
I tried checking if a binary number is bigger than two. First, I thought that ... |
I'm just starting to learn about representing numbers in sign-and-magnitude and two's complement, and both as signed binary integers two's complement if representing a negative number I should invert all bits and add one, while sign-and-magnitude represents negative numbers with the first bit as a sign bit, but is it p... |
In actual industry use, does bottom-up provide a significant speed-up compared to an equivalent top-down approach to a dynamic programming algorithm?
Assume that the top-down and bottom-up implementations both have the same asymptotic runtime.
Do the constants really make a difference? Or does this all depend on the sp... |
Let $A$ be an $n \times k$ matrix of real numbers.
I'm looking for an exact algorithm to find a permutation of the rows of $A$, in such a way that the total number of inversions found in the resulting $k$ column vectors is minimal. That is, if $B$ is a row-wise permutation of $A$, I want to minimize:
$$ L(B) = \sum _{j... |
I want to show that the language $L=\{a^p ~|~ p\text{ is not prime}\}$ is not a CFL.
If I look at $\bar{L}=\{a^p ~|~ p\text{ is prime}\}$, it is pretty straightforward to show that it is not a CFL with the pumping lemma, by choosing the word $w=a^p$, and with $w_{p+1}=a^{p+sp}=a^{p(1+s)}\notin L$ because $p(1+s)$ is no... |
The statistical distance (SD) has been widely used as a 'measure' of the closeness of two distributions $D_1$ and $D_1$.
Suppose that the statistical distance (here, total variation with $\ell_1$ norm) between distributions $D_1$ and $D_2$ is less than $s$. Then, as I know, there is a polynomial-time algorithm to disti... |
Considering a function $f$ such that:
$$ f(x_1, x_2, x_3) = f(f(x_1, x_2), x_3) = f(x_1, f(x_2, x_3)) $$
and
$$ f(x_1, x_2) = f(x_2, x_1) $$
and a set $X = \{ x_1, \dots, x_n \}$; how to compute
$$f(x_1, \dots, x_{i - 1}, x_{i + 1}, \dots, x_{j-1}, x_{j+1}, \dots, x_n)$$
for all pairs $i, j \in 1, \dots, n$, $i < j$ w... |
Imagine you trained a text-from-image reader, similarly to the one described in this article https://medium.com/analytics-vidhya/image-text-recognition-738a368368f5
Now you want to port the trained network, or at least the bottom CNN layers, to process huge images (large photograph with tiny street name in the corner. ... |
I'm struggling with the definitions of the push-down automata. In 2-DPDA and 3-DPDA, what do the numbers 2 and 3 stand for: for the number of stacks or of read-only tapes (and hence RO heads) ?
Finally, is there a language accepted by k-DPDA but not with (k-1)-DPDA for any k ?
It seems that the last question is unsolve... |
Arora and Barak states (p. 230) the following:
What is the relation between $BQP$ and $NP$? It seems that quantum computers only offer a quadratic speedup (using Grover’s search) on $NP$-complete problems. There are also oracle results showing that $NP$ problems require exponential time on quantum computers [BBBV97]. ... |
Why is $L=\{w \mid ~|w|\bmod3=\#_a(w)\bmod3\}$ a regular language?
$\#_a(w)$ is the number of $a$'s in $w$.
So far every language that I saw containing modulo was a regular language. Can you give me an example of a non-regular language with a modulo operator in it?
|
I'm just trying to write a little algorithm. I've got nine objects, so there's 9! permutations. My question is, is there a way of turning a number from 1 to 9! into a permutation?
for example, f(1)=[1,2,3,4,5,6,7,8,9], f(2)=[1,2,3,4,5,6,7,9,8] or something similar.
Each number should have a unique ordering, and vice ve... |
It is known that half-GCD (https://www.csd.uwo.ca/~mmorenom/CS424/Lectures/FastDivisionAndGcd.html/node6.html) is can be used to compute the GCD of two polynomials over a finite field. Is it possible to parallelize it? Or, are there any practical polynomial GCD algorithms that can run on clusters (like mpi, Hadoop)?
|
I was wondering about infinite closure properties.
Are the Regular languages closed under infinite union? Infinite intersection?
Probably not, by taking $\forall n>0~~L_n=\{a^nb^n\}\in RL$, then $\bigcup_{n=1}^{\infty}L_n=\{a^nb^n|n>0\}\notin RL$
By taking $L_k=\{a^ib^j~|~i\ne k ~~or~~ j\ne k\}\in RL$, then $\bigcap_{k... |
I'm reading Douglas Thain's book called "Introduction to Compilers and Language Design" and I've come across the following grammar:
, with the following LR(1) automaton:
, and I am not sure the look-ahead sets in state 0 (or any other state, really) is computed.
The algorithm given is the following:
For an item like ... |
Above is the proof of the pumping lemma for context-free languages, coming from the book 'Formal Languages and automata' by Peter Linz.
The picture below is in support of the proof.
I do not understand two things about this proof:
1)
"we can assume that no variable repeats in the subtree T_5". Why should there not be... |
Define $L'=\{u\#v^R ~|~ u,v \in L\}$ and $L\in RL$ while $\#\notin \Sigma$
Why is $L'$ a regular language?
I have tried to construct the DFA of L, then with a # move to a copy of this DFA with flipped edges. I think this is correct.
Thanks!
|
Above is a theorem coming from the book "Formal languages and automata" by Peter Linz concerning substitution of variables.
Could someone explain why A and B have to be different variables?
|
I want to prove that $\mathcal M =\{a^ib^jc^k \mid \min(i,j)\le k\le\max(i,j)\}$ is not a CFL.
Using the pumping lemma, let $p$ be the constant, then I choose $w=a^pb^pc^p$.
When I separate to cases, looking at the homogeneous case, by choosing either $w_0$ or $w_2$ I can't disprove the lemma, because the number of $c$... |
This blog posting states that "regular languages aren't structurally recursive" while
"That's not the case for context-free grammars"
In what sense is the term "structurally recursive" meant here?
|
Suppose we have finite field $\mathbb{F}_p$ with prime order $p$. Can we find polynomial in $\mathbb{F}_p[x]$ having given values $a_1, a_2, ... a_n$ at $x=1, 2, ..., n$ in less than $O(n^2)$ operations in $\mathbb{F}_p$?
There is reference to general algorithm in another question which runs in $O(n \log^2 n)$ time, bu... |
Let's determine if an expression is tautological or not and let's try this expression:
((a ⊼ b) ∨ c) ↔ (¬a ∨ ¬b ∨ c).
We can turn this problem into CIRCUIT-SAT decision problem by asking if the expression ((a ⊼ b) ∨ c) ⊕ (¬a ∨ ¬b ∨ c) is satisfiable.
Note that we repalced the universal gate with its inverse (by "univer... |
I'm somewhat confused about the Wikipedia terms about the meaning of 'reversed' in the context of tree & graph treversals
Suppose I have a tree:
1
/ \
/ \
/ \
/ \
2 3
/ \ /
4 5 6
/ \ / \
7 8 9 10
Tree traversal article describes... |
I've been studying the examples of 3co-SAT recently.
It's easy to find an example of one variable.
$(x_1\lor x_1\lor x_1)\land (\overline{x_1}\lor \overline{x_1}\lor \overline{x_1})$
Examples of 2 variables are as follows.
$(x_1\lor x_2\lor x_2)\land (x_1\lor \overline{x_2}\lor \overline{x_2})\land (\overline{x_1}\lor ... |
Assume you know the Euclidean Minimum Spanning Tree of a set of $n$ 2D points (in general position).
Is there an efficient way (faster than $O(n \log n)$ operations) to obtain the Delaunay triangulation of these points ?
|
As a software engineer, I am familiar with "domain-specific languages" (DSLs), such as PCRE and SQL, which aim to eschew complexity by only providing functionality specific to a given domain (e.g. string matching and database querying for PCRE and SQL, respectively).
However, in some CSE literature I've seen the term "... |
Could someone help me prove the following statement:
“For any grammar in Greibach normal form, every sentence is obtainable by left-most derivations only.”
I see that this is trivial, but I can't manage to start a formal proof of this statement.
What I thought is:
Since every derivation in Greibach Normal Form has a fo... |
On calculating the convexity of an optimization problem, I am getting a term $O(\sqrt{n+m}(n)^3)$. Here both $m$ and $n$ are parameters. Is there any way I can simplify this term to write it as a product?
I know that if time complexity $T(n,m)=O(\sqrt{n+m}(n)^3)$, then $\exists C,M $ such that $\vert T(n,m) \vert \leq ... |
Probably the most famous example of a divergent term (ie, one which admits infinitely many $\beta$-reductions) in the $\lambda$-calculus is the Y combinator
$$ Y = \lambda f. (\lambda x. f(xx)) (\lambda x. f(xx)) $$
The kind of the "heart" of the recursion here is the inclusion of the subterm $xx$. I wondered if this i... |
I notice there are different definitions for CFG(basic block or statement), so let's consider following definition:
Given a program, each statement is a node in CFG, and $(u,v)\in E\iff \text{v is successor of u ,or u is branch and u's target is v}$
Due to such definition, each node has atmost two out-edges. So we ca... |
I am trying to find a lightweight data structure to find the nearest neighbor mesh (a mesh being a collection of non-unique triangles) for a given point in R3 (3D Euclidean space). I have seen nearest neighbor problems for points and triangles, but never meshes as a whole collective.
So, in essence given a point P find... |
I would like to know whether a theory exists which generalizes boolean logic to floats.
Specifically, assume that instead of booleans 1 and 0, I have True/False tendencies, such as 0.9, where 0.1. Here, 1.0 would mean completely true, and 0.0 completely false.
Boolean logic:
0 && 1 # == 0
0 || 1 # == 1
It should be po... |
How do I represent DJNZ command of counting machine via commands of Universal Register Machine, those commands are CLR JNE INC and TR, via this commands i have to represent DJNZ command, any help would be great.
|
My question is generalizable to arrays of any type but I'll use strings to keep it short.
We take a couple of strings as an input. Let's denote them ${S_1,...S_n}$. (Ex: "ABEF" and "CDE"). The output $U$ must fulfill the following conditions:
The output must contain the entire "vocabulary" of all of the inputs and not... |
I'm studying Turing machines and I came across the following definitions:
NP is the set of problems that can be solved in polynomial time by a non-deterministic Turing machine.
and
Let t(n) be a function, where t(n) ≥ n. Then
every t(n) time non-deterministic single-tape Turing
machine has an equivalent 2^O(t(n)) ti... |
So I'm doing an AI course that is talking about time complexities of different tree search algorithms. On this slide it talks about the time complexity of the algorithm, and I'm confused as to why we ignore the $d$ multipliers in the series for the Big-O time complexity of the algorithm
My initial thought is that the ... |
I've been learning about data speed and width and the rate of the bus where information is transmitted between components. But I can't see or understand how fast is the transmission.
For example, in theory, I've read about how PCI operates at 133MBps and 266mbps and such, however, I can't seem to comprehend how fast th... |
Nondeterminstic RAM is like deterministic RAM with extra instruction “JMAYBE” which nondeterministically jump or continue when executed.
According to this paper:
An $O(T \log T)$ reduction from RAM computations to satisfiability
I guess that we can simulate nondeterministic RAM on nondeterministic TM , with only logari... |
Cloudflare famously uses a wall of lava lamps (https://en.wikipedia.org/wiki/Lavarand) to seed random number generators. But if you're going into the real world to seed your rng, why lava lamps? Why not roll 1000 D20's (say dice with 20 different colored faces) and call it a day? Is it just to look cool, or does the di... |
I understand that caches are the smallest and fastest memory that is integrated into the CPU. However, what I am confused about is the information that it holds. From what I know, the capabilities of cache are:
L1 cache - 64KB
L2 cache - 256KB
L3 cache - 4-12 MB
Ram - 4-74 GB
For example: If I open up a page on the bro... |
this is my First post,I apologize for my ignorance.
The question is:
Could a programmer (human or Ai) with all the computing power and infinite time create a simulation of a world with our same laws of physics without errors of any kind (both software and hardware errors)?
Clarification:1) the simulation shouldn't simu... |
I am currently stuck on this problem, it is from a very highly competitive contest and so it is highly difficult as well. Below is the statement:
There are 2 lists of integers with the same length.
Pick an integer from each list and
calculate the absolute value of their sum.
Return the minimum value for the value.
E... |
I found the following proof for the theorem that states "A light edge that crosses a cut that respects A is safe for A":
See: https://www2.hawaii.edu/~janst/311_f19/Notes/Topic-17.html where also all the necessary definitions are given.
What I do not understand in this proof is that we have here T that is a MST and th... |
I have a list of apps the user has installed, a history of all previously opened apps, and a series of characters that the user has input.
The user is shown a list of apps filtered taking into account the input, the specific function should be given, but the app the user wants must never be filtered out. The list of ap... |
I am trying to find the asymptotic run time complexity of the following function which will return a list of all permutations of nums.
def permute(nums):
res = []
dfs(nums, [], res)
return res
def dfs(nums, curr, res):
if not nums:
res.append(curr)
return... |
Arrays are generally presented as data structures with $\Theta(N)$ traversal and $\Theta(1)$ random element access. However, this seems inconsistent:
if array access is really $\Theta(1)$, this means that the size of an element index is bounded by a constant (e.g., int64), since it can be processed in $\Theta(1)$. How... |
I found the following proof concerning the correctness of a breadth-first traversal resulting in shortest path:
source: https://people.eecs.berkeley.edu/~daw/teaching/cs170-s03/Notes/lecture6.pdf
The key is that if we assume that we have a shorter path, we get a contradicition. I however do not fully understand with w... |
When solving numerical problems with circles, one often has to sample these at numerous points, not necessarily in a uniform way. Evaluating the $(\cos\theta,\sin\theta)$ values can represent a significant fraction of the cost, as they are transcendental functions.
We can get rid of these functions by rational substitu... |
I am wondering if it is known whether probabilistic Turing machines are more powerful than deterministic ones, in the sense that they can solve problems faster on average, or can solve problems that deterministic Turing machines cannot? That is, if a Turing machine can "flip coins", does this allow it to do things it ... |
I have a question regarding oracles.
If I have the complexity class $P^A$ (with $P \subseteq A$), what is it's relationship to the class $A$?
I mean it should be trivial that $A \subseteq P^A$ for all $A$.
But the other way is interesting.
As far as I know, there are some $A$ such that $P^A = A$ (e.g. $P$ or $BPP$) and... |
After several hours of frustration, I finally realized that the definition of two-three trees aren't standard (my lecture notes, this video, this other video, and Wikipedia) are different. My lecture notes, for example, maintains that keys are stored only in the leaves, while most other implementations store values in ... |
I was going through my Operating Systems book and in the disadvantages, they wrote that there is no user interaction between the user and computer in uni-programming and multi-programming systems and I asked why? to myself. There was no material or maybe I could not see or understand the idea that why there is no user ... |
i just want to know why the techniques we use to solve the 2-SAT problems cannot be used to solve the 3-SAT problem. So the techniques that i know that help solve 2-sat are the naive on where you just take one variable in the formula and give it a truth value and go on from there by deleting clauses where the variable ... |
Let $U$ be the universal Turing machine. Is there a Turing machine $T$ taking two inputs such that $\forall m \forall n \exists q \; T(m; n) = q \land U(q;0)=U(m;n)$?
It seems "obvious" that there is such a Turing machine, but if there is one, then the function $Q(n) = 1 + T(n;n)$ is not computable because it's the dia... |
An $\epsilon$-tester given an input and a property, is defined as follows:
If the input holds the property then the tester should accept with probability at least $\frac 2 3$. Otherwise if the input is more than $\epsilon$ far from holding the property then the tester should reject with probability at least $\frac 2 3$... |
I want to solve the problem of finding a shortest path on a directed weighted graph from a certain node to any of a specified set of destination nodes (preferably the closest one, but that's not that important). The standard (I believe) way to do this with the A* algorithm is to use a distance-to-closest-goal heuristic... |
Suppose I have the following structure definition in C:
struct node {
int value;
struct node *parent, *left, *right;
}
If I want to represent a specific node inside a tree, all I need is a pointer to such node, which allows me to traverse the tree using the parent and children's link.
Instead, if I have a simp... |
I'm reading "Program=Proof" by Samuel Mimram, and they use a notation for defining a formal language that I'm not familiar with.
Here is how "Program=Proof" defines a formal language of Propositional Logic:
Here is how "Program=Proof" defines a formal language of λ-calculus:
On the other hand, I'm more used to fo... |
If a function type is representable by exponentiation, does it follow that function application is represented by the right inverse, roots? It would seem that roots consume a function's input to return the output, and logarithms consume a function's output to return the input.
\begin{equation}
\sqrt[a] {b^a} = b
\end{e... |
I frequently have to calculate this kind of function
Those functions have constant values on arbitrary (predefined) intervals
I wonder if there is an algorithm for fast calculation of it, so I can learn about, and implement.
My solution is to store the intervals in an interval tree, so I can find the value of the func... |
Here's my problem: I have $N$ sets of integers $S_i$ where $|S_i| = n_i \forall i \in [1,N]$ each with non-uniform weights $W_i = \{w_{i,1}, ..., w_{i,n_i}\}$ such that $\sum_{j}{w_{i,j}} = 1$. I want to sample $m$ unique lists $P_{k \in [1,m]} = (p_{k,1}, ...,p_{k,i}, ...,p_{k,N})$ of $N$ integers (including duplicate... |
There are 8 (very similiar) languages I'd like to discuss here:
CNF SAT
DNF SAT
CNF No-SAT (Existence of a false assignment)
DNF No-SAT
CNF Tautology
DNF Tautology
CNF Contradiction
DNF Contradiction
While CNF SAT is known to be $NPC$, my claim is that some of these languages are actually in $P$. The easiest one is D... |
I need to compute the cheapest path between two pixels in an image. The travel cost is specified by the user, and may depend on the distance between the pixels (including pixel values, which is treated as an elevation), as well as other factors. I tried Dijkstra, by scaling coordinates by a factor so I can have more se... |
I have written a regex engine and it can match whole strings to a pattern without a problem, i.e.:
match(E, w)
and it returns true or false if the string $w$ matches the expression $E$ or not. But I was thinking of how to extend the matching function to find substrings in a string that match an expression. The obvious ... |
I have a set of positive integer numbers $A = \{a_1,...,a_N\}$ and I need to find a partition of $A$ into two sets, such that the sum of their products is minimal, i.e.,
$$
\min_{X,Y : X \cup Y = A} \prod_{x \in X} x + \prod_{y \in Y} y.
$$
Is there any good approximation/heuristic algorithm to solve this problem?
|
Similar to one of the questions that was posted here roughly 4 years ago. Lets say we have two wooden planks each 1m long. And we want to have 4 pieces, 60cm 50cm 30cm and 20cm. What kind of bottom-up implementation can be done to calculate the least waste
Formally we have N wooden planks each $L_1$,…,$L_N$ cm long. An... |
I'm trying to use the Pumping Lemma to prove that $L = \{ wsw \mid w \in \{0,1\}^*,\ s \in \{2\}^*\text{ and } |w| = 2\cdot|s| \}$ is not a CFL.
|
Why there is a sigma in the denominator of equation (8) in the picture? suppose we have n tasks and m fog nodes.
|
Let $L_1 \subseteq \{0,1\}^{*}$ be a regular language, and let $L_2 \subseteq \{0,1\}^{*}$ be some (not necessarily regular) language.
Show that
$$L=\left\{ \sigma_{1}\#\sigma_{2}\dots\#\sigma_{n}\mid\substack{n\geq1\\
\sigma_{i}\in\left\{ 0,1\right\} \\
\exists w_{1},\dots w_{n-1}\in L_{2}\quad\sigma_{1}w_{1}\sigma_{2... |
I've come across this problem when working on a personal project of mine. I need an efficient algorithm of counting the number of overlaps between all pair combinations of n sets.
Example:
Set a = [adam, ben, charlie, ...]
Set b = [adam, john, kenny, ...]
Set c = [adam, john, eve, ...]
...
Set n
The algorithm will then... |
Source: Hanoi student competition of unknown year (Kì thi học sinh giỏi thành phố)
Additional conditions:
N is a positive integer in range [1, 2^64 - 1]
K is a positive integer in range [3, 10]
Example:
N = 106, K = 3 => res = 105 (3 * 5 * 7)
|
I am preparing for my CS exam and found this question in a collection of old exams:
Find a DFA and NFA with Σ = {o,p,q} that checks if the substrings op and pq are present in the string.
I thought, I understood this topic, but I can not find a regular expression for this problem.
My initial thought was {o ∪ p ∪ q ∪ o... |
I am looking at a specific variant of subgraph isomorphism:
Instance A graph $G = (V_G, E_G)$ and a target graph $H = (V_H, E_H)$ such that $|V_G| = |V_H|$.
Question Is there a subgraph $G' = (V'_G, E'_G)$ of $G$ that is isomorphic to $H$?
(Note the condition $|V_G| = |V_H|$ above, which implies $|V_G| = |V'_G| = |V_... |
This naïve sampling algorithm I am talking about is fairly simple: create a set for storing chosen items first, randomly select an item from the array, and examminate if it is in the set. If it isn't, add it to the set, otherwise we will skip and reselect. This process will be repeated until required amount of samples ... |
I want to show that the language
$$L= \left\{ \left\langle M\right\rangle \mid\substack{\text{M is a TM and there exists a poly TM $M'$ such that}\\
\text{if M halts on input $w$, $M'$ halts on $w$ and answers the same}
}
\right\} $$
is not decideable, using Rice's theorem.
I have a hard time understanding why this pr... |
I want to create a table that has the following results:
id | field1 | field2
1 | 1 | 1
2 | 2 | 2
3 | 3 | 3
4 | 4 | 4
5 | 1 | 2
6 | 2 | 3
7 | 3 | 4
8 | 4 | 1
9 | 1 | 3
10 | 2 | 4
11 | 3 | 1
12 | 4 | 2
13 | 1 ... |
Given n points in a 2d plane I.E $ (x_1,y_1),(x_2,y_2)\dots (x_n,y_n) $.
Create a data structure that holds the points and a method closer$(a,b)$ that returns all the points in the data structure that are closer to $(0,0) $ than to $(a,b) $.
The preprocessing and creation of the data structure have no complexity limit ... |
Question: Suppose $a, b$ are sequences with $n=|a|,m=|b|$ lengths, and $ed(a,b)$ denotes edit distance between them. what is the complexity of computing $ed(a[i:j],b)$ for all values $1\le i<j\le n$?
$O(n m)$ to compute $ed(a[1:i],b)$s
Let $A$ denote the DP table with $(n+1)\times (m+1)$ size. For all $i\in\{1,\dots,n\... |
Busy Beaver is an uncomputable function that grows quicker than any computable function. That means there exist functions f such that for all computable functions g: g in O(f). There is an upper bound on the order of computable functions.
The question is whether or not there is a computable function like that. So, is t... |
Busy Beaver is an uncomputable function that grows quicker than any computable function. That means there exist functions f such that for all computable functions g: g in O(f). There is an upper bound on the order of computable functions.
Here I asked whether there is a computable function bounding all computable funct... |
I was reading about about NP-intermediate problems on Wikipedia and saw the IMSAT problem mentioned over there.
There is no Wikipedia page for that problem and they only cite this paper.
In the paper they define the MSAT problem as:
Recall that the satisfiability problem (SAT) is to decide whether a set of
proposition... |
Are there monotonically increasing uncomputable functions f that are bounded by computable functions?
$$ \exists f,g: f\ uncomputable\ \land f\ monotonically\ increasing\ \land\ g\ computable\ \land\ f \in O(g) $$
|
Assume I have a programming language $L$ with well-defined semantics.
Showing Turing-completeness is straightforward: if I write a program using $L$ simulating the universal TM, I'm done.
What I'm concerned about is another direction. How do we show that a program in $L$ can be simulated by TM when $L$ supports things ... |
Can someone provide a list of references of papers, books, etc. presenting results on the time and space complexity of the problem of isolating the roots of a univariate polynomial $P(t)$ with integer coefficients (e.g. $P(t) \in \mathbb{Z}[t]$)?
Papers like this one offer informal arguments to provide upper bounds for... |
Problem: Let $ A $ be an array of $ n $ different elements from an ordered interval.
Let $ I(A) $ be the number of inversions in array $A$, meaning, the number of pairs of indexes $ 0 \leq i < j <n $ for which it occurs that $ A[i] > A[j] $. Notice that $ 0 \leq I(A) \leq
{n \choose{} 2} $ and that $ I(A) = 0 $ if ... |
I know that parity checking is testing for accurate data transmission between nodes in a communication network.
When does this parity checking happen on a computer? Does it happen every time data is transmitted internally in a computer?
Do all computers use parity checking?
|
int[] arr = new int[10];
Would this count as a single primitive operation under the RAM model or would it be 10 operations as we are allocating 10 memory locations to this variable "arr"?
This also ties in to my other question: if there existed an array of size 1 and we were to increase the size by 1 and copy over the... |
I'm wondering if anyone can help me with this. Say I have a DAG, I understand that it has no directed cycles, but it can have loops ( "diamonds" ).
My question is, is there a known way to convert such graph to a directed tree that has no loops. I know of the junction tree/ clique tree way, but this results in an undire... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.