instruction stringlengths 35 29.1k |
|---|
What is the best known approximation for the computational complexity of the clique problem? Is it accurate to consider it $O(2^n)$?
|
Suppose
$$A = \left\{\langle G, d, s, t\rangle \;\Bigg|\;
\begin{array}{l}
\text{\(G\) undirected}, \\
\text{\(s\) and \(t\) are nodes in \(G\)}, \\
\text{there is a path of length \(d\) from \(s\) to \(t\) and no path of shorter length}
\end{array}\right\}$$
I can easily see that this language is in NL, but I am... |
Let $P$ be a regular language and $Q$ be a context-free language such
that $Q \subseteq P$(For example, let $P = a^*b^*$ and $Q = \{ a^nb^n | n \ge 0\}$). Then which of the following is always regular?
$P \cap Q$
$P - Q$
$\Sigma^* - Q$
$\Sigma^* - P$
Option 1
$P \cap Q = Q$ as $P \subseteq Q$. Thus $P \cap Q$ i... |
The Clique problem takes a graph $G = (V,E)$ and an integer $k$ and asks if $G$ contains a clique of size $k$. (A clique is a set of vertices such that every pair of vertices in the set is adjacent.) The Independent-Set problem takes a graph $G’ = (V’,E’)$ and an integer $k’$ and asks if $G’$ contains an independent se... |
I was practicing the following problem :
There are a total of $N$ operations.
At each operation, you can either add an element to the top or remove several elements as described below.
Inputs are integers. An input other than $-1$ indicates that we have to add the elements in last in first out fashion (LIFO). If the... |
With respect concurrent programming, what is a linearization point?
They seem to occur at a compare-and-swap instruction apparently. The best definition I could find is here.
All function calls have a linearization point at some instant between their invocation and their response.
Okay that's fine, they occur somew... |
How can I prove that I can verify whether a boolean assignment of variables $a$ satisfies some boolean formmula $\phi$ in polynomial time?
I know that we can just plug the boolean assignment into the formula, but this seems to be a very high-level description, and I am not sure that it is a reliable one since we must s... |
Coming from the POV of someone who is thinking about pursuing a PhD in Computer science.
I am having trouble deciding what I would focus my research on when I go for my PhD. See also this question on academia.SE.
So I am thinking that reading/keeping current on what research is being done and what research papers are b... |
Possible Duplicate:
Proof of linear search?
I'm reading the MIT Press, Introduction to Algorithms textbook 3rd edition, and I am a bit confused by an exercise.
2.1-3
Consider the searching problem:
Input: A sequence of n numbers A = and a value v.
Output: An index i such that v = A[i] or the special value NIL if v... |
The access patterns of user requests may be static, so that they do
not change over time, or dynamic. It is obviously considerably easier to plan for
and manage the static environments than would be the case for dynamic distributed
systems. Unfortunately, it is difficult to find many real-life distributed applic... |
Using this grammar, over the alphabet $\Sigma=\{a\}$
$$
S \rightarrow a \\
S\rightarrow CD \\
C\rightarrow ACB \\
C\rightarrow AB \\
AB\rightarrow aBA \\
Aa\rightarrow aA \\
Ba\rightarrow aB \\
AD\rightarrow Da \\
BD\rightarrow Ea \\
BE\rightarrow Ea \\
E\rightarrow a \\
$$
Im trying to show that the working string $aa... |
I need to know what class of CFL is closed under i.e. what set is complement of CFL.
I know CFL is not closed under complement, and I know that P is closed under complement. Since CFL $\subsetneq$ P I can say that complement of CFL is included in P(right?). There is still a question whether complement of CFL is proper ... |
Binet's formula for the nth Fibonacci numbers is remarkable because the equation "converts" via a few arithmetic operations an irrational number $\phi$ into an integer sequence. However, using finite precision arithmetic, one would always have some (small) roundoff error.
Is there a discussion/description somewhere o... |
I was solving the following problem. But I am not able to think of an efficient algorithm for this modified version of problem. The problem statement is:
We are given K Rectangles. The dimensions of $x$-th Rectangle is ($N_x \times M_x$), where $1\leq x \leq K$.
From each rectangle $x$ , Alice Cuts a rect. of dimen... |
Provided that we have to compare it against the graph coloring problem which is NPC. So far,
I can only think of connecting edges from a vertex in a provided graph to all the other edges it is not connected to then I separate the new graph g2, then I connect all the vertices that are not connected in the g2. And then I... |
I am really confused about clique problem and clique cover problem. I tried googling it,but I don't see to be able to visualise the clique cover problem.
|
Assume a map-reduce program has $m$ mappers and $n$ reducers ($m > n$). The output of each mapper is partitioned according to the key value and all records having the same key value go into the same partition (within each mapper), and then each partition is sent to a reducer. Thus there might be a case in which there a... |
I know that a one-way function is informally a function that it's easy to compute but hard to invert.
If f(x) is a one way function the function $g(x) = x\oplus f(x)$ is a one-way function?
My intuition is that it's but i not really sure.
|
If we limit a turing machine so that it is not allowed to write the symbol that it reads would it reduce its power?
For example: $( State, A, State, Z, DIRECTION)$
$A$ cannot be the same symbol as $Z$.
|
Given a graph $G = (V,E)$, where $|V| = n$. What is a fast algorithm for generating the collection of all 2-hop neighborhood lists of all nodes in $V$.
Naively, you can do that in $O(n^3)$. With power of matrices, you can do that with $O(n^{2.8})$ using Strassen algorithm. You can do better than this using another mat... |
A set of numbers is stored in a max-heap. We want to find an algorithm with $O(k)$ time complexity to check if $k^{th}$ smallest element is greater than an arbitrary given number.
|
From Wikipedia
Information retrieval is the activity of obtaining information resources relevant to an information need from a collection of information resources. Searches can be based on metadata or on full-text indexing.
From Wikipedia
Information extraction (IE) is the task of automatically extracting structure... |
Are the following relations $R_1$ and $R_2$ defined on the set $\mathbb{Z}$ of integers partial orders? (A partial order is reflexive, antisymmetric and transitive.)
$a$ $R_1$ $b$ if and only if $a = 2b$.
$a$ $R_2$ $b$ if and only if $a^2|b$.
Would someone help me understand?
|
Is the language $L=\{ xyx^Ry^R \mid x,y \text{ is an element of }\{0,1\}^*\}$ context-free?
Note: $x^R$ is the reverse of $x$.
My Work: I think this is a context free language. Since a pushdown automaton (PDA) accepts context-free languages, I am trying to draw a PDA for this language. When I draw a PDA, how does the ... |
I am wondering if this is even possible, since $\{a^n b^n c^n \mid n \geq 0\} \not\in \mathrm{CFL}$. Therefore a PDA that can distinguish a word $w\in\{a^n b^n c^n \mid n \geq 0\}$ from the rest of $\{a^*b^*c^*\}$ might as well accept it, which sounds contradictory to me.
I guess I need to take advantage of the non-d... |
I read some research that analyzes the hardness of SAT solving in the average case.
In fact, for a 3CNF formula if you compute the ratio of clause to variables there is an interval (more or less between 4 and 5) in which solving the formula is hard. But it is easy (between 0 and 4) high probability of satisfiable assig... |
Sorry if this question is very simplistic; I'm just starting out and I'm trying to wrap my head around all this asymptotic bound stuff. When trying to find the upper bound for the worst case of a function does it need to take into account what the meat of the code actually does? I have some code that would (in the wors... |
Consider the family of grammars $G_n,~n\geq2$.
$$S \rightarrow A_ib_i~,~for~~1\leq i \leq n$$
$$A_i \rightarrow a_jA_i~|~a_j~,~for~~1 \leq i,j \leq n~~and~~i \neq j$$
where multiple alternative right sides result from different values of $i,j$
while the terminal symbols $a_i$ and $b_i$ are not necessarily different fro... |
Given languages $L_1,L_2$, defines $X(L_1,L_2)$ by
$\qquad X(L_1,L_2) = \{w \mid w \not\in L_1 \cup L_2 \}$
If $L_1$ and $L_2$ are regular, how can we show that $X(L_1,L2)$ is also regular?
|
In the multiway cut problem, the input is an undirected graph $G= (V, E)$ and set of terminal nodes $s_1, s_2,\ldots s_k$ are in $V$. The goal is to find a minimum
set of edges in $E$ whose removal leaves all terminals in different components.
How do we show that this problem can be solved exactly in polynomial time w... |
Say I had the choice of choosing one out of the following two optimization problems which I could use to solve my problem. Which choice is the fastest? How much of a trade-off would it be? Is the improvement in speed by many factors!?
Minimizing a convex function $L(X)$ in one matrix variable with orthogonality const... |
I am working 1 with a certain structure,
and I wonder if someone has seen it before.
I am no mathematician, so all I can say is that
I will do my best to describe this structure.
It is actually very simple.
I am sure I have seen it (and its interpretation) somewhere, years ago,
perhaps in some old first year university... |
I have a list of numbered elements 1 to N that fit into positions on a number line starting with 1. I also have constraints for these elements:
The element 1 is in position 1, and element N must be at a position >= the position of element N-1. (i.e. element 2 could be at position 1, element 3 at position 7, and elemen... |
Let's say we have 10 people, each with a list of favorite books. For a given person X, I would like to find a special subset of X's books liked only by X, i.e. there is no other person that likes all of the books in X's special subset. I think of this special subset as a unique "fingerprint" for X.
I would appreciate ... |
I'm reviewing for a computability test, and my professor has not provided solutions to his practice questions. I came up with a "solution" to this problem, but it really seems like my answer is wrong (since I call upon $\mathsf{Halt}$ twice)...
We are given this initial language for some machine $M$:
$\mathsf{2Strings}... |
This problem, for me, looks very interesting. It was about to find a simple cycle (i.e. cycle where are not repeat nodes) in a directed graph.
My solution is going like this, i.e, this graph is a case problem:
I know that there is a cycle in a graph, when you can find "back edges" in a depth-first-search (dashed in my... |
Do there exist robust structures in Conway's Game of Life? For instance, has anyone constructed a spaceship with a shield that absorbs all small oscillators and gliders it collides with?
|
I got this question on my final exam: Is the following language context-free?
$$ L = \{w\bar w^R \mid w\in \{0,1\}^* \}$$
Notation:
The string $\bar w$ is obtained from $w$ by replacing all 0s with 1's and all 1's with 0's. The string $\bar w^R$ is $\bar w$ in reverse order.
I've thought about it being a contex... |
I'm trying to solve a graph problem (it's not for homework, just to practice my skills). A DAG $G(V,E)$ is given, where $V$ is the set of vertices and $E$ the edges. The graph is represented as an adjacency list, so $A_v$ is a set containing all the connections of $v$. My task is to find which vertices are reachable fr... |
I was reading Wiki on feature vectors, and as far as I can see, it suggests creating new features from already existing features:
Higher-level features can be obtained from already available features
and added to the feature vector, for example for the study of diseases
the feature 'Age' is useful and is defined a... |
The right quotient of two languages is defined as
$$L_1/L_2=\{ x \mid xy \in L_1 \text{ and } y \in L_2 \}.$$
Example:
$L_1=\{ab,aab,baa\}$ and
$L_2=\{b\}.$
I read somewhere that $L_1/L_2=\{a,aa,\varepsilon\}$ but I cannot understand why $\varepsilon$ is contained in the quotient.
|
I have two questions:
I consider the following language
$$L_1= \{ w\in \{0,1\}^* \mid \not \exists u\in \{0,1\}^* \colon w= uu^R\}.$$
In other words $w$ is not palindrome with even length. I proved that this language is NOT regular by proving that its complement is not regular. My question is how to prove it using th... |
Possible Duplicate:
Pumping lemma for simple finite regular languages
The pumping lemma says that for any regular language $L$, there exists a constant $p$ such that any word $w$ in $L$ with length at least $p$ can be split into three substrings, $w = xyz$, where the middle portion $y$ must not be empty, such that t... |
I'm preparing for an exam, and on a sample one provided (without solutions), we have this question: Is the following solvable or non-solvable: Given a turing machine $T$, does it accept a word of even length? - Given a deterministic 1-tape turing machine $T$, does $T$ ever read the contents of the 10th cell?
Thanks! - ... |
I try to figure out linear speed-up of Turing machine.
Prove that any problem that can be solved by a two-tape Turing machine that has time complexity t can be solved by another two-tape Turing machine having time complexity $t′$, where $t′(n) = O(n) + (t(n)/2)$.
The idea seems to show that what the first machine does ... |
I'm studying shortest paths in directed graphs currently. There are many efficient algorithms for finding the shortest path in a network, like dijkstra's or bellman-ford's. But what if the graph is dynamic? By saying dynamic I mean that we can insert or remove vertices during the execution of the program. I'm trying to... |
In this question we only consider Turing machines that halt on all inputs. If $k \in \mathbb{N}$ then by $T_k$ we denote the Turing machine whose code is $k$.
Consider the following function
$$s(x,y) = \min\{k \mid |L(T_k) \cap \{x,y\}| = 1\}$$
In other words, $s(x,y)$ is the code of the smallest Turing machine that r... |
Possible Duplicate:
A puzzle related to nested loops
I am trying to count the exact/total number of iterations the following nested for-loops are executed:
s=0
for (i: 1 to n)
for (j: 1 to i)
for (k: j to i)
s = s + 1
I know that the first two for-loops will have n(n+1)/2 iterations. My problem is with the th... |
I have just read mental poker, described in this fascinating paper(PDF) by cryptographic greats Adi Shamir, Ron Rivest, and Leonard Adleman.
Assuming I have a website, (TTP) how can I prove to the player that the hand dealt to him is fair? Most importantly how can I prove that I didn't bruteforce until an unfair hand i... |
In my program, it draws them by offsetting every other row by half of the width, as pictured above. Each tile can be referenced by coordinates, also shown above.
I want to know how many blue tiles are accessible from a certain starting tile and a series of "roads." In this example, three blue tiles can be reached.
H... |
What are the types of things that need to be considered if I need to sort a large random array of 0s and 1s?
You can assume large array is in the order of million or billions.
I understand there are tons of sorting algorithms out there (quick, merge, radix,.etc.) and there are so many different data structures out t... |
Technical question: is there any open source program/code/library which can compute (minimal) conductance of a given graph, probably by some simulated annealing?
Think it is quite well-known problem, but I cannot find anything like I mentioned above, but maybe you guys know? I know that it is a NP-hard task, but anyway... |
Consider the following language:
$$ L_1=\{uu^rv \mid u,v\in\{0,1\}^+\}.$$
that means that neither $u$ nor $v$ can be $\varepsilon$. As usual $u^r$ refers to $u$ reflected.
I think that this language is not regular, but i am not sure. Any ideas?
|
The Count-Min Sketch is an awesome data structure for estimating the frequencies of different elements in a data stream. Intuitively, it works by picking a variety of hash functions, hashing each element with those hash functions, and incrementing the frequencies of various slots in various tables. To estimate the fr... |
I read this question somewhere, and could not come up with an efficient answer.
A string of some length has beads fixed on it at some given arbitrary distances from each other. There are $k$ different types of beads and $n$ beads in total on the string, and each bead is present atleast once. We need to find one consecu... |
The following is an excerpt from CLRS:
$\Theta(g(n))= \{ f(n) \mid \text{ $\exists c_1,c_2,n_0>0$ such that $0 \le c_1 g(n) \le f(n) \le c_2g(n)$ for all $n \ge n_0$}\}$.
Assuming $n \in \mathbb{N}$, I was unable to find $f(n)$ and $g(n)$ such that the bound does not apply for all $n$.
Note: This question was asked ... |
So we can prove that the language say $A = \{ \langle M,w \rangle \mid \text{M is TM that accepts } w^R \text{ whenever it accepts } w \}$ is undecidable by assuming it is decidable and use that to construct a $TM$ deciding $A_{TM}$. So by contradiction $A$ is undecidable. But what if the language was $\{ \langle M,w \... |
This language I think is not accepted by a deterministic one counter but accepted by a non-deterministic one counter :
$L = \{a^{i}b^{j}c^{k} \mid (i=j) \vee (j=k) \text{ such that } i\geq0, j\geq0, k\geq0\}$
But how to prove this claim?
Or is it the case that they are equivalent?
|
I stumbled upon the MSDN Best Practices for Code Review.
Under the section “Untrusted Inputs”, I found following which I didn't understand properly. Why is the following considered safe?
printf("%s", buffer);
What kinds of guarantees does the C language give regarding the behavior of this snippet? Given that both prin... |
I've heard this interview question asked a lot and I was hoping to get some opinions on what good answers might be: You have a large file 10+ GB and you want to find out which element occurs the most, what is a good way to do this?
Iterating and keeping track in a map is probably not a good idea since you use a lot of... |
Who was/were the first person/people to introduce the topic of quantum complexity theory and problem classes like BQP and QMA?
|
I am resuming syntax rules for a small language:
\begin{eqnarray*}
e_C &::=& \epsilon \mid constant \\
\textit{prefix-op} &::=& - \\
\textit{infix-op} &::=& + \mid - \mid * \\
e_E &::=& e_C \mid \textit{prefix-op} \; e_E \mid e_E \; \textit{infix-op} \; e_E \mid \textit{function}_E (e_{E,0}, e_{E,1},\ldots) \mid \texti... |
I want to show that reasonable advice can really speed up computation.
Show, that every time-constructible function $t$, there exists a set $S$ in time $\text{DTIME}(t^2) \setminus \text{DTIME}(t)$ that can be decided in linear time using an advice of linear length, $S \in \text{DTIME}(l) / l$ (definition in analogy t... |
I am trying to get better in proofs and deep understanding of concept of computational complexity. Unfortunately, so far, with no success.
In order to get more intuition, I decided to do more exercises, but most of them are still difficult for me.
I am looking for exercises with solutions in field of computational comp... |
Current chess algorithms go about 1 or maybe 2 levels down a tree of possible paths depending on the player's move's and the opponent's moves. Let's say that we have the computing power to develop an algorithm that predicts all possible movements of the opponent in a chess game. An algorithm that has all the possible p... |
This is a homework question. I do not want the solution - I'm offering the solution I've been thinking of and wish to know whether is it good or why is it flawed.
Consider a weighted undirected graph. What edges of it are not a part of any minimum spanning tree (MST)? This problem only makes sense when several edges ha... |
I have recently become extremely interested in understanding and proving aspects of (functional) programming languages.
However as I dive deeper in, things like $\lambda$ calculus, category theory, and denotational semantics are a little difficult to grok without proper explanation.
I read SICP (quite an enlightening b... |
I can understand that they are not closed under concatenation because without non determinism, PDA cannot decide whether to loop in the first PDA or jump to the next one.
But can someone prove this with an example. Also prove that the resulting language cannot be accepted by DPDA
|
Below is the general code for DFS with logic for marking back edges and tree edges. My doubt is that back edges from a vertex go back and point to an ancestor and those which point to the parent are not back edges (lets assume undirected graph). In an undirected graph we have an edge back and forth between 2 vertices $... |
For which values $A,B$ is the problem $\mathsf{gap\mathord-VC}\mathord-[A,B]$ NP-hard? VC is the vertex cover problem. I am given three options: $B=\frac{3}{4},A=\frac{1}{2}$ or $B=\frac{3}{4},A=\frac{1}{4}$ or none.
I would to review what I think that I need to do, I'm not sure that the way I think of it is correct. ... |
Facts: n points in the plane, each has one of k colors, all k colors are represented.
Problem: You wish to select k points, one of each color, such that the perimeter of the convex hull is as small as possible.
Greedy algorithm: For each point p, for each color c not equal to p, select the point of color c closest to p... |
I am a non-CS grad and my field of study is unrelated to CS. However, as part of a larger plan to become a computer scientist, I want to obtain a solid background in theoretical computer science and math as it relates to CS. I did a plenty of research and selected the following best/really good books on the topic of CS... |
The following is an excerpt from CLRS:
The definition of $\Theta (g(n))$ requires that every member $f(n) \in \Theta(g(n))$ be asymptotically nonnegative, that is, that $f(n)$ be nonnegative whenever n is sufficiently large. (An asymptotically positive function is one that is positive for all sufficiently large $n$). ... |
I have been attempting to get my mind around the Kuhn-Munkres/Hungarian Algorithm. I have been using the following statement of the algorithm which I found here.
Based on my readings on the algorithm, my understanding is that the improvement of the feasible vertex labeling in step 2. is supposed to be such that $G_l \... |
I'm familiar with the classical convex hull calculation algorithms. The lower bound for computing the CH of a set of points $P$ is $n\log(n)$.
However, what if I'm given a sequence of points and told they form a CH? One check is to "walk the points" in order and check for "left turns" (CCW). However, this doesn't hand... |
I came across a couple of solutions to one of the problems that is in the CLRS textbook (pg. 637 23.2-5 edition 3). I am wondering if anyone can make a clarification as to the stated running time of the solution.
Q: Given that we know the edge weights on a graph are between $1$ and some constant $W$, how fast can we ... |
Given a path down a full binary tree to a node (for example, a sequence of $1$s and $0$s, $0$ representing "go left" and $1$ representing "go right"), how would one find the position of the node in the preorder traversal. In other words the $i$th node in the preorder traversal will end up with at this node.
Obviously s... |
Consider the argument made in this question based on the comparison sorting lower-bounds proof, which runs as follows.
First, the comparison sorting lower-bounds proof was recited:
For $n$ distinct numbers, there are $n!$ possible orderings.
There is only one correct sorted sequence of the $n$ numbers.
We are given t... |
Given $n \in \mathbb{N}$ pairwise distinct numbers. I want to do as few comparisons per number as possible - and every number should experience roughly the same amount of comparisons as another number - and find the greatest $k \leq n$ numbers, e.g. $k = \frac{n}{10}$. In order to minimise the number of comparisons per... |
Consider a directed graph $G$ on which one can dynamically add edges and make some specific queries.
Example: disjoint-set forest
Consider the following set of queries:
arrow(u, v)
equiv(u, v)
find(u)
the first one adds an arrow $u→v$ to the graph, the second one decides if $u↔^*v$, the last one finds a canonical repr... |
There is an at-times dizzying array of symbols used in math and CS papers. Yet many assume basic familiarity that seems rarely taught in one place. I am looking for a dictionary something like the following, especially from a CS perspective.
It would list all the basic mathematical symbols and give their meanings and... |
I'm trying to solve a graph problem ( it's not for homework, just to practise my skills ).
A dag $G(V,E)$ is given, where $V$ is the set of vertices and $E$ the edges. The graph is represented as an adjacency list, so $A_i$ is a set containing all the connections of $i$.
My task is to find which vertices are reachabl... |
When in a Parallel algorithm we say:
"This algorithm is done in $O(1)$ time using $O(n\log n)$ work, with $n$-exponential probability, or alternatively, in $O(\log n)$ time using $O(n)$ work, with $n$-exponential probability."
Then Can we Implement this algorithm for a Quad-Core Computer (and just 4 threads) with $n=... |
Show that for $l(n) = \log \log n$, it holds that $\text{DSPACE}(o(l)) = \text{DSPACE}(O(1))$.
It's well known fact in Space Complexity, but how to show it explicitly?
|
Possible Duplicate:
Every simple undirected graph with more than $(n-1)(n-2)/2$ edges is connected
At lesson my teacher said that a graph with $n$ vertices to be certainly connected should have
$ {\frac{n(n-1)}{2}+1 \space }$ edges showing that (the follow is taken from the web but says the same thing):
The non-con... |
In a 32-bit floating number with normalized mantissa and excess-64 exponent base 16, the number $16^{-65}$ denotes
Floating point overflow.
Negative floating point overflow.
All 0's in the exponent and mantissa fields.
The minimum representable positive number .
I think that minimum representable number should be $1 ... |
I got as far as
\begin{align}
w \vDash \neg (a U b) &\Leftrightarrow \neg (w \vDash a U b)
\Leftrightarrow \neg (\exists_{i\geq0} : w^i \vDash b \land \forall_{0\leq k < i} : w^k \vDash a) \\
&\Leftrightarrow \forall_{i\geq0} : \neg(w^i \vDash b) \lor \exists_{0\leq k < i} : \neg(w^k \vDash a)
\end{align}
but got s... |
I'm trying to decide which of the following statements are true:
$\mathsf{NSpace}(\log \log n) = \mathsf{coNSpace}(\log \log n )$
$\mathsf{NSpace}(\lg^2n) = \mathsf{coNSpace}(\lg^2n)$
$\mathsf{NSpace}(\sqrt n) = \mathsf{coNSpace}(\sqrt n)$
I thought immediately that (1) is correct since $\lg \lg n < \lg n$, and since... |
Suppose through $\ell_1$ minimization I obtained two sparse probability distributions $P, Q$ which may contain many zero terms. Then I would like to compute the KL-Divergence of them $D(P || Q) = \sum_i {p_i\log(\frac{p_i}{q_i})}$. However, since the probability distribution is sparse, it might occur that $p_i \not= 0... |
A question about the clique problem (specifically k-clique). Is there any algorithm that takes advantage of the properties of connected graphs to find cliques of a given size k, if such cliques exist?
|
Suppose we have a list of unbounded integers, written in binary, and we want to write a (formal) proof that the list is sorted in ascending order.
Such a proof might look (informally) like: "2 < 3, and 3 < 5, and ... and 71 < 79, so the list is sorted."
It would seem such a proof must have length $\Omega(n)$ where $n$ ... |
Given a deterministic Turing machine with an input tape and a work tape. The work tape is restricted to $\log_2 n+100$ cells ($n$ represents the input length) and its tape alphabet is of size $2006$. Moreover, the Turing machine has $27$ states.
I wonder how come the running time of such machine is $O(n^{1+\log_2 2006... |
I'm trying to find a polynomial time algorithm for finding the minimum vertex cover for a graph. I've written the algorithm below; I know this problem is $\mathsf{NP}$-hard, which means there are probably some graphs for which this algorithm will not work.
I need some help in finding the flaw in this algorithm and also... |
Let $M_U$ be an universal Turing machine which fulfills the following condition:
If $M$ running $x$ takes $f(x)$ space, then $M_U$ running on $\langle \langle M\rangle,x\rangle$ takes $(f(|x|))^3+2\cdot|x|+|\langle M\rangle|$ space.
Why can we conclude from the above that ${\sf Space}(n^2) \neq {\sf Space}(n^7)$?
|
I am solving one of the past exams and I am not certain with my solution to one of the exercises. The exercise is asking to give intuitive meaning to modal $\mu$-calculus formula:
$$ \phi = \mu Z. \langle - \rangle tt \wedge [-a]Z $$
According to an article Modal logics and mu-calculi: an introduction by Bradfield and ... |
Problem: Given an array of $n$ integers, $A[1 \dots n]$, such that any integer occurs at most 2 times in the array, we have to find the number of unique increasing subsequences of length 3 (duplicate subsequences must be counted only once). In other words, we have to count the number of unique integers $A[i], A[j], A[k... |
I am seeking for some popular science videos on computer algorithms for my last lecture delivered in this term. The topic of the videos includes but are limited to algorithm design, algorithm analysis, computational complexity, the application of algorithms, the history of algorithms (even computer science), the story ... |
I find this,
but I can't complete it, is there any other solution for it?
|
Given an undirected weighted graph $G$ with two edges of minimum weight and all other edges are distinct. Does G have a unique minimum spanning tree?
I know the proof for if all edge weights are distinct (it does give a unique MST) and I am thinking that if two edges of minimum weight are in $G$ then I should be able t... |
Let $A$ and $B$ be two deterministic finite automata. How do we prove that $L_E = \{ \langle A, B \rangle : L(A) = L(B) \}$ is neither regular nor context-free?
Intuitively, I feel that $L_E$ should not be context-free because we must try each string $\in \Sigma^*$ (where $\Sigma$ is the alphabet) and check if the stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.