instruction stringlengths 35 29.1k |
|---|
I want to find subgraphs in a graph that are only connected to the rest of the graph by two nodes; for example, node A is connected to the rest of the graph, as well as node F, but nodes B-E are only connected to each other and A and F (don't have to be fully connected). Is there a name for this? And is there an algori... |
[Problem Description]:
Given an array of size $N \times N$, the task is to find the rectangle with maximum perimeter weight in the array. The perimeter is defined as the number of cells on the sides. The perimeter weight of a rectangle is defined as the sum of all the values lying on the sides of the rectangle.
For ex... |
I was thinking in the following approach for solving a problem that is believe to be a NP-hard problems today in polynomial time, assuming the following:
There exists a believed-today NP-hard problem called $X$, where its whole input space can be divided into a finite set of groups such that there exists a correspondi... |
I'm solving a differential equation on the form $\ddot x = f( \dot x, x)$ on a microchip within a limited (real world) time frame, hence I want to use an adaptive step size to get as good of a result as possible. However, I only have a limited number of iterations, $N$, to solve the system. If I use the "regular" adapt... |
While converting CFG to CNF sometimes it is suggested to add extra step.
Add new start symbol S0 and add new derivation S0 -> S. Book Hopcroft Ullman does not suggest this step but many other articles suggest to add this step.
What is purpose of adding this extra derivation?
|
The max-flow algorithm finds the maximum flow through a graph given edge capacities. However, if there is an option between flowing through two edges, it will typically just leverage one of those edges fully and ignore the other. One can influence which of the edges should be preferred by using "min_cost_max_flow" and ... |
I am wondering how you could possibly define the implementation of an imperative function as a type. Is it possible? Currently I only see the input parameters and output result used in the definition of a function type, but how could you also include the implementation in the type definition?
|
I am writing a compiler in CPP using Flex and Bison and having trouble understanding passing values up the syntax tree in bison.
I have grammar like this below, 'exp' would evaluate to any number.
args_list: exp | args_list comma exp;
array_list: datatype identifier '[' number']' equal '{' args_list'}'{$$ = new array... |
I'm having difficulty proving undecidability of "is this CFG prefix-free?". (this proof is given as problem 5.32b in Sipser 3rd edition).
Another thread has the very different question "is this regular language prefix-free". One of the answers in that thread claims to prove undecidability for CFLs (even though that did... |
I am studying regular express. I understand how to proof a xa ya. However, I don't know how to proof the below problem. Please help me.
L = { xa yb | a ≠ b }
|
Suppose that P != NP. Then there exists 3SAT formulas such that their satisfiability is computationally "evil" (i.e, the satisfiability can be exponentially hard to determine in the size of the formula).
Primality testing can be reduced to the satisfiability of a multiplication circuit, which can be reduced to the sati... |
I am working on the base of a language model, and am wondering how to represent the base type, which is a type Type. I have heard of an "infinite chain of types", but (a) I can't seem to find it on the internet while searching anymore, and (b) I am not sure if that's what I need or what it really means in practice.
Bas... |
I presumed they were equal, such that both resulted in aabb. However, I'm told they are false and I don't know why.
Is it because in the second one, we would concatenate a · b before raising to the power of 2, thus resulting in abababab? Or because in the first one you concatenate first, thus resulting in abab?
Thanks ... |
This is a question in my textbook, it requires me to write an algorithm to find the median of a bitonic sequence in $O(\log n)$, where $n$ is the number of elements (a bitonic sequence is a sequence that is non-increasing first, and then it's non-decreasing after some point). How do I approach this? I feel like it has ... |
Total Memory size = 65,536 bytes
Number of cache blocks = 32 cache blocks
Cache size = total 512 bytes
So using this info provided I cannot figure out how to calculate the cache block number.
I know if number of cache blocks =2^M then the last M bits is the cache index. But how to calculate the block number? and then f... |
void partition(int a[], int L, int R) {
int i = L;
int pivot = a[R];
for (int j = L; j < R; j++) {
if (a[j] <= pivot) {
swap(a[i], a[j]);
i++;
}
}
swap(a[i], a[R]);
}
My code is above. My loop invariant is "At the beginning of the iteration, j is in the range of a[L] to a[R-1]". Is this correct... |
The Partition Problem supposes that we have a set $S=\{s_{i} \in \mathbb{R^{+}}\}_{i=1}^{n}$, is there a subset $T$ such that $\sum_{s \in T} s = \sum_{s \notin T}s$?
I have read a lot of proofs using the Subset Sum problem: Given an integer set $S$ and an integer t, does there exist a subset $U$ of $S$ such that $\sum... |
Given a context-free grammar in Chomsky normal form, is it decidable whether that grammar has any useless rules? By "useless", I mean a rule that can be omitted from the grammar without changing the language.
Note this is not the same as asking whether the grammar has the minimum possible number of rules to generate th... |
I wanted to calculate the complexity of this pseudocode. In my knowledge, it is $n^2$ because the last loop only runs 8 times. I wrote a program to test it tends to run 8^logn (approximately). can you help me to find the correct answer_
1: procedure f(n)
2: for i := 1 to n do
3: for j := 1 to n do
4: ... |
Motivation
So the other day I had fun providing a new solution to this famous question. In the analysis part I showed that my little algorithm has space complexity: O(k) and Ω(log(k)). However, my rough logic says that we should be able to prove a tighter bound of O(min(k,log(n))), but I was unable to prove it. Moreove... |
I need to prove the statement $\exists$ a minimum cut $(S', T')$ where $S' \subseteq S$ for any minimum cut $(S, T)$
My attempt: Before proving this statement, I have a lemma if $(S_1, T_1)$ and $(S_2, T_2)$ are both minimum cuts, then $(S_1 \cap S_2, T_1 \cup T_2)$ and $(S_1 \cup S_2, T_1 \cap T_2)$ are minimum cuts ... |
LR parser for a (CFG) grammar uses a handle-find automaton (which is a DFA) to find the handles. Such automata can be constructed by computing the canonical collection of sets of LR(0)/LR(1) items.
Is there a way to obtain the RE of the handle-find automaton, directly from the given grammar?
Example: Below are the gra... |
I am searching a fast pseudo-random permutation function with the following requirements.
Given a predefined set of values $V$ and an integer $k$. Split $V$ to $k$ subset, and iterate over any subset in order.
In more detail, we need an $n$-length ordered value set $V$ splitted to $k$ (contiguous) partitions. Partition... |
I was reading formal proof of Rice theorem in wikipedia: https://en.wikipedia.org/wiki/Rice%27s_theorem#Formal_proof
I want to know is what we used here is the reduction algorithm : we reduce the Halt problem language to the semantic problem language?
Thank you so much
|
Let $G = (V,E)$ be a directed graph where every vertex is represented by an $n$ bit string. The edges are represented by two polynomial-sized circuits $S$ and $P$. There is an edge from $u$ to $v$ if and only if $S(u) = v$ and $P(v) = u$. I am trying to prove:
$G$ just contains paths, cycles, or isolated vertices.
Let... |
Prove that if $g ( n ) ∈ ω ( 1 )$ and $f ( n ) ∈ o ( g ( n ) )$, then $2 f ( n ) ∈ o ( 2 g ( n ) )$.
I was going over this question in my Algorithms class and could'nt understand why first condition has to be met. How would $g ( n ) ∈ ω ( 1 )$ affect our reasoning? Also, what would happen if instead of $g ( n ) ∈ ω (... |
Given a neural network(assuming no regularisation/dropout), I want to determine the computational cost of doing a forward and a backward pass of a datapoint. I want the measure to be of independent of the programming language/operating system involved. I can think of it as a graph model, with some activations applied o... |
First off - I'm not a Computer Scientist, I'm a Software Developer - so when it comes to presenting an idea in a formal manner to a Computer Scientist, I have no idea how to do so. As such, I'm wondering if someone would be good enough to show me how to write the algorithm/idea I've outlined below in some form of forma... |
I want the regula falsi to get x +- .0001 so that f(x) = 0. But all the implemetations I see get x so that f(x) +- .0001 = 0 which doesn't make much sense. (f(x) = x^3).
How do I stop the regula falsi method when the error is .0001 on the x-axis?
I have this scilab code:
function salida = falsaposicion(fun, tolerancia... |
Show that $L=\{a^x b^y c^z : x=2y \lor y>z\}$ is not regular using the pumping lemma.
I know that in order to use the pumping lemma, I have to assume that $L$ is regular. Then I know that there is a $p$ such that every $w \in L$ such that $|w| \ge p$ can be represented as $xyz$ with $|y| \ne 0$ and $|xy| \le p$, so t... |
This question is from Section 15.5 of Introduction to Algorithms (third edition).
We are given sequence of keys, $ k = \{ k_{1},k_{2},\dots,k_{n} \}$, where $k_{1}<k_{2} <\dots<k_{n} $.
For each key $k_{i}$, where $1\leq i \leq n$, we have a probability $p_{i}$ that a search will be for $k_{i}$.
We let the sequence $d ... |
Given $A,b$, let $Ax \le b$ be an instance of linear programming on the variables $x=(x_1,\dots,x_n)$. Assume that the constraints $0 \le x_i$ and $x_i \le 1$ are included in $A,b$.
Suppose that there is a feasible solution $x \in \mathbb{R}^n$ to the linear programming problem where $x_1 = 1$. Also, suppose there ex... |
Consider a Turing Machine which (1) reads all its input and (2) accepts inputs arbitrarily large. Given the affirmative answer to the previous question that there must be a loop in the finite-state control as its inputs get larger, could we conclude that there may be more than one loop in such a machine? That is, there... |
In online knapsack problem, items arrive one by one. Each time an item $i$ arrives, its weight $w_i$ is revealed. We would like to maximize, in an online fashion, the number of items placed in a bin of capacity $W$.
The proposition that I am trying to prove is that no deterministic competitive algorithm exists for this... |
I have a graph G containing cities (vertices V) connected by distanced roads (weighted undirected edges E).
Characteristics of the graph:
Each city is connected to the rest of the graph
Each city has an index value where the index is equal to minimum number of roads you need to use to get to the capital from this cit... |
I have an almost fully connected graph in python with roughly 3k nodes and 9M edges. Each node in this graph is represented by a point in R3 and each edge represents the distance between them with a weight given by a weight matrix.
My goal is to visualize subnetworks (areas where points close to each other also have a ... |
void min(arr[], n){
for(i = 0;i < n; ++i)
{
// Change < to > if you want to find the smallest element
if(arr[i] > arr[i+1])
arr[i] = arr[i+1];
}
To avoid wording about a "just check my work" question. I will try to explain what I do not understand about this topic of loop invaraints. I have been having th... |
I'm trying to design an algorithm for some specific arbitration requirements and I have a feeling I'm on well-trodden ground, but lack the maths background to properly analyse it. If someone could point me in the direction of further reading or prior work (or, of course, develop a complete answer should you wish) that ... |
Problem: Prove $p \rightarrow (q \vee r), \neg q, \neg r \vdash \neg p$ using Modus Tollens.
I need to prove the validity of the above sequent by using natural deduction. Initially, I didn't read the entire problem, and went the long way by doing an implication-elimination, two negation-eliminations, an or-elimination,... |
One of the most challenges in distributed consensus mechanisms is both time complexity and message complexity.
For example, PBFT message complexity is O(n^2) that means that it is only scalable to tens of nodes. Thus, classical BFT (Byzantine Fault Tolerant) consensus mechanisms are not scalable to the large networks.
... |
Here is the question again : Give an example of two increasing functions f (n) and g(n) from the set of positive integers to the set of positive integers such that neither f (n) is O(g(n)) nor g(n) is O(f (n)).
I tried with several functions such as sine and cosine, but they are not increasing functions but Oscillatory... |
Is it possible to encode two 6-bit wide positive integers a and b guaranteed to be in [0, 63] in a way that a and b are recoverable -- in fewer than 12 bits? We could obviously concatenate the binary representations (a << 6 | b). The scheme would have to allow any two arbitrary values within the given range. Can we do ... |
Let's say we have a directed graph in which each pair of adjacent edges has a weight; or, alternatively, each ordered triple of vertices A, B, C has a weight $W(A,B,C)$ of going A->B->C.
I am looking for a generalisation of a widest path in such graph, that is, a way to find a directed path between given two vertices, ... |
Claim: If we are training a hard-margin SVM on a set of perpendicular training vectors which can either be classified as "positive" or "negative," will every training vector end up being a support vector if the data is linearly classifiable?
I can't seem to come up with a counterexample to this claim. Any ideas?
|
Some programs run quickly, some programs run slowly, and some spend all eternity whirring and whizzing without ever halting. The halting problem uses a thought experiment to prove that there cannot exist a program which can itself examine any arbitrary program and tell the user whether the program being examined will h... |
I heard that some operations involving regexes that do not have common elements can NOT be generated using a finite automata. I do not remember what it was, where it was from, can anyone tell me what that could possibly be?
Edit : I finally managed to find the exact statement. Here it is, below :
A language (like $(00)... |
I'm learning some Data Structures and I cannot figure out the difference between the Balanced BST and the AVL Tree. From my understanding, an AVL tree is a balanced tree with the height difference <= 1.
But then what about the Balanced Binary Search Tree? What's the difference here?
Let's take an example:
I have a sort... |
Let $A$ be a ring such that all elements of $A$ are complex computable numbers. I'm interested in knowing whether the decision problem that asks, given $P\in A[X]$, if $P$ has a root in $A$ is decidable.
I know that this problem is decidable for the following rings:
$\mathbb{Z}$, since we can easily bound the absolute... |
I have a successful completed proof which used induction. but I essentially proved the goal on the base case by tactic discriminate. Why is this induction proof still stands?
the principle of induction tells us induction involves three steps:
- show that the P(O) holds, (* O stands for the first item *);
- s... |
I need to prove the above sequent using natural deduction. I did the first half already i.e. I proved $(p\rightarrow\neg q)\rightarrow \neg (p \wedge q)$, but I'm stuck on where to start for the reverse i.e. proving $\neg (p \wedge q) \rightarrow (p\rightarrow\neg q)$. I figured I would start by assuming $\neg (p \righ... |
Common algorithms for creating bounding-volume-hierarchies (BVH) rely on grouping primitives together that are not necessarily adjacent in memory. This is either done by rearranging the primitives directly or using an index which is then sorted. What if we are not allowed to change the order of the primitives? More for... |
Is $L = \{ w : \#_a(w) = \#_b(w) \}$ regular? I do not think it is. I recently posted a question and from there I was thinking if this language is regular.
If we assume on the contrary, then there exists a pumping length $p$. In that case, the word looks like $xyz$ where $|xy| \leq p$. If $y$ does not have the same num... |
Say you have 2N named peers (agents) able to address each other by their name and communicate freely among them.
What distributed algorithm could they use in order to randomly pair up? The final situation would be that the agents were able to organize themselves in N random couples. On different runs the random couples... |
I'm trying to find a characterization of when $L=L^*$.
I think I have one, but maybe is trivial, but I don't know if the proof is correct.
Claim: $L=L^* \Leftrightarrow L=LL$.
Proof:
If $L=L^*$ then is easy to see $LL \subseteq L$ so $L=LL$.
The other implication is in which I have doubts, I used a simple chain of equ... |
Problem
There are N intervals in which a particular integer can be chosen. What is the maximum possible minimum gap between each integer if one integer is chosen for each of those intervals?
For example: Input: [2,4], [0,8], [3,15], [10,20]
We shall choose 2 in [2,4], 8 in [0,8], 14 in [3,15], 20 in [10,20]
Thus answer... |
As I understand it Rice's Theorem seems to imply the existence of the Halting problem. That is, with Rice's Theorem, we can prove that the Halting problem is undecidable. However, to me, it seems like one could write a proof using that the Halting problem is undecidable to show Rice's Theorem. I'm not exactly sure how ... |
For example, we have an array [4,7,6,13] and I choose the first item 4 as the pivot. Now I have a pointer i that goes through the array from index 1 to index 3; and I have another pointer j that starts at index 1, increases whenever we find an element that is smaller than pivot and we swap this element with the element... |
How can I use the master's method in order to solve the recurrence formula $T(n)=3T(\frac{n}{3})+\sqrt{n}$ ?
|
Please help me solve it in terms of Theta or Big O
|
In image processing we can use affine transformations for translation, rotation, shear and scaling of pixels. But what kind of transformations are used for twisting and pinching of image pixels? Or what is mathematical definition for this kinds of transforms?
|
2PL's rule says:
Upgrading of lock (from S(a) to X (a)) is allowed in growing phase.
But what if upgrading lies after the last lock and before the first unlock? Does it still count "in the growing phase"? For example, is the transaction below a 2PL?
begin
lock-S(X)
read(X)
lock-S(Y)
read(Y)
**upgrade(Y)**
write(Y)
un... |
How would I go about proving that the language:
$$A_{NTM }= \{\langle N, w\rangle | N \text{ is a nondeterministic TM and } N \text{ accepts }w\}$$
is undecidable?
I looked at the proof for $A_{TM}$ being undecidable, but am struggling to figure out how to prove the above. Any ideas?
|
I'm following along the examples in https://people.csail.mit.edu/rrw/6.045-2020/note-cc.pdf
and in specifically the following text:
What’s a good protocol for computing MAJORITY? The natural thing to do
is to have Alice and Bob send the vote counts! Over multiple rounds,
when it’s Alice’s turn, she sends bits of the i... |
I was studying Theory of Computation and I'm kind of lost in solving this problem.
Let $R$ be a relation defined on the set of states $Q$ of a DFA as $q_1Rq_2$ if $\delta(q_1,a)=\delta(q_2,a)$ for some $a\in\Sigma$.
Is $R$ an equivalence relation? Prove.
So to prove that $R$ is an equivalence relation, I have to sh... |
This paper explains that testing the irredundancy of a SAT instance is NP-complete.
But I don't understand the theorem/reduction.
How would one reduce 3SAT or k-SAT to this problem, for example?
|
We are trying to build a system that would accept fyp proposal documents and then would validate is there something missing, like a heading or a chart that should be in the document according to the template.
The question is how machine learning can be used to solve this problem. As it seems a simple if else sort of a ... |
I want to draw a DFA to accept a String containing even number of both A and B, but rejects the empty String(ε)
I have already drawn the DFA which accepts the above language, without rejecting the empty string.
|
I have many API endpoints that take IDs that are constantly increasing. I want an algorithm to find the highest number in the least amount of requests. I need to do this without knowing what the previous highest number was. I am thinking something like binary search would work but would it be the most efficient? I also... |
I have a problem where I can easily construct a set of deterministic acyclic finite state automata (DAFSA) and I need a full-text search index, e.g. a suffix tree/array, over all the words encoded by these automata.
Is there an efficient algorithm for this? By efficient I mean that the complexity must not depend on the... |
How do I solve the following recurrence?
$$
f(0) = 0, \quad f ((1)) = 1, \quad f((n+1)) = 2*f(n) - f(n-1).
$$
|
By intuition $n^{\log n}$ should be as the same as $n!$. By Stirling's approximation, $n!=n^ne^{-n}\sqrt{2\pi n}$, which makes me think both are also the same. So, is this $O(n!)$ or $O(n^{\log n})$?
|
Assumef,g,hare three asymptotically nonnegative functions i.e.f(n),g(n),h(n)≥0 for all values of n∈N∪{0}. Furthermore,f(n) =O(g(n)) andg(n) =O(h(n)). Answer following questions as True or False. Justify your answer.
a) f(n) = 3^n−n^2 and h(n) = 2^n
We take limits and then what.I got stuck while doing log.
|
Assuming 3-OCC-MAX SAT is the language of all CNF formulas in which every variable appears in at most 3 clauses. Is this problem NP-Complete? I'm trying to find a karp reduction between SAT and this problem, but I couldn't find it.
|
I got this doubt while reading about AVC in Csiszar Korner's book.
Corollary 12.3 The $\epsilon$-capacity of the AVC {$W : X \to Y$}
average probability of error equals, for every $0 < \epsilon < 1$, the
corresponding $\epsilon$-capacity of the AVC {$\mathcal{\bar W} $}. It does not exceed
the minimum of $C(W)$ as $W$... |
Let $G= (V,E)$ be a directed graph with $n$ vertices.
A sink is a vertex $s\in V$ such that for all $ v \in V$, $(v,s) \notin E$. Devise an algorithm that, given the adjacency matrix of $G$, determines whether or not $G$ has a sink in time $O(n)$.
Does this pseudocode code look good?
# Input: An adjacency matrix G
# ... |
In binary the carry/borrow is 2, in hex the carry is 16. What's the reason for this?
|
In a list of 15 entries (city names) if searching for a particular name what is the average number of comparisons using linear search? Worst case it would 15 comparisons and best case it would be 1 comparison. Is the following calculation the average number of comparisons? If not, how do I calculate the average? Thank ... |
I have a dataset that contains some strings. A numeric value is assigned to each string.
I want to develop a machine learning (deep learning) model to get a string and predict its value.
What neural network do you suggest for this model? Should I use RNN (LSTM)?
|
I'm going over "Algorithms fourth edition" by Robert Sedgewick and Kevin Wayne.
In the chapter on hash tables I have encountered an easy hashing method called "modular hashing"
hash = k % m
Where k is the key and m - 1 is the size of array (minus 1) that stores the values. Authors suggest to use primary numbers for m ... |
I'm thinking of doing a project on deepfake detection, but I'm not entirely sure if it is viable. Based on my understanding, how it works is that deepfake generation programs have a generative and discriminative network, and eventually after training, the systems reaches an equilibrium where the discriminative network ... |
I am in an AI class where we have extensively learned about propositional logic.
I am wondering what the point of learning this is? Are there any uses for propositional logic? Beyond basic logic gates I can't think of any.
|
I'm learning about the Binary Indexed Trees, and I understand how it works, but I'm interested in the theory that there is behind!
In particular, I don't understand what is meant the following definition on TopCoder
The algorithms for BIT require extracting the last bit of a number, so we need an efficient way of doin... |
I have two logics, $L_1$ and $L_2$, and a mapping $f: Formulas_{L1} \rightarrow Formulas_{L2}$, and want to argue that the mapping is "nice", in the sense that it is structure-preserving. But I do not know the right name for this concept.
The formulas of these logics are generated by a grammar, and thus the two languag... |
If I have a CNN model (let's say I'm using Tensorflow and Keras) that I've trained for a particular task. For example, let's say I've trained it to detect the difference between an apple and banana. For a given input image, is there a way to generate a heatmap overlaid on the original image that indicates which parts o... |
What is the recurrence equation for this function?
i <- n
while ( i > 1){
j <- i
while ( j < n){
k <- 0
while (k < n){
k = k +2;
}
j <- j * 2;
}
i <- i / 2;
}
I guess, T(n) =T(n^2/4) + 2/n. or T(n) = M*T(n^2/4) + 2/n
Am I right to guess?
I think something's gonna have to c... |
Let $\mathit{AP} = \{a, b, c\}$. Consider the following LT properties:
Between two neighboring occurrences of $a$, $b$ always holds.
Between two neighboring occurrences of $a$, $b$ occurs more often than $c$.
For each of these properties $P_i$ (where $1 \leq i \leq 2$), decide if it is a regular safety property (just... |
I'm starting to study Turing machines, the Church-Turing conjecture and the circuit model. In particular, I'm interested in the proofs of universality that one can find in this context. So far, I have only found the universality proof of the circuit model for boolean functions (i.e., the gates AND, OR and NOT can be us... |
In $d$ Bounded degree deletion problem, we are given an undirected graph $G$ and a positive integer $k$, and the task is to find at most $k$ such vertices whose removal decreases the the maximum vertex degree of the graph to at most $d$.
The question is to how to find a polynomial kernel (in $k$ and $d$) for this probl... |
I have a list of n polygons (A,B,C,D,E,...) which possibly intersect each other.
I need to find a new list of polygons (or multi-polygons) which looks like this:
(
Area only in A (A difference from the rest)
Area only in B
Area only in C
...
Area only in A and B (A intersection with B and difference from the rest)
Are... |
The grammar is this:
$$S \rightarrow a B c $$
$$B \rightarrow b B b $$
$$B \rightarrow \epsilon $$
The LR(1) states that I worked out were these
$$(1)$$
$$S \rightarrow .aBc$$
$\\\\$
$$(2)$$
$$S \rightarrow a.Bc$$
$$B \rightarrow .bBb$$
$$B \rightarrow .\epsilon $$
$\\\\$
$$(3)$$
$$B \rightarrow b.Bb$$
$$B \righta... |
This is a fun one, I really can't wrap my head around it. It's like an n-sum problem combined w/ a knapsack problem and I cant seem to find a solution.
I'm currently building a cabinet, and had just enough wood that if I calculated my cuts right, I would've had enough, if I had even cut one certain length from one boar... |
A decision problem is denoted as a language $L \subseteq \Sigma^{*}$.
For every instance $x \in \Sigma^{*}$, we say $x$ is a yes-instance if $x \in L$ and a no-instance if $x \not\in L$.
For some algorithms (e.g. devide-and-conquer, dynamic programming), we may consider some sub-instances firstly, given an instance $x$... |
I am so ignorant I don't even know where should I ask this - on FOM? On mathoverflow? On cstheory? So please consider as sort of a meta-question readdressing me in case you think this is a wrong site. (Also my tags are most probably wrong, sorry)
The simple case when I definitely know the answer and it is positive: giv... |
Or is it possible to construct more than one DPDA that accepts exactly the same language?
|
This is just a theoretical problem that I found in the wild and want to know your solution.
A stack of plates is made between you a cousin and a few others.
Every (4 to 7) many random hours the plate on the top of the stack is given a slice of pie yet at this point you can instantly replace the pie with a new empty pl... |
I'm sure this problem must be well-known...
Given a collection $S$ of numbers, partition them into exactly two sub-collections, $A$ and $B$ (I mean, by definition $B$ is just $S-A$) such that the difference of products
$$
\Delta = \left|\left(\prod_{x\in B}x\right) - \left(\prod_{x\in A}x\right)\right|
$$
is as sma... |
Given a set of strings $S$ over $\{a,b\}$. How to determine whether there is an infinite sequence consisting of ${a, b}$ (i.e., a $\omega$-string), which doesn't have any string in $S$ as a substring?
The total length of all substrings in $S$ is at most $20000$.
|
Inspired by a question on superuser, I was reading up on the 802.11 protocol. This made me wonder if the SSID is actively used outside the authentication and association process. I know that it can be included in beacon frames which will get evaluated after a connection between AP and client has been established. But s... |
I am working on an assignment where I have to write an algorithm to detect all vertices that lie in a cycle in a graph and then calculate its complexity. I have come up with an algorithm in pseudocode. My approach is to 'delete' all vertices that have only one connecting edge until no vertexes are left that have only o... |
I wrote a tiny compiler that is used to execute user-defined plugin code. The compiler is shipped as part of the application. When the user loads a plugin, the compiler runs first (once) and then the emitted code is executed.
I'm trying to describe this project in a blog post, and I'm unsure if calling this a "Just in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.