instruction stringlengths 35 29.1k |
|---|
If I can use FIFO queue and read/write registers, can I reach wait free 2 set consensus if I have 3 processes? I thought is I can, but I saw a conclusion from text book says "we cannot achieve 2 set consensus on 3 processes in shared memory system", so I'm confused now.
|
If f(n) is the problem to determine the nth prime number, how fast can this be done, i.e.
What is the fastest known algorithm to find the nth prime number?
What are lower bounds for the time complexity?
|
Finding the minimum Steiner tree is well known NP-hard.
It seems obviois that asking "find a Steiner tree of cost < K" has to be NP hard, because I could solve the original problem by repetedly calling an algorithm that solves the second. But is this "repeteadly call"/loop a valid reduction? There seems to be something... |
Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of model checking of standard properties, like type soundness?
I'm asking this, because I'm reading a book on Alloy and it provides the exact functionality that I want, but for models expressed using r... |
In a simple graph $G$, what is the maximum bound for edges if we want shortest cycle stay at $k$.
How we can find this bound for a graph? Have it any formula or technique to calculate it?
thanks in advance
|
Let $G$ be a graph which is rigid and non-planar (e.g. $K_{3,3}$). Is it possible that $G$ has a planar cover?
Are there any studies on this topic?
|
In this variance based k-clustering paper they claim that for a cluster with S points:
$$|S|\sum_{i \in S}{\|x_i-\bar{x}\|^2} = \sum_{a,b \in S,\ a<b}{\|x_a-x_b\|^2}\,.$$
Why is that? can you please show me the derivation?
|
I've seen the topic of the automorphism group appear in several introductory graph theory books I've looked at. It always feel oddly disjointed and poorly motivated to me.
Is there any practical (or impractical for that matter) applications of knowing the automorphism group of a graph?
|
I'm on a lambda calculus with parametric polymorphism a la Hindley-Milner Haskell-oriented course and I'm currently facing this exercise which I got stuck on.
Prove that $(\forall m\downarrow, n\downarrow :: N)\space (m+n)-m=n$
Definitions:
$(+)=\backslash m \space n \rightarrow case \space m \space of \space \{0\right... |
I'm trying to understand Sipser's example showing that $ALL_{nfa} \in Co-NSPACE(n)$, where $$ALL_{nfa} = \{ <A> | A \text{ is an NFA such that } L(A) = \Sigma^*\}.$$
The algorithm can be seen here.
I'm confused by a few things, but mainly what is meant by "nondeterministically select an input symbol"? If I "nondetermin... |
I want to get an algorithm with $\theta(nlogn)$ time complexity that search for two elements in an array of integers, which their sum is equal to $x$ such that x is an integer and $n$ is array size.
|
I am trying to understand the proof of correctness for Dijkstra's algorithm (shown below) and also at the following link: CS Auskland
Proof by contradiction
Suppose that $u$ is the first vertex added to $S$ for which $d[u] \ne \delta(s,u)$. We note:
$u$ cannot be $s$, because $d[s] = 0$.
There must be a path from $s$ ... |
I'm having trouble understanding the proof of the undecidability of the Halting Problem.
If $H(a,b)$ returns whether or not the program $a$ halts on input $b$, why do we have to pass the code of $P$ for both $a$ and $b$?
Why can't we feed $H()$ with $P$ and some arbitrary input, say, $x$?
|
In the set cover (SC) problem we are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the universe. The set cover problem is to identify the smallest sub-collection of $S$ whose union equals the universe.
If I add the constraint that $m=n$ to SC, is this new problem sti... |
Consider the basic non-recursive DFS algorithm on a graph G=(V,E) (python-like pseudocode below) that uses array-based adjacency lists, a couple of arrays of size V, and a dynamic array stack of size <= V. If I understand correctly, this is a cache oblivious algorithm since no information about the memory configuration... |
I understand the basics of Skip Lists and their implementation also the basic Search Insert Delete functions and their run time complexity. Recently after a lecture, a professor proposed an interesting question. He asked what we suspected the total time building a skip list using randomization.
A few hints were given:... |
Brain-Flak is a minimalistic, stack-based, Turing complete, esoteric programming language.
A big concern among Brain-Flak enthusiasts is a concept informally called "stack cleanliness".
The basic idea for stack cleanliness is that only certain values on the stack will be edited and all other values will remain uncha... |
I was learning Hidden Markov model, and encountered this theory about convergence of Markov model.
For example, consider a weather model, where on a first-day probability of weather being sunny was 0.9 while that of being rainy - 0.1. The transition distribution probabilities were - probability of sunny on current day ... |
I’m currently working on a finger exercise for mit6.00.2x, a MOOC in computaional thinking, and was having some issues.
First of all: don’t worry, I don’t need you to do my homework for me, I just want to clarify an aspect of the question.
So, the original question asked us to program the computer to find all subsets o... |
Since machine language executes instructions on ALU, CPU register and memory, is correct say that machine code abstract the Von Neumann model?
If exists, semantically, what is the relation between machine code and Von Neumann architecture?
|
On a Turing machine, the state changes during the execution of the program. Von Neumann architecture implements this machine theory and typical computer hardware uses Von Neumann architecture.
Imperative programs uses the state to describes their computations.
Semantically, is correct to say that imperative program wor... |
Is there a generally accepted symbol for indicating instantiation. That is indicating an object is an instance of a class.
My first guess is to use a left arrow with a double or triple line but this seems more like a functional programming symbol, based upon what I've seen of Haskell.
Wikipedia has no examples and a qu... |
Year 12 high school student here, but my ambition is set on Automated Theorem Proving. I wish to apply it to, of course, mathematics and computer science, and maybe if possible other applied subjects like physics, chemistry or even analytic philosophy.
I have yet to go to university to do a bachelor degree in Computer ... |
I was reviewing the post If $L$ is context-free and $R$ is regular, then $L / R$ is context-free?
I completely understand why $L/R$ is context free.
I just tried a different approach, which is not that rigorous according to the answers given. It is just based on the basic understanding.
How I tried :
Let $L = a^N b... |
We have alphabet $\Sigma = \{ { a, b} \} $.
How to construct CFG for language $\Sigma^{\ast} - \{a^{n}b^{n} | n \ge 0 \}$.
I suggest that is very easy, but I can't invent. I know PDA for this language if it can help.
|
I am learning basic grammar and parsing concepts and ran into this statement:
Nonterminal symbols represent syntactic entities: statements, declarations, or expressions.
But the three terms (statements, declarations, expressions) were not really defined. I have plenty of programming experience so I have a fairly intu... |
Show that $x^{3}$ = $O(x^{4})$ but that $x^{4}$ $\neq$ $O(x^{3})$.
|
Having learned a rough summary of Hoare logic (i.e. learning just the basic concept of Hoare triples and a few of the rules) I kept seeing a statement along these lines:
The rule of consquence allows us to strengthen the precondition and weaken the postcondition. (paraphrased)
What does it actually mean to strengthe... |
Let $A = (Q,Σ,\delta,q_0,F)$ be an NFA such that $L = L(A)$.
We define a DFA $A'=(Q',Σ,\delta,q_0',F')$ as:
$$
Q'=2^Q, \qquad q_0'=\{q_0\}\\F'=\{q\in Q \mid q'\cap F \neq\emptyset\}
$$
My question is how we know what elements $Q'$ has? What is the formal definition to obtain these elements? Because it can contain all... |
Imagine a finite $n*n$ grid graph $G(V,E)$, much like a chessboard. Imagine further an undirected subgraph $H(V',E')$ of $G$. Let us call the squares of chessboard $G$ "faces". A DFS algorithm can detect a simple cycle in $H$ in linear time. However, such a search cannot efficiently find all simple cycles in $H$ as the... |
In the section 6.2.3 (Volume 3) Donald Knuth says:
... we can ask about the number $B_{nh}$ of balanced binary trees with $n$ internal nodes and height $h$. It is not difficult to compute the generating function $B_h(z) = \sum_{n\ge0} B_{nh}z^n$ for small $h$, from the relations
$$B_0(z) = 1,$$ $$B_1(z) = z,$$ $$B_{h+... |
Let $\mathrm{SpaceTMSat} = \{\langle M, w, 1^n\rangle\mid\text {DTM $M$ accepts $w$ in space }n\}$.
How do I prove that this language is PSPACE-complete?
NP contains NP-complete problems and so does PSPACE. Am I supposed to prove it the same way as I would prove an NP-complete problem?
|
We have a graph with connections to vertices given to us. For example, consider that following pairs of vertices are connected:
1 & 2
2 & 3
3 & 4
4 & 5
5 & 6
Now the graph becomes 1-2-3-4-5-6. Maximum vertices I can drop such that atleast one of their neighbors is still in the set, is: 4. This is because I can drop al... |
Sometimes I can see the recurrence relationship and other times I cannot. This is one of those times. I've gone through a few iterations of trying to solve it but I also find a set of values where my idea fails. If I go exponenetial I can figure it out... but that's a specific no-no.
I'm good with nudges in the right d... |
I am writing a genetic algorithm for Machine learning and came across Pittsburgh approach in some research papers. The papers didn't explain the algorithms proper or I am too stupid to understand. I know that each Individual contains set of rules and I have also implemented in binary but am having trouble with 6 float ... |
What are sequences? How do we denote the numbers inside them?
I know that in terms of computer science, a sequence of items is an array.
|
If I can assume that it is NP-complete to determine whether a set of objects can be packed into 2 bins, how can I prove that it is NP-complete to determine whether a set of objects can be packed into 3 bins?
I understand that this is like the Knapsack problem, but I am having trouble going backwards essentially, since ... |
I have a bunch of wmv files (~300), named the following way: video1.wmv -> videox.wmv. Some of these video files, are exact duplicates of one another (same format, same bitrate, same length, basically, they were copied and renamed, so the only thing that differs from them is their name). Is there any way to find out if... |
So I was given this algorithm to compute the efficieny in which I found sorts an array into ascending order.
solvethis(T[1..n])
for i = 1 to n-1 do //n
minJ = i //n-1
minX = T[i] //n-1
for j = i+1 to n do //sum_{i=1}^{n} t
if T[j] < minX then ** //sum_{i=1}^{n} t-1... |
Statement comes from this answer. A blanket statement that this is a well-known fact is made in this other question.
I have never heard of a language equation. But I am just a student. Given the syntax, is this equating the derivations of a CFG grammar to equations?
In other words, is this bit from the answer $A=ABa$ m... |
Since Turing machines has great influence on typical hardware architecture (Von Neumann) and both uses concept of state, is correct to say that an imperative program is analogous to how a Turing machine works?
“Computability via Turing machines gave rise to imperative
programming. Computability described via λ-calcu... |
Consider the following unary operation on languages:
min(L) = {x ∈ L | no proper prefix of x is in L}
Prove that regular languages are closed under this operation; that is, prove that if language L is regular, then so is min(L).
(hint: construct a DFA to accept Min(L) based on the DFA accepting L)
After searching... |
Say for an example,i have Color codes that are : A , B , C I want to repeat this colors so i ll put them as : 5A , 10B , 10C = 25 So now A will repeat 5 times ,B will repeat 10 times and C will repeat 10 times.
Now i have 16 hands. in which i can allocate those colors.but problem is i can not allocate it more than 16 a... |
I have the following homework problem, with given solution but I do not understand why certain choices in the solution were made as opposed to my own (incorrect) solution and I would like some clarification.
The question is to compare the growth rates of several functions using o, O and $\Theta$. It is the first time ... |
IBM is working on a neuromorphic computer, Synapse, intended for computation based on artificial neural networks.
My question is, what makes these types of computers more efficient at processing neural network algorithms, compared to GPU's?
|
If we have a language $F$ and a regular language $D$ (a finite set) then can we say anything about the intersection of $D$ and $F$? Will the intersection of the languages be finite or regular?
This question arises from another question which says
Show that if $L$ is not a CFL and $F$ is finite then $L - F$ is not a CF... |
First i began with the definition of $\theta$ as below:
$c_1n \leq k \log(k) \leq c_2n \implies c_1\frac{n}{logk} \leq k \leq c_2\frac{n}{logk}$
and we also know if $k\log(k) = \theta (n)$ then $k = O(n)$ then $k \leq cn$ thus $c\frac{n}{logn} \leq c_1\frac{n}{logk}\leq k $ and thus $k = \omega(\frac{n}{\log(n)})$.
In... |
I am going through undecidability of TM and found this question
$L=\left \{ \left \langle M \right \rangle |M\ is\ TM \ and \ number\ of\ strings\ in\ the\ language\ \ is\ prime\right \}$
I think it is decidable as number of strings in the language is prime ,i.e , 2,3,5,7,11,13,17,............. It seems to me like it i... |
My question is N(a)=2N(b) ; No of a's = 2 * No of b's . So for every symbol b can I pop 2 a's simultaneously
|
In Sipser's text, he writes:
When a probabilistic Turning machine recognizes a language, it must
accept all strings in the language and reject all strings not in the
language as usual, except that now we allow the machine a small
probability of error.
Why is he using "recognizes" instead of "decides"? If the ma... |
Big data era, people say the big data systems must use the scalable data structures and store.
I didn't get the point here. I need some examples.
What are the good examples of (1) scalable and (2) non-scalable data structure respectively?
Can any one give me an idea on it?
|
I will start of with an informal example and give a more formal problem definition later.
Say I have a finite set of positive real values: $\{2.3, \pi, 4.382, 0.3\}$. Using normal addition and multiplication, we can construct expressions like $(\pi + 2.3) * 0.3 + 4.382$ and $(0.3 + \pi) * (2.3 + 4.382)$. We put the fol... |
I am trying to find a solution better than O(n2) for the following problem:
There are N points on a 2-D plane (N $\le$ 106), with integer coordinates between -105 and 105. Each point has an associated integer "reach radius" Ri (0 < Ri < 105).
Build a directed graph (represented by adjacency lists) in which these poin... |
I am trying to use machine learning to detect and locate an object in a greyscale image. I have about 700 images which are 360x360 pixels in size.
See below for an example of the object and image:
In the first image, the object is indicated by the red arrow. In the second image, the object doesn't exist. Additionall... |
Is there an explicit term for a member of a class that is not inherited from any parent class?
class Vehicle {
int weight;
}
class Car extends Vehicle {
int numDoors;
}
Car car = new Car();
car.weight = 10000; // weight is an "inherited member"
car.numDoor = 4; // what's the term for numDoor?
|
There's an n x n chessboard where some cells are instead holes. I want to have as many rooks as possible in a way that the rooks won't be able to capture each other. Rooks cannot be placed on the holes but can jump over them. How can I solve this problem using the finding maximum matching principle in a bipartite graph... |
It is mentioned in Sipser's text that the complement of SAT is in $IP$, before $IP$ is formally introduced. After looking at the definition and some of the results, I still don't see why this is the case.
Is this supposed to be seen directly? Or is it easier to show that it is in $NPSPACE$, which would prove the claim ... |
If I know all the distances between a set of nodes and I also know that one of the nodes is at location (0,0), using the distances between the nodes, can I calculate the absolute positions between all of the nodes? I feel that this will involve some form of trilateration but only a single node position is known. Will I... |
I have an array of known patterns with optional wildcards. For example this array that has 5 patterns:
ab*e
hkl
abcd*
ab
sdfs?f
now I need to find the elements within the array that match an arbitrary string.
This can be solved with regular expression by converting the patterns to regexp and looping over the array an... |
I understand that $(0 U 1)^*$ is the set of all binary strings. However, what do the other two expressions create?
Could someone please provide examples of what strings these languages would accept?
$L = \{0,1\}^*$
$L = \{0,1\}^+$
|
If I had to write the Huffman encoding as a recursion in terms of the cost $C_{ij}$, given weights/frequencies $W = [w_1,\ldots,w_n]$, how would I do it? (where this is creating a minimum cost tree, $C = \sum_i w_i \cdot \mathrm{depth}_i$).
I am going off of Dasgupta's Huffman procedure:
procedure Huffman(f)
Input: ... |
I'm looking to classify words into type categories like sushi to food, baseball to sports, happy to emotions, panda to animals etc.
What is this type of classification called? I see lots of NLP-related articles discussing parts-of-speech classifiers. This isn't helpful.
I know any word has many possible categories. For... |
I developed an algorithm and have a recurrence for its runtime; I want to show the expected runtime is $O(\sqrt{n})$.
At each iteration $i$, I have a random variable $k_i$ that is equal to the number of heads after flipping $\frac{n}{2^i}$ coins minus $\frac{n}{2^{i+1}}$ (i.e. a binomial distribution centered at 0 with... |
So I'm working on a project and I'm totally stuck right now on how to generate an nxn matrix in Matlab (where n is defined by user input). I need to make a matrix that has ones diagonally, zeroes below it, and values of negative one above. As a 2x2 example shown right here:
[1 -1
0 1]
I would show the code that I h... |
My question is in the context of a paging virtual memory system.
THE PREMISES:
The function of resident set management (RSM) is to:
Impose an upper bound on the cardinality of a process' resident set.
The ostensible benefits of RSM are:
Reduce the overall page fault rate by preventing one process from dominating... |
So I'm watching an Algorithms course in Coursera, and we are currently discussing hash tables. He's talking about the importance of a good hash function, and about how an ideal hash function would be a "super clever hash function guaranteed to spread every data set evenly".
Then, he explains that the problem is that su... |
I am trying to solve the following:
Given a set $S_0$, find min $|S|$ where $S_0 \subseteq S$ subject to:
$\forall s \in S$ $\exists$ $s_a, s_b \in S $ $|$ $ ( s_a \neq s, s_b\neq s ) \land ( s = s_a + s_b \lor s = 1 \lor s=2 ) $
Or in english, forall s in S there exists sa, sb in S such that sa != s, sb != s AND ( s =... |
Given disjoint languages $X$ and $Y$, where $X$ is NP-complete and $Y\in P$ , how do I prove that $X\cup Y$ is NP-complete?
My idea is to prove that $(X\cup Y)\in NP$ and then prove that $X\cup Y$ is NP-hard:
I can prove $(X\cup Y)\in NP$ by saying that since both are in NP, they each have polytime verifiers. Thus we c... |
I have two functions $T_1(n),T_2(n)$. How do I decide which is asymptotically faster?
One is given by the recurrence relation
$$ T_1(n) = \sqrt{n} T_1(\sqrt{n}) + 3 n, \quad T_1(1) = T_1(2) = 1. $$
The other is given by the recurrence relation
$$ T_2(n) = 3 T_2(n/3) + 2n \log n, \quad T_2(1) = T_2(2) = 1. $$
For the fi... |
If I can easily state the number of steps for an algorithms for certain values of $n$, e.g. for $n = 2^k$, where $k$ is a whole number, the number of steps is $n\log n$, is this enough to allow me to state the complexity is amortized $O(n\log n)$?
I have a tree building algorithm - when adding elements a rebalancing op... |
I'm a self-taught and I'm studying from CLRS.
I'm having difficulty with this recurrence relation:
$$T(n)=3T\left(\left\lfloor\frac{n}{2}\right\rfloor\right) + n$$
The problem is that I can "prove" that $T(n) = \mathcal{O}(n)$. It's absurd.
My inductive hypothesis about $\mathcal{O}(n)$ is:
$$\exists c \gt 0 \,\,\exist... |
I was reading page 6 of https://www.cs.cmu.edu/~reids/planning/handouts/Linear.pdf
And it is not clear to me that the STRIPS algorithm necessarily terminates.
Namely if we have a simple goal sg on the stack, and CANNOT find an operator O whose addlist includes all of sg, how do we go about picking operators? At this po... |
I am having a simple doubt in C programming language.
In any simple C code snippet, if by mistake suppose i have written intmain() instead of main().
Then it represents what type of error ?
It will not be a lexical error as compiler will correctly make a token for it and it is also not a syntax error clearly.
I thin... |
We know $$\mathsf{PP=RP},\mathsf{coPP=coRP},\mathsf{PP=coPP=coRP=RP=ZPP=BPP\subseteq P/poly}$$ are equivalent and the polynomial hierarchy collapses to $2$nd level.
What are the other non-trivial collapses and consequences?
|
Could anyone kindly point me to revenant literature in computer vision/graphics that detail on metrics for image/visual complexity and how to regularize that?
More specifically, I am trying to design a neural algorithm for creating business logos and one major difference from image generation problems in CV/CG is the s... |
Permutation rules are called those which are of the form $AB\Rightarrow^*BA$1. It is also proven that permutation rules expand context-free grammars and allow them produce non-context-free languages.
My question is: are any examples of context-sensitive grammars, which doesn't contain any permutation rules but still ab... |
The following question is supposed to give you insight on how to maintain logic when making programs. Please be open minded as this may not look like a Computer Science Problem, but it definitely contains logic that you will use when making If statements and Booleans, so PLEASE keep that in mind.
Who Robbed the Nationa... |
I've read a lot about batch normalization and how it is implemented. But I couldn't understand when to use batch normalization or not. What should we notice about the CNN to know that a batch normalization would give us an improvement on the accuracy?
|
There are two factors that decide the running time of the insertion sort algorithm:
the number of comparisons, and the number of movements.
In the case of number of comparisons, the sorted part (left side of $j$) of the array is searched linearly for the right place of the $j^{th}$ element. If instead, we use a binary ... |
I have two sets $S,T$ of points in the 2-dimensional plane. I want to find the closest pair of points $s,t$ such that $s \in S$, $t \in T$, and the Euclidean distance between $s,t$ is as small as possible. How efficiently can this be done? Can it be done in $O(n \log n)$ time, where $n = |S|+|T|$?
I know that if I'm... |
how is it possible to calculate this kind of problem that asks to find the maximum amount of nodes in ternary tree where the maximum distance from a node to another node is 3?
if the maximum distance was 1, the answer would be 4.
|
First, a few vague definitions:
Circular queues (or circular buffers) are data structures like normal queues but with their ends connected together (forming a "circle").
wikipedia
Let's say that 2 circular queues are equal if they have the exact same elements in them and the order of items in them are exactly the same.... |
I read about TRIE data-structure and is slightly confused about detecting end-of-word. Why do we create another node to detect end-of-word? why cant same node be used it. For example, we have to construct a TRIE for word CAT. Now, as per specification, there will be 4 nodes; in which last node will contain a field
"i... |
My attempt is this:
This is similar to proving whether a language {w^p|p is prime} is regular or not.(For the prime case)
Suppose on the contrary that this language L is regular. Let p be its pumping length and t be a prime greater than p. (Note that t exists since the number of primes is infinite.) Then, wt ∈ L, and b... |
First time posting.
I know this is a very generalized question, sorry for that, I don't know how to more appropriately word this.
I've noticed a tread, a pattern in methods, it seems in almost all methods, for example, in Java (haven't programmed much in other languages although I would imagine it's the same) the meth... |
I'm (foolishly it turns out) confident that the answer to this question is no. So why am I asking?
Because Dr. Aleksandar Prokopec at EPFL in his parallel programming course introduces a data-structure for which he asserts various properties. If these properties hold then it seems to me that it must be possible to buil... |
I have to build a cycle with fixed length $n$ that includes exactly $k$ corners inside $w$ x $h$ rectangle.
For example:
$w = 5\\h=3$
$n = 12\\k = 6$
I have already found out that I need at least $4$ corners and number of corners and number of non-corner elements needs to be even number.
Then I write an recursive algo... |
The complexity of Dinitz's algorithm (used to find maximum flow in a network) is O(V²E). I am trying to find a network, which is forcing the algorithm to use as much steps as possible.
I was thinking about a complete graph with some smart configuration of capacities, but I am not able find anything, that would seem to ... |
Given a dense assignment problem ($n$ tasks assigned to $n$ workers, where each worker can do any one of the tasks), I understand the best complexity is $O(n^3)$, using the Hungarian Algorithm or variants.
However, if $n$ is large, $O(n^3)$ may not be feasible from a timing perspective. Moreover, storing the complete $... |
An elevator with a capacity of N people in a building with E floors works in a pretty unusual way.
The elevator starts at the first floor and it goes to the top floor before returning to the first floor.
It stops at every floor that is a destination of a person in the elevator.
It also stops when 1) there is someone... |
In Sebesta's Concepts of Programming Languages 10th edition on page 189 he explains the concept of $\text{FIRST}$ sets using the following example:
$A \rightarrow aB \ | \ bAb \ | \ Bb$
$B \rightarrow cB \ | \ d$
The $\text{FIRST}$ sets for the RHSs of the $A$-rules are $\{a\}$, $\{b\}$, and $\{c, d\}$, which are clea... |
The question is related to databases:
There is a relation $R(A_1,A_2,...,A_n)$. Every $(n-2)$ attributes of $R$ forms candidate key. Number of superkeys of $R$ are?
I thought if any one of the $(n-2)$ attribute combinations is chosen then the number of superkeys that can be formed with it will be 4, as there will be ... |
My apologies in advance if this is going to cause further confusion. So, I wrote a very simple recursive method shown below. As you see line # 3 keeps track of value of n before recursive call and line # 5 keeps track of n after recursive call. As you can see both lines # 3 and 5 are printed to see the change in n val... |
Suppose I have a graph on which I've run the Bellman-Ford algorithm. Now I change the weight of subset of edges. Is there an efficient way to re-run the algorithm without having to completely start over? That is, can I update the shortest path in an "online" manner, if I'm only changing a subset of weight edges each ti... |
There are mentioned many classes of undecidable formulas in the book "The Classical decision problem" http://www.springer.com/la/book/9783540423249. Kahr formulae is one class of undecidable formuls and it can be expressed in prenex normal form by $[\forall\exists\forall, (\omega, 1), (0)]$.
There are two questions.... |
I would like to ask under which circumstances can these optimizations be used,supposed that they are part of a bigger NFA and when can they lead to an error ??
|
I know that set cover problem is NP-complete. We are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the universe and an integer $k$. The set cover problem is to identify a sub-collection of $S$ of size $k$ or less whose union equals the universe?
Now if I remove or les... |
Sorry if this is the wrong forum for this question. My understanding was GPUs were more efficient for running neural nets, but someone recently suggested GPUs are only needed for the training phase. Once trained, it's actually more efficient to run them on CPUs.
Is this true?
|
Prove that $H_r(S) = H(s) / \log_2r$.
I'm not sure how to prove this. Any help would be greatly appreciated!
|
G=(V,E) is an undirected simple graph in which each edge e has a distinct weight, and e is a particular edge of G. Which of the following statements about the minimum spanning trees (MSTs) of G is/are TRUE?
I. If e is the lightest edge of some cycle in G, then every MST of G includes e.
II. If e is the heaviest edge of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.