instruction stringlengths 35 29.1k |
|---|
Given that
The channel is tiny, it has message size of 72 bits
Each bit is probabilistic, meaning that I have a value between 0 and 100 of how likely that bit is on/off1
Only 24 bits of acutal data are needed
Currently, BCH[63,24,7] is the closest thing I've found, but it doesn't capitalize on all aspects of the chan... |
I think they have the same order of growth because both are O(n^2), correct? And even though 2000n^2 has a higher coefficient, they're both the same complexity since O(n) < O(n^2) < O(n^3) is this thinking correct? If not, how can I understand their order of growth better?
|
What is the exact meaning of these terms? Very confusing. Most of the articles uses these terms interchangeably.
|
I have a CNN based object detector trained on WIDER Face dataset. It can successfully detect human faces in a given image.
Now, I am trying to detect abstract face and minimalistic face patterns in clouds or houses etc but having no success.
Initially, I thought I could lower the detection threshold to detect such p... |
So I've seen all these leaps in machine learning alorithms these past years and they've only gotten better and better at recognizing handwritten text. I remember reading once that some algorithms have 95% accuracy. So then, why when I use an OCR software, it spits out garbage? Even with printed text, which I feel shoul... |
As we all know there exist plenty of polynomial-time reductions from one NP-complete problem to another. Are there any NP-complete problems that have a rather large polynomial bound for reductions to other NP-complete problems, like a poly-time sub-hierarchy of NP-complete problems...?
E.g. lets assume I have NP-comple... |
I've been implementing a Fibonacci Heap in C this past week and today I just hit a mental roadblock that I can't figure out.
Decrease Key is a function that almost all min heaps have (vice versa with increase key with max heaps). However all of the decrease key functions declarations look like this:
// Big Theta 1 perf... |
I studied this algorithm. Link.
Is is about finding all possible binary trees with given inorder traversal.
I want to analyze this code with Big-O notation.
I think it is O(N^3). Below is my thought.
1) choose root node. let's say in[i]. (0 <= i < N). => O(N)
2) construct left subtree. in[0] ~ in[i-1]. => O(N)
3) const... |
1) (cited from "Introduction to the Theory of Computation" by Michael Sipser)
Let $M$ be a Turing machine, we say that $M$ decides a language $L$ if $M$ is a decider which recognizes $L$.
2) (cited from "Computational complexity: a modern approach" by Boaz Barak and Sanjeev Arora)
Let $f \colon \Sigma^{∗} \rightarro... |
I was reading the Sipser's book on the Theory of Computation, 3rd edition and came up with a question. "Does showing a problem and its complement are not Turing-decidable means that the language & its complement are not Turing-recognizable?" I believe that the answer is NO, however, the Theorem 5.30 states something di... |
NP is a class of decision problems for which one can present a "certificate" that can be verified in polynomial time.
Are there any decision problems that have such "certificates" that can be verified faster than solving the problem(*), but verifying still takes superpolynomial time(*)?
(*) using the best-known method
|
Given two finite sets $A, B \subseteq \mathbb{C} \times \mathbb{R}$, each stored as an array, define
$$
S = \{ (z_1 + z_2, x + y, z_1, z_2, x, y) : (z_1, x) \in A, (z_2, y) \in B \}
$$
and
$$
f(s) = \min_{t,z_1,z_2,x,y} \{ t : (s, t, z_1, z_2, x, y) \in S \}
$$
with $f(s) = \infty$ if the feasible set of the above min... |
So as you read in the title I want to know if it is possible in polynomial time to reduce a SAT problem to it's simplest version in CNF format with no assumed variables?
The simplest form is with minimal gates in the circuit, assumed variable is not important it was assuming the value of a variable.
An example, I have ... |
I want to formally prove that there are countably many disjoint enumerable sets such that any two of them cannot be separated by a decidable set.
I know that there exist a computable function $f$ that takes only values 0 and 1, and this can be used to define two sets (let's say $\mathcal{A}$ and $\mathcal{B}$, where $\... |
I have a linked list with n elements and my goal is to find the 'nth to last element' in the list. I would like to present my approach. Please provide your opinions on whether it is optimal or how may I improve it.
Sample linked list "4->5->6->8->2->9->1"
Suppose the question indicates find 3th to last element in the ... |
This is a question from CodeFights.com:
Given an array of equal-length strings, check if it is possible to rearrange the strings in such a way that after the rearrangement the strings at consecutive positions would differ by exactly one character.
Example
For inputArray = ["aba", "bbb", "bab"], the output should be
... |
Kolmogorov complexity is relative to a choice of Universal Turing Machine. Because of the Invariance Theorem, the difference in complexity assigned by two Universal Turing Machines is bounded by a constant that depends on the choice of that pair. They can't disagree too much because one can always switch over to emulat... |
I am new to programming language theory. I was watching some online lectures in which the instructor claimed that a function with polymorphic type forall t: Type, t->t be the identity, but did not explain why. Can someone explain to me why? Maybe a proof of the claim from first principles.
|
Hi guys I was given this question:
Prove or disprove that the following language is context-free: $$ L = \{ \alpha 2 \beta : \alpha,\beta \in 1(0+1)^*, [\alpha]_2 < [\beta]_2 \} $$ where $[x]_2$ is the numerical value of the string $x$ interpreted as a positive number in base 2. For example, $[1110]_2 = 8+4+2 = 14$, $... |
The problem is best illustrated with an example. Consider a trading system in which A sells to B who sells to C.
A -> B -> C
At some point in the future A needs to deliver the sold goods to B who in turn needs to deliver to C.
From this trivial example it can be seen that A could deliver directly to C without involvi... |
I was reading the other day about this problem, refreshing it, and on a couple of places over the internet I read somebody explaining something in the line of '..does not matter as long as is polynomial, a N^20 or N^30 will do it, we know that maybe the solution does not make the problem tractable but if we can produce... |
Let $S$ be a set (say positive integers $\leq$ N) and $f$ an involution ($f$ is bijective, $f\cdot f=id$, e.g. xor with a constant). $g$ is a idempotent mapping choosing an arbitrary representative element in each $f$ mapped pairs. For example $g(x)=\min (x,f(x))$ $$g: S \rightarrow \tilde S \subseteq S$$
I want to bui... |
Could for example the precedence ordering of addition, multiplication, exponentiation, boolean and/or and zip/cross product be inferred from a few rules?
|
What are the methods to deal with variations in cost in a dynamic graph when applying Dijkstra? For instance, I select the shortest path in a graph, however, the weight of this path changed after I selected (I made the selection using an estimate). How do I deal with this variation?
|
The rule 110 cellular automaton is known (or claimed) to be Turing complete. But what exactly does it mean?
I do know what Turing completeness mean. Roughly speaking a language is Turing complete if any program / algorithm can be expressed using this language.
However, the rule 110 is a fixed set of instructions of how... |
Consider the function : $\mathbb{Z}^{\geq 0} \rightarrow \{0,1\}$ given as $n \mapsto n \bmod 2$. Does this have an easy implementation using Linear Threshold Function gates?
I do not mean that the input is the infinite set of positive integers. Think of the input as coming on a single wire carrying a non-negative in... |
How can a Turing machine be constructed to recognize languages consisting of Turing machines that accept a certain set of strings?
An example: the language $L = \{\langle M\rangle\mid M \text{ accepts a string }0^n1^n2^n \text{ for some }n\geq 0\}$.
Does a TM recognizing such language exist or are these kinds of langua... |
In this cheat sheet, average time complexity for access to a hash table is listed as N/A.
I'm curious as to why. Since a hash table is mostly mathematical, I would assume it would be O(1) like the other operations ... Search, Insertion, Delete.
http://bigocheatsheet.com/
|
Do we know if all of $AC^0$ can be captured by polynomial sized depth $2$ LTF circuits? (with or without polynomially bounded weights).
For any vector $w \in \mathbb{R}^n$ and any number $c \in \mathbb{R}$ we define the LTF (x) gate as the function, $\{0,1\}^n \rightarrow \{0,1\}$ such that $LTF(x) =0$ if $c + \vec{w... |
I am struggling with the following problem:
Given a set of finite binary strings $S=\{s_1,\ldots,s_k\}$, we say that a string $u$ is a concatenation over $S$ if it is equal to $s_{i_{1}} s_{i_{2}} \cdots s_{i_{t}}$ for some indices $i_1,\ldots, i_t \in \{1,\ldots, k\}.$
Your friend is considering the following problem:... |
Many seem to believe that $P\ne NP$, but many also believe it to be very unlikely that this will ever be proven. Is there not some inconsistency to this? If you hold that such a proof is unlikely, then you should also believe that sound arguments for $P\ne NP$ are lacking. Or are there good arguments for $P\ne NP$ bein... |
In The Scientist and Engineer's Guide to
Digital Signal Processing
By Steven W. Smith, Ph.D. i have read something like that,
Single precision or 32-bit floating point forms the floating point number, $v$, by the following relation:
$$ v = (-1)^S \times M \times 2^{E-127} $$
The term: $(-1)^S$, simply means that the si... |
Can someone help me prove the correctness of this algorithm:
MUL(a,b)
x=a
y=b
WHILE x≥b DO
x=x-b
y=y+1
IF x=0 THEN
RETURN(true)
ELSE
RETURN(false)
I had to prove that $x_n + b\cdot y_n = a$ by induction, where $x_n$ and $y_n$ are the values of the variable x and y after the loop ... |
I have an input string similar to ABCDEFGHIJK from which a series of sequences has been generated into an array as following:
00: 'ABCD'
01: 'BCDE'
02: 'CDEF'
03: 'DEFG'
04: 'EFGH'
05: 'FGHI'
06: 'GHIJ'
07: 'HIJK'
08: 'ABC'
09: 'BCD'
10: 'CDE'
11: 'DEF'
12: 'EFG'
13: 'FGH'
14: 'GHI'
15: 'HIJ'
16: 'IJK'
17: 'AB'
18: 'BC... |
Let us have a finite set $S$ and a finite set of its subsets $S_1, S_2 \dots S_k$. For any $S_i$ we have two numbers: $l_i$ and $h_i$. We need to figure out if there is such a subset $T$ of $S$, that for any $i$ we have $l_i \leq |T \cap S_i| \leq h_i$.
Prove that this problem is in NP & NP-complete by reducing 3SAT to... |
The wikipedia page about comb sort claims that the average complexity of comb sort is Omega(n^2/2^p) where p is the number of increments. Take as example an uniform distributed array of 1000 elements, using the standard shrink factor of 1.3 the length of the gaps list is 23. Is this the p mentioned in the wikipedia art... |
This is from an old exam, the last Task no one could solve correctly and I'm curious how it's done :p
Show that the set of decimal representation (without leading zeroes) of the divisible numbers by 4 (natural numbers) is regular.
By this thread How to prove a language is regular? I know that one can make a DFA to Show... |
Given: $n$ tasks with accomplishment times $t_1, t_2, \ldots , t_n$. There is no such task that its accomplishment time is greater than the overall accomplishment time of other tasks.
Question: How to distribute these tasks between two workers in a such way that $|T_1 - T_2|$ is minimum ($T_i$ - the overall accompl. ti... |
I am struggling with the following problem
Let $f:\mathbb{N} \to \mathbb{N}$ be a function on natural numbers and
say $L$ is some language.
Define $L_f = \left \{ x \mid \exists y \in \Sigma^*: |y| = f(|x|) , x \cdot y \in L \right \}$
If $L$ is regular and $f$ is $x \mapsto x^2$ and $g$ is $x \mapsto 2^x$, show tha... |
That is, if h(n) = h*(n), then A* only expands nodes that lie on an optimal path to the goal. But does this imply that A* will always take a linear time in the solution length to find an optimal solution?
I suspect I may be overthinking this problem, but if h(n) = h*(n) then we are measuring the exact heuristic cost of... |
Is the following statement from [1] true?
"Since recursion is the main computational technique, a terminating pure Haskell program counts as an inductive proof of a theorem."
My intuition is that inductive proofs require a base case, assume the hypothesis case for k, prove induction step fork+1.
I am not clear on how t... |
Currently I'm learning about the Disjoint Sets data structure. I understand that, when we create a union of two disjoint sets, we create a kind of "backwards" tree for fast lookup. As Skiena says in his book:
To minimize the tree height, it is better to make the smaller tree the subtree of the bigger one. Why? The hei... |
Is mostly algo query. I use php. I use a local btc exchange and its API only publishes last 24h volume which changes every few minutes. I have logged this for past week.
I want to try to use it to derive into near real-time volume.
Is it possible to have such an algo?
Example:
Suppose i want to derive real volume from ... |
If I want to make N repeated (i.e. millions of) 2D nearest-neighbor queries on a pointset of size M, is traveling down into a KD-Tree most efficient or are there better ways to do this? (e.g. Voronoi?)
Right now I'm building a KD-Tree of size M, so with N queries on that I end up using N log M time. Can I do better?
|
I have a certain function that calculates numerically, for every $x \in [0,10]$, a value $y\geq 0$. I want to find an approximate minimum point of that function. A possible solution is to calculate $y$ for e.g. 10000 values of $x$ in the range $[0,3]$ and return the $x$ for which $y$ is smallest. I am looking for faste... |
I am self taught in CS and came across this while looking at binary search applied to multiplication. I don't understand this part:
OK, we have some x that has binary representation $10110010(1*2 + 1*2^4 + 1*2^5 + 1^7$) ...I understand this, but don't know what following means $x = 2^4(1011) + 0010$. What is name of se... |
I have array $t$ with size $n \leq 10^6$. It has only two kinds of elements inside: $1$ or $-1$.
I need to count how many contiguous subsequences have positive sum.
This pseudocode demonstrates exactly the behavior I want, but is too slow for large $n$:
c = 0
for i = 1 to n do
for i = j to n do
if sum(u[i:j]... |
The space hierarchy theorem shows that
$$\mathrm{\mathbf{L}}^{1} \subsetneq \mathrm{\mathbf{L}}^{2} \subsetneq \cdots \subsetneq \mathrm{\mathbf{L}}^{m} \subsetneq \cdots \subsetneq \mathrm{\mathbf{PSPACE}}$$
and
$$\mathrm{\mathbf{NL}}^{1} \subsetneq \mathrm{\mathbf{NL}}^{2} \subsetneq \cdots \subsetneq \mathrm{\mathb... |
Let's say we have given set of integers $A = \{x_1, x_2, x_3, x_4, \dots, x_n\}$, consisting of exactly $n$ values, all of them positive integers. Now the problem is to find the maximum value of bitwise or operation of all possible pairs $(x_i, x_j)$
We define bitwise or as bitwise operation that returns true if atleas... |
I have following problem to solve:
I have a group of people which I have to split up into smaller groups. Some of them have preferences who they want to be in a group with and who they don't want to be in a group with. I have to determine wether it is possible to group them respecting their preferences and if so, I wa... |
Could the execution of a Haskell program be considered as a proof in equational reasoning. This follows on from my earlier question on Haskell and inductive proof. Currently I am stuck between morally yes, but technically perhaps no. Below are two Haskell programs together with what I consider to be paper based equatio... |
We have 3 jugs with capacities A, B and C. How can we create an algorithm that will find out how to measure D liters?
This is my task for one online course I'm taking. I have no idea where to start. I don't even understand how are these four related to each other. I will be thankful for any help or clarification of t... |
I am getting the pattern shown in the picture from an experiment. To my human brain it is evident that it consists of some 20 straight lines. I need to find position and slope of all these lines (perform a regression). But I need to do it completely automatically. If this were a a single sequence I would have used RLS... |
I want to prove that
for every language $L\subseteq \{a\}^*$, the laguage $L^*$ is regular.
every element of $\{a\}^*$ is equivalent to a natural number based on its length, and also every language $L$ is equivalent to a subset of natural number. after that base on lemma that says
Let $S$ be an infinite subset of ... |
Ryan Williams and Cody Murray in 2015 proved that MCSP (Minimum Circuit Size Problem) is provably not NP-hard under local reductions. (Local reductions are the ones in which you are allowed time $O(n^{1/2} - \epsilon))$. He has done it by showing even stronger statement that: Even Parity can't reduced to MCSP using loc... |
I have been thinking about Non-determinism in any kind of state machine. Since I work on machine learning, I tend to think that probability is a means of handling non-determinism. Instead of exhaustively taking every possible transition to arrive at a solution we prioritize the alternatives.
I just wonder if there ar... |
Deterministic Context free languages are always unambiguous. Now DCFL are a subset of linear languages. Are there any linear languages which are inherently ambiguous?
|
Assume $A$ is an array that contains sorted integers , ie $\forall\ i,j$ where $1 \le i \le j \le |A|$, $A_i \le A_j$. The numbers do not have to be unique, and the task is to check if there is at least one pair of indices $i$ and $j$ where $A_i + A_j = n$. Simple enough, here's an algorithm that does it:
CheckForPair(... |
Suppose the language L = {w | w is an integer whose sum of digits is a multiple of 2}. I strongly feel like this is non-regular language, but how should I choose a string to apply the pumping lemma?
|
In the process of trying to find a solution to the rat and poison puzzle with two rats, I've found myself needing the solve the following problem, in polynomial time:
Given any $k_0, k_1, k_2,..., k_{n-1} \in [2,\infty)$, we want to produce a simple graph $G = (V, E)$ and some $c_0, c_1, c_2,..., c_{n-1} \subseteq V$ s... |
I have been wrestling with this for quite a long time but couldn't convince myself that the following is true:
What I do understand: $\theta_a$ denotes the set of points that are within the ellipsoid. Also, $A_{t, a}$ is a matrix that "describes" the shape of the ellipsoid. $\hat{\theta}_{t,a}$ is the red point that is... |
It is not possible to losslessly compress all files of size $n$ using a single algorithm, as there are more files of size $n (2^n)$ than of size $p, p: p < n ( 2^n-1)$. Via the pigeon hole principle, if we only tried to compress files of size $n$ with a single algorithm, there would be at least one file it was impossib... |
This question has already been asked before in this site, but the details of none of them is my question and none of them answer my question.
The following is an example recurrence given in introduction to algorithms book by CLRS .
$$T(n) = 2T(\sqrt n) + \log n$$
It is solved by changing the variables. It renames the ... |
Suppose you have a directed graph. Vertices a and b are part of the graph. There is an arrow pointing from a to b and an arrow pointing from b to a. Does this make the directed graph cyclic?
|
I am studying Matching Theory on Graphs and I am wondering if I understand the characterization of the problems right.
Definition:
Let $G = (V, E)$ a graph. A set $M \subseteq E$ is called a matching in $G$ if and only if each vertex $v$ in $V$ is incident to at most one edge in $M$, that is, $\forall v \in V ( \foral... |
Professor said that modern processor needs runtime stack.
But he didn't explain the reason.
Why is the runtime stack required in the modern processors?
|
I want to merge $2$ binary heaps. Which is the fastest algorithm to do so. Also would like to know its time complexity.
I know how to do it linear time $O(n)$, I want to know if there is something faster (probably there is).
|
I have the decision problem $\operatorname{VALID}$ which is the set of all valid propositional formulas (tautologies), I know that $$\overline{\operatorname{SAT}}\equiv_m^p \operatorname{VALID}.$$
This can easily be seen by changing instances of each problem into their logical negation, then a formula is a tautology i... |
I am looking at the following pseudocode from the Kleinberg-Tardos text "Algorithm Design".
Max-Flow
Initially f(e)=0 for all e in G
While there is an s-t path in the residual graph G_f
Let P be a simple s-t path in G_f
f' = augment(f,P)
Update f to f'
Update the residual graph G_f to be G_f'
Endwhile
R... |
$L_c=\{\langle M_1 \rangle, \langle M_2 \rangle):L(M_1)\cap L(M_2)=\emptyset\}$ prove to be undecidable.
My approach:
We will prove this by reduction $L_{\emptyset} \leq_T L_c$ We begin by assuming that $L_c$ is decidable and that we have access to a black box $Q$ which decides it. We want to construct another Turing... |
So I am currently going though the HoTT book with some people. I made the claim that most inductive types we will see can be reduced to types containing only dependent function types and universes by taking the type of the recuror as inspiration for the equivalent type. I started to sketch how I thought this would work... |
Why do floating point values have infinity instead of just a higher exponent?
|
I have chosen an example task to see if I understood DFA and NFA correctly.
So let's say we have that task:
Given alphabet $\Sigma = \{0,1\}$ and the language $L = \{w \mid w \text{ includes two consecutive zeroes}\}$. Create a DFA and a NFA for the language with as
less as possible states.
The following descriptio... |
unsigned int input = 0xC116D9B5709FED85 unsigned int output = 0
while (input > 0 )
{
if (( input mod 2) == 1)
{
output += 1
}
input = floor(input / 2)
}
return output
I understand how the algorithm is working and using mod to break the input and then counting the number of times input is modded by 2 where it ... |
how do i prove that no DFA with two states can accept the language
$$ L = \{0^i : i \ge 0\} \cup \{ 1^i : i \ge 0\}. $$
I had a lot of troubles coming up with anything that made sense.
|
i had troubles proving this is not regular using the pumping lemma {$a^ib^jc^k : j = i \lor j = k$}. Not sure how to approach this anymore, and help would be appreciated
|
I try to solve the following exercise:
We know that K (x), the complexity of Kolmogorov, is incomputable. Show how
calculate it, if we have an oracle for the membership problem (or for the HALT problem, if it accommodates more).
I have solved it in the following way:
Let (w) be the string to which I compute K (w).
(1).... |
I was working on a Leetcode problem, 3Sum Closest. I came up with a solution but struck it down because I didn't think it could be correct. But, turns out it was. I want to know why.
Here's the problem, transcribed:
Given an array S of n integers, find three integers in S such that the sum is closest to a given number... |
I have been trying to understand Pumping lemmas for a while now, I am doing this exercise and I think that the pin has finally dropped. However, I am unsure if I am doing it even remotely correctly. I will briefly explain my attempt and thus my solution. Thereafter I would discuss a few points that are not as clear to ... |
L = { w : w ∈ {a, b}* ∧ (u, v, z ∈ {a, b}*) (|u| = 2 ∧ |z| = 2 ∧ w =
uvz ∧ u ≠ z)}
Can someone explain me this language? What is w = uvz supposed to mean?
I thought I understood correctly, so the words from this language could be for example: ε, aaab, aaba, bbaa, bbba...
|
I Want to Create Regular Expression from string of {a,b} that it contains neither the substring ab NOR ba?How I can do it?
|
Let $P,Q$ two integral polynomials of height bounded by let say $H>0$ --- that is every coefficient of $p$ or $Q$ is bounded in absolute value by $H$ --- and degree at most $d$.
Let $A$ a set of $d$ reals.
I want to evaluate the sum:
$$
S = \sum_{\alpha \in A} P(\alpha)Q(\alpha),
$$
and more precisely I want to get t... |
Let's say we have given 2 strings $A, B$, and let's suppose that the size of $A$ is pretty small (100 characters) and the size of $B$ is pretty big (1 million).
We define prefix of string $S$ as string $Y$ that contains the first $x$ letters (size of prefix always is less than or equal to size of whole string).
And the... |
Given that $x^2+x+1 (mod 2) = 1$ and $x^2+x (mod 2) = 0$ for ${|x\rangle}_{x=0,1} \xrightarrow{F} \frac{1}{\sqrt{2}}[(-1)^{x}|x \rangle + |1-x \rangle]$ (Fourier transform). So, the 1-1 correspondence $x^2+x+1 = NOT(x^2+x)$ holds over $F_{2^3}$, where the input is the zero polynomial $x^2+x$ and the output is the posit... |
I am somewhat stuck in converting an expression with negative numbers from infix to postfix.
Suppose we have a expression like
a = -b - (-c - d) .
At some places I read that you can parathesize the negative numbers to solve the problem. But if I parathesize them as
a = (-b) - ((-c) - d), then at the beginning of the ... |
The system clock is needed to synchronize all components on the motherboard, which means they all do their work only if the clock is high; never when it's low. And because the clock speed is set above the longest time any signal needs to propagate through any circuit on the board, this system is preventing signals from... |
I read that deterministic grammar helps in preventing backtracking.
Consider a grammar
$$A \rightarrow ab \mid ac \mid ad$$.
Here if input is "ad" then the compiler needs to check each of ab, ac .. and backtrack until it gets to last production.
To eliminate non determinism we modify the grammar as
$$A \rightarrow aB$... |
I have the following problem:
Consider a balanced infinite search tree with branching number $κ$. Consider a
search problem with solutions which may be located at any node of the tree.
The search will not be terminated once a solution is found. The only information about solutions is that if you check a node at le... |
I need to prove that L = {$a^{100}yy^r : \forall y \in$ {a,b}*} is not regular. i have tried using pumping lemma but couldn't get far with it. Any help in where i should go with it?
|
I know that merging two sorted arrays takes worst case n comparisons. However, there will often be cases where one array is depleted before the other, letting us just append the remainder of one array to the combined sorted array. I've also read that merging takes the same amount of comparisons (wrt to n) to any input ... |
My understanding is that, in very rough terms, the Tomasi-Kanade algorithm published in 1992 describes a way to reconstruct the 3D structure of an object from multiple images of that object, given that you have a reliable method of identifying important structural features from the 2D images.
A lack of general informat... |
Somewhere in the forum (a question about p vs np) I read that no exhaustive search algorithm exists for np-complete problems with better time complexity than $2^N$, however the subset sum problem has an algorithm with worst case complexity $O(2^{N/2}$), this looks much better than $2^N$, what is wrong with this?
|
a 2 sat instance which is unsatisfiable and an integer k are given, decision problem is that: is it possible to delete k variables, also remove clauses contain them, in order to satisfy the 2-sat instance?? and optimization problem is that: find the minimum number of variables to remove to make the 2 sat instance sat... |
I am reading http://www.yisongyue.com/courses/cs159/lectures/LinUCB.pdf and come across this slide
What has been confusing me boils down to showing that multivariate Gaussian is conjugate to itself given a Gaussian likelihood. I did quite a bit of searching on both this site and on Google and found the Kevin Murphy's ... |
Will the below statement cause any lexical error ?
int a123c ;
According to me, int would be tokenized as a keyword and there would be a lexical error when "a123c" would be encountered as it doesn't fall into any token category.
I read this question https://stackoverflow.com/questions/31369524/clarification-regarding-... |
Why don't we consider conflicts caused due to augmented production?
This picture shows the states of a LR(0) parser.
In the above picture, why we don't consider shift reduce conflict at state I2 ? Shift on '+' and reduce on E'->E. (Augmented production).
Also what is the need of augmented production at the beginning ?... |
It is possible (using formal semantics) to translate natural language sentences into lambda expressions. So, is it possible to translate those lambda expressions into some logic, e.g. into first-order logic or into modal logic?
I am aware of the Curry-Howard correspondence, but I have not found actual translation, it i... |
While reading Code Complete second edition, I came across this line:
You can do anything with stacks and iteration that you can do with
recursion.
Is this true? or there are functions, that must be implemented recursively, and can't be done otherwise ?
|
If M is a Turing Machine, consider the subset of $\mathbb{N}$ defined as:
$$ \mathrm{ZTM} = \{ x \mid M_x(0)\downarrow \} $$
i.e. the set of 'indexes' of machines that halt on zero. It is possible to use Rice's theorem to prove that this set is r.e. but not recursive.
But I'd like to have a direct proof, using directl... |
We have the following recursive function for the dynamic programming problem for a knapsack problem:
\begin{align}
V(i,w)=&max[ V(i-1,w), v_i +V(i-1,w-w_i)], \quad 1\leq i \leq n, 0\leq w \leq W \\
\end{align}
and $V(0,w)=0$.
But is it possible to add a constraint on the items to this function? If we for instance only... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.