instruction stringlengths 35 29.1k |
|---|
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?
|
Alright, I thought I understood this concept but now I am confused. I looked up similar problems and their solutions to practice, and that's what threw me off. The question is a homework problem which says:
Below is a list of 32-bit memory address references, given as word addresses.
3, 180, 43, 2, 191, 88, 190, 14, ... |
We all know F(n) = F(n-1) + F(n-2) is an easy example. We can compute this by using DP.
But what about F(n) = F(n-1) + k, we could compute this by tabulation but would you still call it DP?
Also, are there any recurrences that cannot be computed using tabulation?
Is there a general theory surrounding the kind if recurr... |
What is the name for this variant of genetic algorithm. I'm sure I have read about this in Wikipedia, but now I could not find it:
There in no thing as sequential population. The phenotypes lives and dies just like people. The death comes after random period of time. During life phenotypes can have children. The better... |
According to Wikipedia:
In computer science, the subset sum problem is an important problem in complexity theory and cryptography. The problem is this: given a set (or multiset) of integers, is there a non-empty subset whose sum is zero? For example, given the set {−7, −3, −2, 5, 8}, the answer is yes because the subs... |
Given two graphs one needs to decide if one of them has a subgraph isomorphic to the other.
Given a subset of a graph one needs to decide if the induced subgraph is triangle free.
Can someone kindly help prove that both of these are NP-Complete?
|
Say you are given an undirected unweighted graph, where s and t are nodes from the graph.
d(s,t) means the distance between s and t which outputs the number of edges.
How do I find the the maximum distance between s and t ,
max{d(s,t)}, where the edges between s and t are minimal?
Also, how can this problem can be re... |
Suppose I am about to use SVM for learning a classification or ranking function. Suppose that my feature vectors are two dimensional and that values for one dimension are, say, natural numbers and the values for the other dimension are real numbers in $[0,1]$. Can this difference in magnitudes somehow negatively affect... |
Say we want to support: xx
The following grammar does accept it:
S -> xAx
A -> ε.
because S => xAx => xx.
But what about supporting: x x
I realize this might be a stupid question but I'm really unable to find a definite answer. Especially as
S -> xAx
S -> x A x
appear to be equivalent representations in most re... |
Suppose we have a degree $m$ multivariate polynomial $p(x_1, x_2, \ldots, x_m)$ in $n$ variables (by degree I mean the highest sum of powers of factors in any monomial term). Such a polynomial can have infinitely many rational zeros. Suppose we have landed at one of them, then what is an efficient way to escape from th... |
The SUBSET SUM problem states that:
Given finite set S of integers, is there a subset whose sum is exactly t?
Can someone show me why verification is simpler than decision for this problem?
|
I find this quote here on page 13
Does it mean that out of all different problems that are NP complete, if any problem is found to have a p time solution, then all the NP complete problems are p time solvable?
This is very unbelievable to me since NP complete problems are so different in nature and comes in a variet... |
I am looking up the meaning of reduction in complexity theory:
On Wikipedia it says: reduction is an algorithm for transforming one problem into another problem
On the Princeton's notes on NP-Completeness, it says: reduction is whereby given all x $\in $ language L1, for instance f(x) $\in$ L2, apply decision algorithm... |
I have been working in the time analysis for an algorithm and finally I got a curve that fits:
$O(2^{(\log_2(N)^{2.01})})$
N is the number of elements.
I'm right to say the above time complexity is quasi-polynomial?
|
How would one (quickly) find the number of integers in the range [1, x] for some x, more than half of its digits being one digit, given that $x$ has at most, say, 19 digits.
Brute force would obviously not work in a reasonable amount of time (where "reasonable" means roughly $10^9$ seconds)
|
I find the word "reducible" used in complexity theory not very intuitive, and too general taken on a face value.
What does it exactly mean by problem A reducible to B?
Does it mean that A can be reworded into B?
i.e. Finding Vertex Set is actually the same as finding an independent set?
Does it mean that an algorith... |
Let $k,M\in\Bbb N$ be fixed. In the BSS model we allow only $+,-,\times,=$ as valid operations and also an initial set of constants that are fixed for all instantiations of the algorithm. Here we relax $=$ and add $\geq,\leq$ operations.
Fix an upper bound on inputs and call this $M$.
Problem $1$ Given input $ka$ for s... |
Recently in my CS class I've been introduced to the Turing Machine.
After the class, I spent over 2 hours trying to figure out what is the relationship between a tape and a machine.
I was completely unaware of the existence of computer tapes or how tapes and machines interacted until today. I still can't see why a ma... |
This is Normal Form Theorem (Second Edition of Computability, Complexity, and Languages written by Martin Davis page 75):
Let $f(x_1,...,x_n)$ be a partially computable function. Then there is a primitive recursive predicate $R(x_1,...,x_n,y)$ such that:
$f(x_1,...,x_n) = L(min R(x_1,...,x_n,z)_z)$ (minimization is on... |
Just stepping into complexity theory, I am befuddled by this notion of a certificate and can't find any utility of this concept.
From my understanding, a certificate is used when you are trying to ascertain whether a problem is NP...a problem is NP if you can verify a p-time solution exist or not (co-NP). I cannot see... |
Does the 2 in a 2-approximation algorithm mean the solution is within 2*OPT or OPT/2?
|
While it is not the case that the extension of every decidable theory is decidable, is it true that:
the extension of every undecidable theory undecidable?
In other words, given an undecidable theory A, is it enough to show
$$A \subseteq B$$
to prove that B is undecidable?
|
In distributed systems we use the Chord algorithm to create a p2p distributed hash table. While this algorithm is very useful and efficient wouldn't it be better if we used an AVL tree? Chord algorithm relies a lot to the hash function (in order for the nodes to be distributed evenly).
An AVL tree on the other is alwa... |
Given an array of length $n$ we need at least $O(\log n)$ memory to store its length. And we need the same $O(\log n)$ memory to store index. With large $n$, index may not fit in one extra cell.
So it is impossible to construct a sorting algorithm for arrays which uses $O(1)$ additional memory.
On the other hand, one... |
$\def\R{\mathbb{R}}\def\Z{\mathbb{Z}}\def\n#1{\|#1\|_\infty}$The problem comes directly from computational mathematics, and can be stated as follows:
Given a regular matrix $M\in\R^{d\times d}$, find effectively all vectors $v\in\Z^d$ such that $\n{Mv}\leq1$, where $\n{Mv}$ is the maximal component of the vector in mod... |
As the title suggests, assume a grammar which has to recognize function declarations, function calls, and expressions, at any order. Does that mean it has to be cyclic, and therefore ambiguous?
I mean, it would have to look something like:
S -> function_declaration | function_call | expr
function_declaration -> ... | ... |
We know that computing a maximum flow resp. a minimum cut of a network with capacities
is equivalent; cf. the max-flow min-cut theorem.
We have (more or less efficient) algorithms for computing maximum flows, and computing a minimum cut given a maximum flow is neither hard nor expensive, either.
But what about the reve... |
Consider the following problem:
Given a simple, strongly-connected, weighted graph G=(V,E), of which every edge is colored either red or blue (in addition to having a numeric weight).
Find an efficient algorithm to find an MST which is mostly red (meaning, has the most red edges possible).
I think this can be done in l... |
What is a polynomial time algorithm for finding a vertex cover of size $k$ in a tree? Would depth first or breadth first search be efficient or is there some other algorithm that finds the vertex cover that takes $n^k$ time rather $2^n$ time?
|
May be this question is really silly and obvious but I am missing something subtle. I am reading on Sensitivity and Block sensitivity.
Let $f:\{0,1\}^n\rightarrow \{0,1\}$ be a Boolean function.
Let $[n]=\{1,2,\dots,n\}$.
If $i\in[n]$, let $\Bbb 1_i$ be length $n$ vector with all $0$s except $1$ at $i$th position.
If $... |
I am interested in the field of AI and machine learning and I am fairly good at mathematics and statistics and programming in general. However I lack a formal CS education and my undergraduate degree was in an unrelated field.
What are the typical prerequisites for a master's-level course in AI and machine learning?
|
Consider the hash function mapping $w$-bit keys to hash values in
$\{0,...,m-1\}$. Suppose $w=cr$. Interpret a $w$-bit key $x$ as a
vector $(x_1,...,x_c)$ of $c$ $r$-bit keys.
Consider the hash family:
$$H = \{h_{T_1,...,T_c}:T_i \in \{0,...,m-1\}^{2^r}\}$$
where
$$h_{T_1,...,T_c}(x) = \sum\limits_{1\le i \le c}T_... |
I am analyzing the asymptotic runtime of a randomized algorithm in expectation. The algorithm has the following properties:
Given input size $n$, with probability $3/4$ it moves on to solve an instance of size $n-1$
With probability $1/8$ it moves on to solve an instance of size $n-2$
With probability $1/16$ it moves ... |
Question
Given a set of X kd (k-dimensional) points, find the maximum number of closed subsets of these points such that no subsets (each forming a convex hull) overlap or intersect, that each subset is exactly of size N, and that the distance from each vertex to the center of its subset (average center of all points i... |
My main issue of a homework problem is trying to figure out the different parts of the chart. I have a 3 way set associative cache with 2 word blocks, total size of 24 words. I am given $3, 180, 43, 2, 191, 88, 190, 14, 181, 44, 186, 253$ to try to map.
What I have so far and where I am stuck:
My main problem is tryi... |
I am interested in generating random solutions to predicates. I only need SMT for integers with the following predicates/functions <, >, <=, >=, ==, !=, +, *
The algorithm I want should produce a random assignment of variables to values (a substitution) such that applying the substitution to the given predicate yields ... |
I want to prove that for any language $L_1$ described by a Turing machine and any regular language $L_2$, $L_1 \cap L_2$ is described by a Turing machine that its recognizability and decidability is same as $L_1$.
I thought so far that I can describe $L_2$ with a Turing machine. So I can next find the intersection Tu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.