instruction stringlengths 35 29.1k |
|---|
This is an exercice is Rolf Niedermeier's book "Invitation to fixed-parameter algorithms", Chapter 13.
Show that the following problem is W[1]-hard:
Steiner Tree in Graphs with respect to the parameter "number of non-terminal vertices".
The way I understand it, if there are most $k$ non-terminal vertices, then this d... |
I implemented an algorithm to find the minimum dominating set of a graph. I want to check the output of the algorithm against some graphs for which the domination number has been determined.
Where can I find graphs with a known domination number?
|
I am looking for graphs which the value of a minimum dominating set is known (Where can I find a data set of graphs with known domination numbers?). So far I have not found anything, so perhaps I missed a search term. Does anybody know if dominating set goes by some other name?
|
Suppose I have a set of n ordered tuples, all of the same, fixed dimension. The tuples' values are integers, with #s indicating an integer I don't care about. For example:
{ (1,2,5), (4,2,3), (1,2,#), (#,2,3) }
Tuples can be combined so long as they don't disagree about anything. For example, (1,2,#) and (#,2,3) c... |
To most computer programs one can assign a "call graph".
Is there a formal notion of call graphs of Turing machines?
Motivation is, that one could intuitively call a decidable language $L$ "irreducible" if every Turing machine which decides $L$ has a "trivial call graph" (Trivial here intuitively means, that the machin... |
I am having a problem with my program of deep neural network using Theano. In my deep neural network, I have several layers of neural network to predict an output given a certain input. Because of an issue when compiling theano, I have to debug my program step-by-step. Since Theano gives me an error when updating weigh... |
$PH \subseteq PSPACE$.
In order to prove it, one has to show that for a language $A \in \Sigma_k$ (for some $k \in \mathbb{N}$) there exists a turing machine $M_A$ that decides it in polynomial space.
I am having a hard time understanding why this is true. I'll try to explain:
Let's take for example $L \in\Sigma_2$: by... |
I have a DAG with vertices $V$ and edges $E$. If $v,w \in V$ are vertices such that $v$ is not reachable from $w$ and $w$ is not reachable from $v$, I will say that $\langle v,w \rangle$ is an unreachable pair.
I want to implement an efficient algorithm which takes this DAG as input, and produces as output a list of s... |
A friend needs to find the pool balls in an image of a pool table. Would a Hough transform be a good idea? Why/why not? Would RANSAC be better?
The question comes from this study guide (http://www.cc.gatech.edu/~afb/classes/CS4495-Spring2015-OMS/), is not homework, and I am not currently taking this class.
What I know:... |
Given an $M$x$N$ grid with some predefined sub-rectangles. How to divide the grid into a set of sub-rectangles, which contains the predefined sub-rectangles, so that its the number of elements is minimum and no sub-rectangle is overlapped ?
Is there any reference to the problem and it's solutions ? Is the problem NP-Ha... |
I have this function
int fct (int Y){
int y = 0 ;
for ( int i =0; i<Y;++ i ){
for ( int j=i ; j >=0;--j ){
y++;
}
}
return y ;
}
I want to know the order of this function, I know that the first for loop its O(n), but I confused to ... |
The idea is to take a sequence like $\langle 1,2,3,4 \rangle$ and reduce it to something like $\langle 1,2,2,3 \rangle$, or something similar. The key point is that there are fewer distinct values $\{1,2,3\}$ vs $\{1,2,3,4\}$. In the case that the number of distinct values cannot be reduced, i.e. $\langle 0,0,0,0 \rang... |
I am trying to get an intuition for Heap's Algorithm which is used to generate permutations of a given set.
What I can't understand is why if n is even the letter swapped is i and when n is odd the letter shifted is at position 0.
I know it works but what is the intuition behind it ?
How come when n is odd there is al... |
For the master theorem for recurrences of the form
$$T(n) = a\,T\!\left(\tfrac{n}{b}\right) + f(n)\,,$$
what difference would it make if the split was into calls of $\lceil n/b\rceil$ instead of $n/b$? My guess is that this would only allow splits that are natural numbers, and obviously you can't split into a non-integ... |
More specifically: for any arbitrary CFG, is there guaranteed to exist two distinct strings such that a leftmost parse of both strings creates the same parse tree? If not, does there exist any CFG that has this property?
I know that given a string and a CFG, there may be multiple leftmost parse trees for the same strin... |
Inspired by this StackOverflow question, I am wondering if there is an efficient algorithm for the following problem:
Assume $n$ items and $n$ boxes, with all boxes numbered numerically and all items labelled alphabetically. Each item has a disallow list: there are certain boxes that item cannot be put into. Generate ... |
I want to calculate the order of this function, I calculated but I'm not sure if this right.
This is the function
int fct (int Y){
int y = 0 ;
for ( int i =0; i<Y;++ i ){
for ( int j=i ; j >=0;--j ){
y++;
}
}
return y ;
}
And this... |
I have this practice problem that I was given.
I am trying to solve a specific recurrence equation
T(n) = 4 when n <= 2
T(n) = 3T(n/3) + 5 when n > 2
how would i go about to solve such a problem since I only really know how to solve Master Theorem and Divide and Conquer using the a and b but don't really know how to... |
I want to find a reduction from Zero-One Integer Linear Programming problem to Boolean Satisfiability problem (SAT), that is, to find a polynomial-time transformation $T$, such that:
$$IP \leq_P SAT$$
$$IP(in_{IP}) = 1 \iff SAT(T(in_{IP})) = 1$$
where $in_{IP}$ is an input for the IP problem and $T(in_{IP}) = in_{SAT}$... |
If we have any arbitrary computer program that can modify its instructions, is it possible to simulate that program with a program that cannot modify its instructions?
Edit:
I am new to stackexchange so not sure if I'm allowed to ask a NEW question here, but here goes:
Ok so the proof that it is possible is actually r... |
I am trying to write a data-type not for a tree, but for the spaces in between the leaves of thee tree. In number theory (a part of math) this is known as a topograph does it have a name in CS?
|
I usually deal with traversal algorithms such as DFS and BFS, and I have to implement them iteratively. However, in case of DFS, one challenge is that the size of stack can be $O(n+m)$ in worst case.
I was wondering if there is an iterative implementation of DFS that requires an $O(n)$ size stack instead of heavy $O(n+... |
The term lower bound comes from math and applies to more than just complexity theory. What we see is that such and such is "a" lower bound. In complexity theory should this not be phrased as "the" lower bound, or better still the lowest bound. I can see where lower is a relative term, but the complexity of a given prob... |
Consider an unrooted tree with integer edge weights. I'm looking for a linear space data structure which allows for constant time distance queries (finding the distance, i.e. the sum of edge weights, between any two vertices).
Is this possible? If yes, how? I have an idea that it should be possible using some Lowest-Co... |
"Show that if L is a regular language without the empty string, then the language in which the rightmost symbol of every string in is removed is also regular."
I tried going by closure properties of regular languages but got nowhere.. I said L' = {x| y is in L and xa = y, for some a in the alphabet} and didn't really k... |
When building the partial match table for KMP:
void buildBackTable() {
int i = 0, j = -1; b[0] = -1;
while (i < m) {
while (j >= 0 && P[i] != P[j]) j = b[j]; //Why is this a while loop!?
i++; j++;
b[i] = j;
}
}
How come that second while loop is not a conditional instead? Such... |
If I have a function that evaluates every pair of elements in a list, including pairs of an element with itself and with elements it has previously been evaluated against, the complexity of that function is, obviously, $O(n^2)$:
for (let i=0; i < n; i++) {
for (let j=0; j < n; j++) {
// this line will be executed... |
I'm trying to understand how the LSH works for Cosine Similarity metric. For instance, let's say you have $\vec{v} \in \mathbb{R}^d$ and the random vectors $\vec{r_{i}} \sim \mathcal{N}(0, 1)^d$ that will be used for the random projection. So, in LSH for Cosine Similarity, the define the hash function $h_i(\vec{v}) = 1... |
Are there variants of hash tables that take advantage of the likely distribution of key values? For example, if I'm using utf-8 encoded unicode strings as identifiers in a compiler but expect the majority of them to fit into ASCII, can I optimize for that use case?
|
Why is it that every integer linear program has optimal solutions that are integers? At least in online text books, they are always integers. Can solutions of ILPs only be integers?
|
I gone through the Russel's paradox.
From Wikipedia :
According to naive set theory, any definable collection is a set. Let R be the set of all sets that are not members of themselves. If R is not a member of itself, then its definition dictates that it must contain itself, and if it contains itself, then it contradi... |
Consider a problem $X$ can be reduced to 3-partition problem. So, when 3-partition has a solution then $X$ has a solution. But if 3-partition does not have a solution, they $X$ may or may not have a solution. In this case, is it legal to say that the problem $X$ is np-complete?
|
Given a weighted matroid with positive weights, we can find a independent set with a maximum weight with a greedy algorithm:
Start with an empty set (by definition of matroid, it is independent).
Add an element with maximum weight among all elements whose addition keeps the current set independent (if there are no suc... |
I have Z specification of Banking system, whose fragments are:
and
I think that the specification is OK, but my professor says that this specifiction is completely wrong, because AddAccount operation allows to change the information about other clients (i.e. the information about accounts of other clients) and inform... |
Let $L' \subseteq L \subseteq \Sigma^*$ be decidable languages with deterministic Turing machines $M'$ and $M$ which decide the languages. Typically we have $t_M(w) \le t_{M'}(w)$ for all $w \in \Sigma^*$, where $t_M(w)$ is the time of $M$ on input $w$.
Suppose furthermore that $M$ and $M'$ have minimum length when in... |
I'm trying to convert the following finite automata (DFA) to its corresponding regular expression using state elimination algorithm.
For this I'm following this link. The answer of that question has following example.
But in this sample automata, there is no state between the two looping transitions. For example th... |
Could somebody please provide a step-through approach to solving the following problem using the Banker's Algorithm?
A system contains 10 units of resource class Ru. The resource requirements of three user processes P1, P2 and P3 are as follows
| P1 | P2 | P3 |
Max Requirement | 8... |
Here's Lamport’s fast mutual exclusion algorithm:
want[i]:=true
fast-lock:=i
if slow-lock<>0 then
want[i]:=false
while (slow-lock<>0) {//busy wait}
goto 1
slow-lock:=i
if fast-lock <> i then
want[i]:=false
for j:=1 to n do:
while (want[j] = true) {//busy wait}
if slow-lock <> i then... |
In which stage ( on an ideal 5-stage pipeline ) are branches and hazards handled? How much is the branch penalty for a branch hazard or data hazard. Is there different stages to find data hazards or branch hazards ( meaning for example branch hazards occurs on the 2th stage in the pipeline) or are all hazards detected ... |
It seems that the general approach to a dynamic programming problem is to formulate a recurrence relation and then either implement a top down recursive solution or a bottom up iterative solution.
But if there's a recurrence relation I think that means we could potentially represent the problem as a state vector and a... |
Attributes of an attribute grammar can have a circular dependency. In my compiler construction course I learned, that there are two types of circularity for attribute grammars:
full circularity can be checked in exponential time
strong circularity can be checked in polynomial time
Full circularity implies strong circ... |
I hope that this question is clear, and not off-topic:
I have been reading about neural networks (in the AI sense), and the textbook said that an artificial neural network can always be described by a single mathematical function (rather than by an "algorithm" in a register-machine, which is the standard way I intuitiv... |
Can we use the term "black box" to speak about an algorithm which has a polynomial complexity but for which we don't know exactly how are made the calculations?
In fact I would like to explain that we assume that an algorithm cannot be executed incrementally, i.e., having a part of the input, for instance the first 50%... |
I'm solving some past job interview problems.
I met an embarrassing question about compilers.
The question is :
Consider the following grammar, with start symbol $E$:
\begin{align*} E &\rightarrow E \ast E\\ &\quad \mid E ~/~ E\\
&\quad \mid E + E\\ &\quad \mid E - E\\ &\quad \mid (E)\\ &\quad
\mid a \mid b \mi... |
I've been trying to solve an interesting problem created by one of my friends. The following is the problem statement:
There are $n$ types of chocolates. $\langle a_1,a_2,a_3....a_n \rangle$ are positive integers which represent the number of chocolates of each type. These chocolates must be packed into boxes of capaci... |
I was pondering about what are the numbers. It seems like a number is data type. I mean, like Maybe in Haskell. Because, for instance, one on its own means nothing for me. However, one apple tells me about how many apples does one talking about. Thus, numbers are quite abstract. If somebody asks you "how is it going" y... |
$L^*$ is the kleene star of L.
say we have a def: $L^*$ = $L^0$ U $L^1$ U $L^2$ U ... U $L^K$
then prove that: $L^*$ = $L$ if and only if $L$ = $L$ o $L$
how do i prove this?
|
I recently took a test and I had a particularly difficult time with one problem. I would like to know more about this problem: what general class of problems does this problem belong to, what are some good resources to learn more about this class of problems, how should I have recognized the problem for what it was?
S... |
Given ordered array of float numbers, Check if array represents Normal Distribution.
I wrote algo to find triangular distribution as follows:
1. Find index "i" in array such that sum {A[0] + ...A[i-1]} almost equal to sum {A[i] + ... + A[n-1]}
2. Check if A[i....i-1] is almost increasing sequence
3. Check if A[i ... n ... |
This might be a basic technicality but I'd like to make sure how to handle it.
The question is: how do we measure an algorithm's approximation (multiplicative) factor on instances with optimal value $0$.
Suppose I have a minimization problem $Pb$, and it is NP-Hard to decide if a given instance $I$ has optimal value $O... |
When a CPU simulates a certain program, as they do all the time, this is inherently slower than if the program would have been "baked in" into the hardware and computed directly. We know this from practical experience.
My question is: Is there some theoretical relationship that shows that a program that is simulated by... |
I am aware that the following problems are undecidable and tried to reduce the given problem to one of the following but with no success:
Halting problem
Blank Tape Halting problem
State-Entry problem
If a TM accepts nothing
If a TM accepts everything
I am looking for hints :)
Do I have to make multiple reductions?
D... |
Let's say that conditional branches are resolved at the 2nd-stage on a 4-stage pipeline. Why is there different penalties on a taken branch versus an untaken branch ? Should the penalty be the same for both? I always assumed that the not taken and taken branch penalty is 2 cycles but this is incorrect according to my f... |
Question: There are n+1 loading docks. a permutation of boxes 1->n is placed on the first n. there is a fork that can move one box to an empty location at a time. Give an algorithm to sort then boxes with minimum distance travelled.
Answers:
Case A: If distance travelled includes distance traveled by the fork witho... |
I'm trying to come up with a CFG for a language: {$0^n1^{2n}01|n\in\mathbb{N}$}
I tried doing:
$A\rightarrow\epsilon$
$A \rightarrow A10$
$S \rightarrow A01$
It only worked for {01, 01101} but doesn't work for the other cases.
Can someone help me?
|
I want to produce $k$ shortest path ($k$ would be less than 10) between all pairs in a graph. The graph is (actually a subway map):
positively weighted
undirected
sparse
with about 100 nodes
My current plan is to apply $k$ shortest path routing to each pair; I am now looking for a more efficient alternative (possibly... |
Is it correct to call something with no elements a binary heap? I think it is correct, for one element too, but I'm not sure. It seems to satisfy the definition (from Wikipedia):
Shape property: a binary heap is a complete binary tree; that is, all levels of the tree, except possibly the last one (deepest) are fully f... |
I seem to recall an academic paper from some years ago which used machine learning (possibly genetic or evolutionary programming) to predict whether a Turing Machine would halt.
By predict, I mean the standard notion in ML: minimize the error on some validation set. For simplicity, let's assume that the ML is a binary ... |
I am solving a problem in the Kaggle learn section : https://www.kaggle.com/c/facial-keypoints-detection
The problem involves detecting facial keypoints in a 96x96 image, some 30 features are detected. It is a supervised dataset.
I am using a convolutional neural network with max pooling, 2 convolutional layers and 2 m... |
This is in regards to the definition 2.13 of non-deterministic PDA given in Theory of Computation 3rd ed. by Michael Sipser.
The transition is defined as
$$
\delta: Q\times \Sigma_\varepsilon \times \Gamma_\varepsilon \to P(Q\times \Gamma_\varepsilon)
$$
where $Q$ is the set of states, $\Sigma = \Sigma_\varepsilon\cup... |
I may come across something like (let $X$ be a binary representation of a Turing machine $M$), I know that we can easily encode the description of the machine as sequence of numbers (by assigning a number to every symbol and arranging the description in some particular way) and then encoding this sequence by a single ... |
I was researching the topic of Fibonacci numbers and asymptotic complexity of generating them. Coming across a seemingly paradoxical conclusion, I've decided to check out if you agree with my explanation.
The naive algorithms runs in $O(n)$, if we ignore the cost of addition.
The Binet's formula or matrix exponentiati... |
I understand how neural networks that are implemented in software learn. You simply change the synaptic weights in the program. But how would you get a hardware implementation of neural networks to learn? The synaptic weights in the case of a physical system are INSIDE the machine, so how do you adjust the synapses? Do... |
The paper "Monotone Minimal Perfect Hashing: Searching a Sorted Table with O(1) Accesses" <http://www.itu.dk/people/pagh/papers/sparse.pdf> is the only one that uses Kolmogorov Complexity to obtain a lower bound in the space of a data structure that rank with erros.
My question is: What are the other Algorithmic option... |
I have learnt Neural Network for a couple weeks. I just met a problem when I tried to use ANN to recognize a dataset.
So I'm gonna describe the problem:
Set A has 15 members which are in set {1, 1.5, 2, 2.5... 4}.
I need to recognize set A if it is in type 2 or not. There are 3 types:
Type 1: Sum(A) < 30
Type 2: 30 <=... |
Everyone knows "Garey & Johnson", which is my go-to reference whenever I need a problem to transform from for an NP-hardness proof. However I recently find myself in need of an APX-hardness proof, and I wonder if there is a similar (and more up to date..?) collection of problems that have been shown to be APX-hard.
Doe... |
Given a two-dimensional data set where each point is labeled $ \{0,1\}$, I want to implement a sparse classifier with $L_p \ \text({ 0<p \leq 1) }$.
I have been reading on logistic regression and regularization. Let me give you an example of what I have been working on. The concrete example is: Let $\left((x^{(i)},y... |
I found the proof below in a textbook. I would like to know why it is important for the proof that it uses $\lceil \frac{n}{2} \rceil$ instead of just $\frac{n}{2}$? I know that you can't split into calls which aren't natural numbers, but how do I present this argument formally?
The proof:
The recursion splits the prob... |
I have just learned about the "bias-variance tradeoff" in machine learning, in the context of it being applied to simple regression models.
Now I am wondering: is this tradeoff a general universal principle that is applicable to every (conceivable) learning algorithm, or is it specific to particular algorithms, like re... |
I've looked at several explanations of the Hungarian Algorithm for solving the Assignment Problem and the vast majority of these cover only very simplistic cases.
The most understandable explanation I've found is a YouTube video.
I can code the algorithm but I'm concerned about one special case. If you watch the video... |
Assume that we have some efficient way of creating a suffix tree of a string. Then I'm interested in efficient ways of finding:
Length of longest repeated substring. Given some string $S$, then a repeated substring is a substring $R$ of $S$ that occurs more than once in $S$. Then I wish to find the length of the longe... |
I know that the subset sum problem is NP-Complete because I can reduce a known NP-Complete problem to subset sum.
However, since subset sum can be solved by dynamic programming, I was not completely convinced that it is NP-Complete. I then realized that the dynamic programming solution in fact tries all possible combi... |
I'm trying to figure out how to calculate the route cost on this graph (it's the missionaries and cannibals game)
I have my definition as:
Mi = Missionary on the initial side, C = Cannibal on the initial side, B = Boat [I = Boat in the Initial Side, F = Boat on the Final Side],
Mf = Missionary on the other side of the ... |
For which context-free grammars is it idempotent to remove $\varepsilon$-productions? Given that there are multiple rewriting algorithms which preserve language and leave the grammar without $\varepsilon$-productions (apart from $S \to \varepsilon$ iff $\varepsilon \in L(G)$), is this sensitive to the choice of algori... |
Need to know the relation between EXPTIME and NP HARD complexity classes.
|
Input:
$X$ = {$x_1$,$x_2$,$x_3$,...,$x_n$}
$Y$ = {$y_1$,$y_2$,$y_3$,...,$y_m$}
$k$, where, $k$ $\leq$ $m$
Output (Yes/No):
Satisfying the following condition, can all the elements in set $X$ be assigned to elements in set $Y$, such that, no elements in $X$ is left unassigned?
Condition: At least $k$ elements in $Y$ i... |
I was reading an article at
What does "context" in "context-free grammar" refer to?
The production
zA -> xy
is described as being an "unrestricted" production. In what way is it "unrestricted"?
I even visited https://en.wikipedia.org/wiki/Unrestricted_grammar
which talks about unrestricted grammar as the one that is... |
Given a binary $n$-times-$n$ matrix $A$, we'd like to cover the regions comprised of $1$'s with non-intersecting rectangles. A collection of disjoint rectangles that covers all $1$'s (and only $1$'s, i.e., it mustn't cover any $0$'s) is called a cover. (Notice that a problem instance may have many different covers.)
A ... |
Does computer convert every stuff using Ascii or UTF?
Meaning if there is a mathematical calculation including 65 (as a number) will it convert it into binary (00100001)?
And then how it differentiate it with 'A', whose code point is also 65 with code 00100001?
|
Sorry for the vague question, but I'm trying to figure out what to call something and a more specific question title would likely require too much space. Anyway...
I'm getting into ROM hacking for fun, and I've been diving into it without any external knowledge or tools, just so I can have the pride of being able to fi... |
Below is the description of the answer to a question which says the following:
Design a data structure to support two operations for a dynamic multiset S of integers which allows duplicate values.
Insert operation for one element
Delete-larger-half(S) deletes the
largest ceil(|S|/2) elements from S.
m insert and... |
Let $f:\mathbb{N} \to \mathbb{R}$ be a lower semicomputable function, i.e. there exists a recursive function $g:\mathbb{N}\times \mathbb{N} \to \mathbb{Q}$ s.t.
$$\forall x \in \mathbb{N} \quad \lim_{k \to \infty} g(k,x) = f(x) \qquad\qquad (1)$$
$$\forall x \in \mathbb{N} \quad g(k,x) \le g(k+1,x)\qquad\qquad (2)$$
Qu... |
( This may be related to NFAs with more than one initial state )
Consider a dfa $M$ with alphabet $\Sigma$ and states $Q$, typically also characterized by a specific initial state $q_0\in Q$. As the above-cited question points out, nfa's that nondeterministically select among several possible initial states can be conv... |
This is a variation of the well-known $k$-center problem with priorities given on the vertices.
Problem:
Let $G = (V,E)$ be a complete graph with a distances on the edges satisfying the triangle inequality. Then, additionally, there is a priority function $p: V\to (0,\infty)$. Given some $k\in\mathbb{N}$ then we wish ... |
Let's say we take someone's garden (A) as the environment. We want a robot to pick up a series of eggs that chickens have laid in the garden, while covering as little ground as possible (those heavy rover tracks damage the turf, you know). So we evolve a solution whereby the genes representing the robot's behaviour (i.... |
(Copy of https://stackoverflow.com/questions/38868226/what-is-the-status-of-the-tsx-related-skylake-errata-skl-105 which didn't get much attention).
As is well known, Intel had to disable TSX in the Haswell-series of processors via a microcode updates. This was due to a bug in the TSX implementation that could give err... |
Suppose I knew my current location as a geographical point (Lat/Lng) and had a standard radius to search (meters). Now given a list of previously searched geographical points as the centers of circles with the same standard radius that are nearby my point but do not encompass my point what would be a good algorithm for... |
Question:
As I'm working on a Hindley-Milner typed lambda calculus, in order to make it usable I need to add some types such as list and pairs. The way I currently do it is, I have an unsafe keyword that lets me explicitly set the type of a global function that tells the type checker to just trust the explicitly given ... |
Consider the following problem:
Can $X$ be proven in fewer than $Y$ steps, from axioms $Z$, with finitely many transition rules $\tau$?
This lies in $NP$, since if I supply a proof $M$, and individual steps can checked against the list of possible transitions $\tau$ in polynomial time, then $M$ can be checked for lengt... |
I'm wondering if there's a name/reference for the variant of knapsack problem where all items have the same value (so we only care about maximizing the number of items), but there are multiple weight constraints.
Maximize $\sum_{j=1}^nx_j$
subject to $\sum_{j=1}^nw_{ij}x_j\leq W_i$ for $1\leq i\leq m$
and $x_i=0,1$.
Th... |
To the best of my knowledge, finding a perfect matching in an undirected graph is NP-hard. But is this also the case for directed and possibly cyclic graphs?
I guess there are two possibilities to define whether two edges are incident to each other, which would also result in two possibilities to define what is allowed... |
A parser is a procedure which decides if an input belongs to a certain language and produces a witness in the form of a parse tree.
Let a streaming parser be a parser which for any prefix $u$ can produce a partial parse tree corresponding to the productions that must be expanded to eventually accept any completion $uv$... |
Let $N \leq 1000$, a 2-3-monotone sequence $s$ of length $N$ is defined as:
$s_i < s_{i+2}$, for $1 \leq i \leq N-2$
$s_i < s_{i+3}$, for $1 \leq i \leq N-3$
$s_i \in \{1,\dots, N\}$
Given $N$, calculate all the possible sequences of length $N$ given above formula.
I have already come up with a solution in $\mathcal... |
I'm reading into grid systems/distributed systems and came across pilot jobs that I can't find a decent explanation for. The wikipedia page is not understandable to me.
I know multi-level schemes from distributed graph algorithms, and I guess in this context it means first the resources are scheduled to the application... |
I'm reading the paper N. J. Larsson, A. Moffat: Offline Dictionary-Based Compression, which describes a compression algorithm that, if I understand it correctly, is quite similar to Byte pair encoding.
Given a string $S$ of length $n$, I'm trying to understand how one can compress it in linear, $\mathcal O (n)$, time w... |
Given a 3D matrix of size $N \times N \times N$, let $\mathcal{S}$ be a set of points in the Matrix and $\mathcal{S}'$ be the complement of $\mathcal{S}$. Can we find a set of equations of the form:
$F: (f_1 \land f_2 \land \ldots \land fn)$
where $f_x$ is of the form
$f_x \implies ai + bj + ck + dN + e \text{ } \{<,>,... |
What is the difference between a dedicated GPU and an integrated one?
|
In Sipser's "Introduction to the Theory of Computation" it states "A GNFA accepts a string $w$ in $Σ^{*}$ if $w = w_1 w_2 · · · w_k$ , where each $w_i$ is in $Σ^{*}$".
However, wouldn't a more precise definition be "A GNFA accepts a string $w$ in $Σ^{*}$ if $w = w_1 w_2 · · · w_k$ , where each $w_i$ is in $Σ$" ?
|
How would one go about enumerating all the optimal answers for interval scheduling?
Not sure what to begin with, my guess is to use the other approaches i.e. earliest start time, shortest interval and fewest conflict in conjunction with the optimal implementation which is to use the earliest finish time approach.
|
Given $N$ points in a grid having some weight, I have to find the side length of a square sub-grid with maximum sum of weight of points contained in that square sub-grid. Also square sub-grid must have side length less than $L$ (given integer).
$ 1\le N \le 100000$, $1 \le L \le 100000$ , $1 \le x_i \le100000$, $1 \le ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.