instruction stringlengths 35 29.1k |
|---|
I need help with the following mock exam questions. True or false?
1.) If a non-trivial $(\neq \emptyset, \Sigma^*)$ finite set is NP-complete, then $P = NP$.
True. Every finite set is in $P$ and because of the $NP$-completeness every set in $NP$ can be reduced to this set. Is it right?
2.) $NP \subseteq coNP$ $\Leftri... |
I'm learning Dynamic Programming (By myself) and in the textbook there is this question:
Given two undirected graphs $G_1=(V,E_1)$ and $G_2=(V,E_2)$ over the same set of Vertices $V$ and a weight function $w: E_1 \cup E_2 \rightarrow \mathbb{R}$, let $P = \left\{e_1, e_2, ..., e_n \right\}$ be a path in $(V, E_1 \cup ... |
My semidefinite program amounts to two constraints, $L_1 = 0$ and $L_2 = 0$ where $L_i$ are linear functions of my variables $x_{ij}$ with the additional constraint that the $x_{ij}$ matrix is positive semidefinite. I see no way that this program would be infeasible, because just setting every variable to 0 would satis... |
Are there any languages that are infinite (that is, they contain infinitely many strings) but which do not have any infinite subsets that are RE or co-RE languages? This seems related to simple sets, but I can't seem to find any examples of languages with these properties.
Thanks!
|
I need to work on a optimizer for a language whose operator are second order functions.
They are the well known ones filter, map, reduce, fold, foreach etc. etc.
I need to formalize as much as possible the language. I mean I would like to have at the end a description such this:
"Filter is function from this domain t... |
In an example of the application of MapReduce provided by University of Utah, it says that Map() function emits <"hello", 1> every time it sees hello where the reduce function counts the number of instances "hello" occurs
My question is if this is the case, why isn't reduce doing <"hello", {1,1,1,1,1,1,1,1,1,1,1,1...}... |
I am reading Michael Sipser's book Introduction to the Theory of Computation, which mentions the set $$S = \{ n \mid \text{$n$ is an integer and $n = n + 1$}\}.$$ This doesn't make any sense to me.
I would understand if $n$ were equal to infinity or something, so it probably wouldn't matter if we added $1$ to it.
Am I... |
I would like to write a function to generate a diagonally dominant matrix of random values. What I'm ultimately leading to is writing a code to implement the Jacobi method on this matrix in CUDA for a final project in one of my classes.
The problem is I don't really know how to do this. One idea I had was to create a ... |
Let $W = \{w_1,w_2,...w_n\}$ be a set of integer weights. Let $B = \{b_1,b_2,...b_m\}$ be a set of buckets, with $m \leq n$. Let $T(b_j)$ represent the total weight present in bucket $b_j$, which is the sum of all the weights present in $b_j$.
What is the optimal way to distribute all the weights $w_i$ into the bucket... |
I know a key part of the Cook-Levin theorem proof (as presented in the book by Sipser) is that given two rows of configurations, if the upper row is a valid configuration of a nondeterministic Turing machine $N$, and every 2×3 window is consistent with $N$, then the second row is either identical with the upper row or ... |
I'm trying to prove that if P = NP, then {⟨a, b, c⟩ : a + b = c} (as addition over N) is NP-complete.
I think I managed to prove that it is in NP, but I'm not sure what would be a good NP complete problem to reduce to would be, or what algorithm to use. Any ideas?
|
All programming languages have globally defined symbols. While best practices invariably abjure their use as mutable entities the philosophy of what is mutable and what is not mutable is highly context dependent. Technologies like JIT compilation and type inference generate code on the fly based on the context in whi... |
I have a set of points corresponding to pictures on map. Because location precision is not very important, I want to separate the points inside the set to maximize the summed up distance between the points. There would be a maximum distance that points could be moved.
Any idea what kind of algorithm should I use?
|
I have this exercise for homework:
Say we have a language L. we know that the language pref(L) (all the prefixes of L, including all the words in L itself) is a regular language. Does this imply that the language L is regular as well?
I took the NFA of pref(L) and divided it (via 2 epsilon transitions from q0) to 2 s... |
I'm a person using english as the second language and reading CLRS book at a slow pace due to my poor english. I have a problem with understanding the meaning of the word 'alternative'. In page 303 on CLRS, says:
we should convince ourselves that exhaustively checking all possible parenthesizations does not yield an e... |
Assume, I want to define the operational semantics for some subset of ML.
e ::= \\x. e | e e | c | match e with p+ | A e*
v ::= ... | \\x. e | ... | A v*
p ::= A p* -> e | x
Where e is the expression language, v are the values or normal forms, p are the patterns and A are the constructors for my algebraic datatypes.
... |
I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got confused. My book says that for the incoming order :[10 22 20 2 40 6 38] (while the disk currently at 20) the SCAN moving at the... |
Could anybody explain me what exactly oblivious RAM is?
I found the following explanation which makes it kind of clear to me, but I would like to get a sense of the technical aspects:
Encryption is not always enough to ensure privacy. If an adversary can observe your access patterns to encrypted storage, they can sti... |
I have some background in natural language processing and I know that all parsers (top down or bottom up, or mix), at least when I studied just about a few years ago, cannot handle any error. A small error like a grammatical one or a spelling one will result in unexpected parsed tree.
This is unacceptable in natural la... |
The PARTITION problem:
$\{\{x_1,...,x_n\}: \exists I\subseteq[n], \sum_{i\in I}x_i=\sum_{i\notin I}x_i\}$
is well known to be NP-complete.
My question: does the partition problem remain NP-complete (as a promise-problem) if we are given that $\sum_{i=1}^n x_i=0$?.
A problem that arises in this assumption is that one... |
I think that I have found an algorithm which resolve exactly the subset sum problem in $O(N^3)$ in the worst case, only for positive numbers.
After my research, I'm lost between all the algorithms for this problem.
$O(2^N*N)$ for the naive algorithm (I understand)
$O(2^{N/2})$ for advanced algorithm (I understand)
$O(... |
I am looking for familiar problems on strings of finite length over an finite alphabet, where a polynomial time algorithm is known.
To be more precise, let $\Sigma$ be a finite alphabet. I am looking for problems, where the input (or an important part of the input) is a set (or an ordered list) of strings $w_1,\dots ,w... |
In "Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler" Yoshihiko Futamura wrote:
"[Some] portions of a computation process [...] are not evaluated at
partial evaluation time, but the values are only substituted for the
remaining variables."
on page 388 in the paper
(I considerably short... |
While studying COMPILER-DESIGN through an online book from Google Books, referenced as Compiler Design by A.A.Puntambekar, I got stuck across a line. Actually, I am more curious to know the inner-detail.
The assembler converts the assembly-program to low-level machine
language using two passes. A pass means one comp... |
In the article Fast approximate string matching with finite automata by M. Hulden (2009) (mostly pages 58/59), the author describes how to search for a closest matching string word from an automaton after inputting something that is not accepted by said automaton.
It uses A* search to efficiently search for the closes... |
Is every $\sf NP$-problem solvable or are there problems that have no working algorithm to solve but have algorithms to verify?
|
I have a problem of this form coming from an application domain, similar to the classical knapsack problem but not quite the same:
Maximize the value of
($\sum_{i=1}^n v_i \cdot x_i) + B \cdot \frac{W}{r}$
subject to
$ \sum_{i=1}^n w_i \cdot x_i \leq W$.
Here, $W$ and $B$ are constants, and $r$ is an integer variable w... |
Reading the book Introduction to Linear Optimization by Bertsimas and Tsiklisis, I've come across the following subject: Driving the artificial variables out of the basis.
The description is as follows: suppose an artificial variable $x_{B(j)}$ is in the basis, then examining the $j$-row of the simplex tableau there ar... |
What is different when you say "Arithmetic Calculation" and "Calculation" in the context of the computer science?
The "arithmetic" in the former seems needless to me since all calculations are arithmetic.
Is there some meaning that is enhanced by adding "arithmetic" in this case?
Thank you in advance.
|
I am trying to solve a stable marriage problem where I have e.g. 20 women and 20 men, but they always only prioritise 4 pre-selected people of the opposite sex.
My algorithm distributes all men and women, so that everybody has 4 potential partners. This happens through the whole group of 20 (not in groups of 4 x 4, wh... |
In a directed graph $G(V, E)$; how can I define in symbols the set of subgraphs $G'=(V',E')$ of $G$ such that $G'$ has a root vertex, i.e., a vertex that sends a directed path in $G'$ to every $v\in V'$.
So far, I have the following. I need to say that
$$\forall v \in V'\, \exists \text{ a directed path $P$ from $r$ t... |
Currently I have a program which at some point creates an octree and AFTER the creation loops through all the nodes, for every node (O(n2/2)) and thus finds the neighbours, by a brute-force box-box intersection check.
Since that is causing a bottleneck in my program I am looking to optimise this stage by somehow assign... |
It was proven that the problem of determining whether a given Diophantine equation has a solution is undecidable (and therefore has no polynomial time algorithm). But we can check proof certificates (that is, solutions to the equation) in linear time by plugging in our solution and evaluating. So the problem is in NP. ... |
Does anyone have the computational power to check whether or not
$F(m)^d \equiv m \pmod n$, where the values of the variables are found below.
According to Wolfram Alpha, I found the result of the computation $F(m) \equiv m^e \pmod n$, however I don't know how reliable Wolfram is with computations of this size and I am... |
If I have an input string that is only composed of $a$'s and $b$'s, how can I construct a Turing machine that only accepts strings where the number of $b$'s divides the number of $a$'s?
For example:
$aaaabb$ is accepted
$baaab$ is rejected
|
There exist several different types of logic -- 1st order, 2nd and higher order with many different sets of inference rules possible.
What I'm having trouble understanding is what's the "underlying logic" we use to talk about the various different types of logic. For instance, if we were limited to thinking in terms of... |
Recently, I was facing the problem how to multiply to two or more algebraic quantities in c++. For example, if the two algebraic quantities are
$$x^2-2x+3, \text{and } x-5$$
then the result of multiplication will be
$$x^3-7x^2+13x-15.$$
My question is that how to read the two algebraic quantities, find out the result o... |
I've got an idea for a tool I want to make but I am not sure how to go on about trying to solve it... I was hoping if you could help me classify it and also give me some suggestions on how I could try solving it.
Background
This summer I played through the Persona 4 JRPG game, similar to Pokemon. In the game, you can c... |
Suppose I have $M=\{1,\ldots, n\}$ men and $W = \{1, \ldots, n\}$ women and $B =\{1, \ldots, m\}$ brokers, such that each broker knows a subset of $M \times W$ and for each pair in this subset a marriage can be set up among the corresponding man and women.
Each broker $i$ can set up a maximum of $b_i$ marriages and a p... |
Say we have a collections of sets $\mathcal X = \{X_1, \dots, X_n\}$ (not necessarily disjoint), and we want to count the number of possible unions of sets in $\mathcal X$, i.e. the size of $\{\bigcup_{Y \in \mathcal Y} Y \,|\, \mathcal Y \subseteq \mathcal X \}$.
Is there a name for this problem?
What are the fastest ... |
In the lecture note here, a binary tree was generated from the huffman algorithm. However it did not explain what this graph mean.
From this binary tree, what can we say about the encoding for the alpha bets a, c, b, f, e, d?
|
As I've described here, the Neural Engineering Framework (NEF) has some functional similarities to Artificial Neural Networks (ANNs). Naturally, there is also an overlap in applications between NEF-based neural networks and ANNs. For example, Spaun, which was built using the NEF, was used to recognize digits from the M... |
Suppose you have a procedure $\mathrm{Prod}(S, t)$ that inputs a finite set of integers $S$ and an integer target $t$, and outputs either “yes” or “no” according to whether there exist distinct elements $x_1, \dots, x_n \in S$ with $\prod_{i=1}^n x_i = t$. You would like to implement an enhanced version of $\mathrm{Pro... |
Let $k > 0$ be an integer.
Define $A_n$ as follows:
$$ A_n = \begin{cases} n & \text{if } n < k, \\ \sum_{i=0}^{k-1} i & \text{if } n = k \\ \sum_{i=1}^k A_{n-i} & \text{if } n > k. \end{cases} $$
This looks much like Fibonacci, except it's linear up until the k-th term (so the G formula does not work). I am 99% sure t... |
Can someone provide an analysis of the update and query operations of a segment tree?
I thought of a way which goes like this - At every node, we make at most two recursive calls on the left and right sub-trees. If we could prove that one of these calls terminates fairly quickly, the time complexity would be logarithmi... |
I'm studying the MIPS multi-cycle datapath, and I'm wondering what would happen if there was only one read port in the register file for certain instructions.
First, for R-type instructions, I know that it takes in 2 registers(for example, with 'add', rs and rt are both passed into read-port 1 and read-port 2 in the re... |
Let $L$ = {$x_1\#x_2\#...\#x_k$ : $k\;\ge\;1$, each $x_i\;\in\;\{0,1\}^*$ and $\exists i,j$ such that $i < j$ and $x_i$ = $x^R_J$}. For example, $001001\#0010\#100100\#00001$ is in $L$ because $001001$ = $100100^R$. Give a context-free grammar for $L$.
So far I have come up with a rule that can generate the string that... |
Can somebody explain me how can I join forward checking with conflict directed backjumping in my CSP solver? I understand that when the consistency fails when I add a value to a variable, I should save all the instantiated variables of the restriction that fails, on the conflict set of the variable to which I gave a va... |
Say I have an undirected finite sparse graph, and need to be able to run the following queries efficiently:
$IsConnected(N_1, N_2)$ - returns $T$ if there is a path between $N_1$ and $N_2$, otherwise $F$
$ConnectedNodes(N)$ - returns the set of nodes which are reachable from $N$
This is easily done by pre-computing t... |
In image processing I have a black and white image which is represented by matrix {0,1}, I have to find blob (a region of connected pixels) in it. I'm confused, can this problem be reduced to Constraint Satisfaction problem (as p/np complete)?
Black and white image with white blobs.
|
Somehow I thought about quicksort last night and was reading about it on Wikipedia. The interesting part for me was:
'If we could consistently choose a pivot from the middle 50 percent, we would only have to split the list at most $\log_{4/3} n$.
The choice of the pivot seems to be one possible problem of quicksort tha... |
Consider the following grammar with starting symbol of $S$.
$$S \rightarrow 0S11\;|\;S1\;|\;0$$
Let $L = \{0^i1^j:\; \ge 1\; and\; j \ge2i-2\}$ . Give a formal proof of the following claim : For all $n\;\ge0$, every string of length $n$ in $L$ can be generated by the grammar.
I don't know how to start doing it. Any hin... |
I'm taking a "Programming Language: Design and Implementation" course and our professor asked to make a case study about: Haskell programming language. In this case study he asks to make a report about: "implementation issues of some basic features. Can anybody list any good sources for this?
|
Is it possible to create an interval tree using an array instead of the traditional pointer method? I know that for segment trees this is commonly done where the children of any element with index i are stored in 2i and 2i + 1 and the range is halved. For interval trees however, because the ranges added are not guarant... |
In Solution 1: Checking Off of Problem Solving with Algorithms and Data Structures, just beneath the ActiveCode: 1 extract (included at the bottom of this post for reference), it is stated:
each of the n characters in s1 will cause an iteration through up to n
characters in the list from s2.
...which to paraphrase ... |
I'm looking for a one-pass algorithm which computes parity of a permutation. I assume that an input permutation is given by stream $\pi[1], \pi[2], \cdots, \pi[n]$. The output should be the parity of the permutation. The question I'm interested in how much memory deterministic algorithm should use.
I know that computin... |
I don't really know whether this is the correct site where to post this question, I'm sorry if I'm mistaken.
I am studying computer networks and during the explanation of the ip protocol the professor described the reserved addresses such as 255.255.255.255, 0.0.0.0 etc.
Of course, one of such addresses was 127.0.0.1, ... |
Is it possible to have a decision problem $A$ which belongs to P and reduce it to a decision problem $B$ which belongs to NP, i.e. $A \leq_{\mathrm{p}} B$, where $A$ belongs to P, $B$ belongs to NP?
|
If one could build a machine that for any input will never accept, but always loop forever, then will all problems reduce to this?
Or did I just misunderstood the idea of reduction?
|
I need to know how many different values the frequency of a certain word in a corpus can there be for a natural language processing problem. Is there any study or site that has such estimation?
|
I understand that by being clever about the way we navigate the search space of the SAT problem we're going to get better performance than by randomly choosing and testing solutions, though of course both methods have $O(2^n)$ time complexity. What are the specific reasons that DPLL gives better performance than brute-... |
How would I prove that the regular expressions RS and SR where R = (0 + 1) and S = (0 + 1)* are equivalent? The '+' sign represents union of two regular expressions and two expressions RS are concatenated.
From what I know, either you must prove using existing rules about equivalence of regular expressions (example: co... |
Suppose we have a Turing Machine and know how many states it has as well as bound on its running time, but do not initially know its transition function. Is it possible to determine its transition function (up to a relabeling of its states and disregard for inaccessible states) by noting its behavior on only finitely ... |
I have found this problem-
let A be the set of encoding of all those Turing machines that accept exactly two strings and let A' be the complement of A. Comment on whether A and A' are recursive , recursively enumerable or not recursively enumerable.
I am clueless at "exactly 2 strings". I have tried many books but I... |
I'm not sure whether I'm asking on the right site, since all the other questions seem to be a lot more abstract and theoretical. If I should remove the question, please tell me.
Are all files on my computer an integer amount of bytes? That is, does every file on my computer consist of an amount of bits divisible by 8? ... |
I frequently hear about the Minsky-Papert Symmetrization technique in many papers with a reference to the book of Minsky. I could not locate the book online. Could someone supply me a proof of the symmetrization technique?
For instance, it is used in Lemma $5$ in this paper http://www.csee.usf.edu/~tripathi/Publication... |
Given that there is an image with objects in it, is there any method in computer vision to determine the z-ordering of objects. For an ideal image of three circles overlapping, I can determine that it is three circles overlapping and determine which is the closes to me in this image.
Therefore for any given image, is t... |
Parsing family of grammars, determine if LR(k)
I have the exact same problem, but my reputation is not enough to comment on that thread, plus the OP hasn't been online in 2 years so I can't ask him personally. So I apologize, but I do have to ask for your help!
Would it be enough to show that the formula works for n = ... |
Specifically I'm studying towards a research degree in HCI (human computer interaction). I have problems however differentiating theory and practice, or science and engineering. I know science is about advancing human knowledge. Providing evidence about something specific in a field. But it's also about theory right? I... |
Clearly we have to disprove this. But I am finding it hard to prove it. I was trying in following way: Considering any non context free language L. I was trying to prove that L^2 is context free which will contradict given statement. But I don't know to how to prove it. Because by pumping lemma we can show only that la... |
Given $S = \{a^n b^n \mid n > 0\}$, show $S$ is deterministically decidable in log space.
Hint: to count up to $n$ you need $\log n$ bits.
This comes from some lecture notes at https://www.cise.ufl.edu/research/OptimaNetSci/slides/ThangSept20.pdf
but they did not show how to prove it. Any ideas? (Was posted in wrong s... |
I have been reading about model counting, a.k.a. the #SAT problem. What are the practical applications, if any, of this problem, and how exactly do they reduce to it? I have been unable to find any, though that's simply due to my own ignorance of the subject.
|
Consider the algorithm (from another question):
set start vertex to visited
load it into queue
while queue not empty
for each edge incident to vertex
if its not visited
load into queue
mark vertex
The complexity of the algorithm is defined as the upper bound o... |
I was reading about Iota and Jot and found this section confusing:
Unlike Iota, where the syntactic tree for a string can branch either on the left or on the right, Jot syntax is uniformly left-branching. As a result, Iota is strictly context-free, but Jot is a regular language.
My understanding is that both Iota and... |
I have to solve a question saying
The value of ab if ab & 0x3f equals 0x27.
Consider a, b as hex digits. Then b&f means b&1111 - the book explains that b&1111 should yield 0111 i.e. 7 => a should be 7.
The book says a&0011should yield a = 2 but doesn't provide an explanation.
Please help me understand why a&0011 = 2... |
There are n numbers and we have to split the numbers into 2 sets such that difference of the sum of numbers of both sets is less than 100. Is this problem NP complete?
Solution: I can prove that it belongs to NP but I am not able to find a reduction from another NP complete problem to this problem. I have tried reducin... |
I was told this question may be better received here.
Prove that the probability that an insertion into a cuckoo hash table
probes $t$ array locations is $O(\frac{1}{2^{t/2}})$. Keep in mind that there are two tables, each with size $s \ge 2n$, where $n$ is the number of elements in the set.
I'm trying to use induc... |
When computing statistics on a list of data it occurred to me that most of the standard statistic functions, such as mean, min, max can be computed in O(N) time with O(1) space. They can also be computed incrementally, or "online", in O(1) space. That is, if the data were a stream we could compute the statistic without... |
Here is a problem I am trying to solve:
S -> 0A0 | 1B1 | BB
A -> C
B -> S | A
C -> S | e
I know that C is nullable (since it produces an epsilon) and A is nullable (since it produces C, which is nullable). My question is if B is nullable too since it produces A which produces C which are both nullable?
|
I am interested in testing for a given string (w) whether it is in the language (L) defined by a nondeterministic finite automaton (A). I have some blurry point in my mind.
What is the complexity of this test by using the NFA and backtracking? Assume my NFA has m states and string (w) has length n (|w| = n). For regula... |
The assignment problem is defined as follows:
There are a number of agents and a number of tasks. Any agent can be
assigned to perform any task, incurring some cost that may vary
depending on the agent-task assignment. It is required to perform all
tasks by assigning exactly one task
to each agent in such a wa... |
In the same lecture notes without providing many details it says that the complexity of the algorithm which uses a balanced search tree is $O(n\log n+R)$ where $R$ is the total amount of intersections.
However I don't understand why this is the case.
Suppose that the sweep line is travelling from top to bottom. Whenev... |
Denoting the two special bytes as FLAG and ESC, and any other as X, where FLAG denotes the start and end of the message and ESC is used to escape any flags within the original message,
if the original message was for example,
X FLAG ESC FLAG FLAG ESC ESC FLAG X X
this can be byte stuffed as,
FLAG X ESC FLAG ESC ESC FLA... |
How to prove that there exist two different programs A and B such that A printing code of B and B printing code of A without giving actual examples of such programs?
|
In the paper "MVCC@TODS'1983 by Bernstein et al.", 1-serializability ($1$-$\text{SR}$) problem is defined as a decision problem:
To decide whether an MV (multi-version) log $L$ is $1$-$\text{SR}$.
where,
An MV (multi-version) log $L$ is $1$-$\text{SR}$ iff there exists a version order $\ll$ such that MVSG($L,\ll$)... |
Given a graph G = (V,E)
every edge is assigned a real number Xe $\in$ [0,1]
The sum of x variables for all edges is equal to the number of edges -1 : $\sum x_V = |V|-1$
For a subset S $\subset$ V let us denote by $E_{(S)}$ the set of all edges with both endpoints in the subset S.
Give a polynomial time algorithm tha... |
I know that there are All Pairs Shortest Paths algorithms. But I am not sure if they are effective if I am trying to solve the Pairs-Shortest-Path problem for a subset of my vertexes.
The properties of the graph are:
sparse
directed
positive arc weights
cycle-free
the subset of vertexes I am interested in is 1/14 of ... |
I have an array of real numbers, I want to partition them into k sets. In each set, I calculate the sum of squared error. Then, I add up all the sum of squared error for all the set. I want to minimize this number. For example:
1 3 5 9
if k=2, I would partition them into (1 3 5) and (9), the sum of squared error of (1 ... |
I see the problem here which is the well know partition problem but with constraint that the size of both sets must be equal.
I look at the answer and I don't understand that why Colin said add max(S)⋅length(S), and run the algorithm as normal would make the size of both sets equal. I think for long time.
And i think t... |
Consider the following problem to be solved in a distributed context:
Find for each processor the size of the biggest cycle of which it is member.
My algorithm is the following (for synchronous MPS):
procedure findMaxCycleSize
cycle_size := 0
send(my_id, 1) to all my neighbors
for i:=1 to n do
receive(id, size)
... |
There's a formula given $$
T(m,n) = \left\{
\begin{array}{l l}
1 & \quad \text{if $m=0$}\\
1+T(n \mod m, m) & \quad \text{if $m>0$}
\end{array} \right.$$
We're told to use repeated substitution to make a conjecture about a closed form for $T(F(n),F(n+1))$, where $F(k)$ is the $k^{th}$ Fibonacci number.Thi... |
I've really been thinking about and working on this problem for a while, and I would appreciate if someone could offer any help towards the solution.
Consider the following family of hash functions that map $w$-bit
numbers to $l$-bit numbers (i.e. the range is $\{0,...,m-1\}$ where
$m=2^l$):
$\mathcal{H} = \{h_{A... |
Is there a way to modify the Damerau–Levenshtein distance algorithm to allow the transposition of substrings? By this I mean that instead of simply turning "ba" to "ab" you could calculate "worra" to "arrow" and have that cost only be 1. An example might help:
If you had a target of timeflieslikeanarrow and a staring s... |
I'm familiar with the fooling set technique to obtain lower bounds for communication complexity protocols. The most basic example is the equality function for which the diagonal matrix gives the fooling set of size $2^n$, because each 1-output needs to be in its own monochromatic rectangle. Also, a similar property see... |
Usually questions deal with claw-free graphs, but suppose we are given a graph $G$ and there are $k$ vertex-disjoing claws in the graph, how can we derive a randomised algorithm using color coding to find them. My intuition is to approach this with $k$ colors, but not really sure how to start it. Could someone give me ... |
I'm learning about NP-completeness, and many reduction proofs start off by stating that a problem is triviallyin NP. But I can't seem to wrap my head around this.
Why is this so?
|
What's the most efficient way to enumerate all (ordered) subsets of an ordered set? So, for example, given the ordered set $\{2, 5, 6\}$ (using the normal ordering for integers), I need the following:
$$\{\}, \{2\}, \{5\}, \{6\}, \{2, 5\}, \{2, 6\}, \{5, 6\}, \{2, 5, 6\}.$$
Smaller subsets should come first, but the or... |
Paxos is more powerful and in the famous writing "Consensus on Transaction Commit" : http://research.microsoft.com/pubs/64636/tr-2003-96.pdf, Jim Gray and Leslie Lamport describe 2PC as a special case of Paxos.
Why do relational database use 2PC in real world? Also 2PC is not fault tolerant because it uses a single coo... |
Let $$B_1=\vee_{i_1=1}^d\wedge_{i_2=1}^d\dots\vee_{i_{2r-1}=1}^d\wedge_{i_{2r}=1}^dX_{i_1i_2\dots i_{2r-1}i_{2r}}$$
$$B_2=\wedge_{i_1=1}^d\vee_{i_2=1}^d\dots\wedge_{i_{2r-1}=1}^d\vee_{i_{2r}=1}^dX_{i_1i_2\dots i_{2r-1}i_{2r}}$$ be two boolean functions in $d^{2r}$ variables $X_{i_1i_2\dots i_{2r-1}i_{2r}}$ that take va... |
I have constructed an SLR(1) parsing table with the following rules.
S -> S + S + S (rule 1)
S -> S + S (rule 2)
S -> y
Is reducing rule 2, then shifting + and y, then again rule 2, equivalent to reducing rule 1? Can I claim to have reduced by rule 1, even though I did so indirectly?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.