instruction stringlengths 35 29.1k |
|---|
Say, $L \subseteq \{0\}^*$. Then how can we prove that $L^*$ is regular?
If $L$ is regular, then of course $L^*$ is also regular. If $L$ is finite, then it is regular and again $L^*$ is regular.
Also I have noticed that, for $L = \{0^p \mid p \text{ is a prime}\}$, $L$ is not regular, $L \subseteq \{0\}^*$ and $L^*$ is... |
Given the reduction $3\mathsf{SAT}\leq_p \mathsf{IndSet}$ as follows:
How can I argue that it's in polynomial time? I understand how the reduction works, but even though it appears rather trivial, I can't explain why it's efficient.
To place $\mathsf{IndSet}$ in $\mathsf{NP}$-Hard, we will show $3\mathsf{SAT}\leq_p \... |
Let Undir-Reachability be the following problem:
given an undirected graph G and two specified vertices s and t in G, is there a path from s to t in G?
I need to prove that the 2-Colourability is in L, by knowing that Undir-Reachability belongs to the complexity class L.
I don't know how to start.
|
I need to prove that the following problem $0$-$1$ $\mathsf{ Ineq}$ is $\mathsf{NL}$-complete.
Given a finite set of variables $V$, a finite set of inequalities of the form $x \le y$ (where $x, y \in V$) and a finite set of equalities of the form $x=a$ (where $x \in V$ and $a \in \{0,1\}$), is there an assignment of va... |
I'm not really sure the how you would go about proving this language isn't regular with the pumping lemma:
$L= \{0^m 1^n | 2n \leq m \leq 3n, m,n \geq 0 \}$
Does this indicate that $S = 2$, so we start by by using a string $\geq 2$?
|
I am building a system and I have a couple of architectures in mind. I want to have an idea of which architecture is likely to be most performant (quickest).
I can make different decisions like
1) Do everything in one thread
2) Separate this part into one thread, that part into another thread since it can run in paral... |
How do we find all equivalence classes of $\mathsf{R_L}$ for a language?
Say I'm trying to look for all equivalent classes for the regular language $\mathsf{L}$ is $011(0+1)^*011$.
Here's an example they give us in the book
http://books.google.com/books?id=VEHYzv0GHt8C&pg=PA73&lpg=PA73&dq=ding+du+example+2.51&source=b... |
Let $T$ be a Turing machine whose accepted language is $L(T)$. Let $X$ be another language. How do you approach a proof like $L(T)\subseteq X?$
|
We only consider the reverse Polish notation as an arithmetic expression.
Formally, RNP is a sequence consisted of numbers and arithmetic operators: $+,-,*,/$, and its syntax is:
$$\newcommand\RNF{\mathrm{RNF}}\newcommand\num{\mathrm{number}}\newcommand\op{\mathrm{operator}}\RNF=\num\,\big\vert\,\RNF,\RNF,\op$$
and its... |
I have this confusion related to the time complexity of FFT. I was reading this book related to Design and Analysis of Algorithms and I came across FFT.
It says that lets say I have a polynomial of degree n-1. I want to evaluate the polynomial at $2n^{th}$ roots of unity. For that I can use divide and conquer rule
I wi... |
I previously asked a question about persistent data structures here. After that I came across an article that introduced persistent data structures. I have got a question on the following figure from the same article, where it describes how to implement a persistent linked list:
The author says:
Inserting a new item... |
CPU caches are used by exploiting temporal and spatial locality. My question is who is responsible for managing these caches? Is this Operating system that identifies a particular access pattern and then manages (i.e store the data in) cache, using low level OS function calls?
|
What data structure should I store my graph in to get the best performance from the Dijkstra algorithm?
Object-pointer? Adjacency list? Something else?
I want the lowest O(). Any other tips are appreciated too!
|
According to this page, Dijkstra's algorithm is just BFS with a priority queue. Is it really that simple? I think not.
|
According to the Wikipedia page, search is "not an operation" on binary heaps (see complexity box at top-right).
Why not? Binary heaps may not be sorted, but they are ordered, and a full graph traversal can find any object in $O(n)$ time, no?
Is the page wrong or am I?
|
I have some confusion related to a divide and conquer problem. Here is the problem
You’re consulting for a small computation-intensive investment company, and they have the following type of problem that they want to solve over and over. A typical instance of the problem is the following. They’re doing a simulation in... |
The time complexity of merge (union) operation is said to be $O(\lg (n_1 + n_2))$, where $n_1$ and $n_2$ are the numbers of elements in the merged heaps, respectively. I do not understand this - the algorithm has to go through all the elements of both rightmost paths of the original heaps - lengths of these paths are b... |
I have a quick question on the bubble sort algorithm. Why does it perform $\Theta(n^2)$ comparisons on an $n$ element list?
I looked at the Wikipedia page and it does not seem to tell me. I know that because of its magnitude it takes a lot of work with large numbers.
|
Assuming I have shown part of the knowledge base in the clausal format:
[1] p1(banana).
[2] not p1(X) or p2(Y).
[3] p1(X) or not p3(F).
... and more rules.
Most of the books, would do something like this:
[1,2] {X=banana} p2(Y).
and more steps.
First question: is it equally correct to do something like follows:
[2,3... |
For an academic question, I plan to design a medical diagnosis system. Given a description of symptoms, produce a list of probable diseases (with closeness matching). I'm having some trouble finding papers for getting started. Which algorithms and data structure should I consider?
|
I'm doing an exercise in my book, the question is to find a string of minimum length in $\{a, b\}^*$ not in the language corresponding to the given regular expression.
a. $b^*(ab)^*a^*$
My answer: $aab$
b. $(a^* + b^*)(a^* + b^*)(a^* + b^*)$
My answer: $abab$
c. $a^*(baa^*)^*b^*$
My answer: $bba$
d. $b^*(a + ba)^*b^*$
... |
How to find a local minimum of a complete binary tree?
Consider an $n$-node complete binary tree $T$, where $n = 2^d − 1$ for some $d$. Each node $v \in V(T)$ is labeled with a real number $x_v$. You may assume that the real numbers labeling the nodes are all distinct. A node $v \in V(T)$ is a local minimum if the l... |
Is the grammar
$\qquad S \to 1A0A \mid 0A \mid \varepsilon$
a right-linear grammar? $A$ is a nonterminal here, $0$ and $1$ are terminals.
I know $0A$ is right-linear but what about $1A0A$?
Trying to construct a right-linear grammar for language $10(0+1)^*10$.
|
I'm doing an exercise from my book that says:
Let $r$ and $s$ be arbitrary regular expressions over the alphabet $\Sigma$. Find a simpler equivalent regular expression:
a. $r(r^*r + r^*) + r^*$
b. $(r + \Lambda)^*$
c. $(r + s)^*rs(r + s)^* + s^*r^*$
The book doesn't cover how to simplify regular expressions, so I sea... |
Are there languages generated by linear grammer which aren't regular?
|
I'm working on some exercises regarding graph theory and complexity.
Now I'm asked to give an algorithm that computes a transposed graph of $G$, $G^T$ given the adjacency matrix of $G$. So basically I just have to give an algorithm to transpose an $N \times N$ matrix.
My first thought was to loop through all rows and c... |
To say simply, can PSPACE problems be written as $\Pi_1$ formula? Or how can these problems be written in terms of (first-order) arithmetic hierarchy?
edit:also currently, by what arithmetic hierarchy formula can P=PSPACE be written?
and what would be the consequence of being able to write P=PSPACE as $\Pi_1$ formula?
|
Is there a general method to solve the recurrence of the form:
$T(n) = T(n-n^c) + T(n^c) + f(n)$
for $c < 1$, or more generally
$T(n) = T(n-g(n)) + T(r(n)) + f(n)$
where $g(n),r(n)$ are some sub-linear functions of $n$.
Update: I have gone through the links the provided below and also sifted through all the recurrence ... |
I am facing a problem with processing some frontal facial images.
I need to adjust the centers of the eyes (irises) to be at certain specific pixels in the image. In other words, i need to transform the image until the centers of the eyes are at specific pixels.
Can anyone help me with this problem, an algorithm, techn... |
Sometimes it's easy to identify the time complexity of an algorithm my examining it carefully. Algorithms with two nested loops of $N$ are obviously $N^2$. Algorithms that explore all the possible combinations of $N$ groups of two values are obviously $2^N$.
However I don't know how to "spot" an algorithm with $\Theta(... |
I currently have a system that has {f(a) = b, f(f(x)) = x} (part of an exam question - look at page 5 - exercise 1).
To start off with proving non-confluency, I am thinking along these lines:
f(f(x)) and f(a) can be unified by using {a -> f(x)}.
Then we can rewrite:
f(f(x)) = x [eq.1]
f(f(x)) = b ... |
Max-2-SAT is defined as follows. We are given a 2-CNF formula and a
bound k, and asked to find an assignment to the variables that
satisfies at least k of the clauses.
I can understand the trick used to prove 2-SAT is in P. You use get a contradiction by using unit propagation. But, I was wondering why does MAX 2... |
I apologies if my title is vague, I'm trying to apply CTL/LTL model-checking on some system written in java, however, I still don't understand how to reach a result using either of the approaches mentioned. Do I model my LTS/write specification and use a tool like SPIN to validate that or? I'm mainly looking for a poin... |
Background:
In this question we care only about worst-case running-time.
Array and (doubly) linked lists can be used to keep a list of items and implement the vector abstract data type. Consider the following three operations:
$Location(i)$: returns a pointer to the $i$th item in the list of items in the array.
$Inser... |
An unhappy number is a number that is not happy, i.e., a number $n$ such that iterating this sum-of-squared-digits map starting with n never reaches the number 1.
For example, $23\rightarrow 2^2+3^2 = 13 \rightarrow 1^2 + 3^2 = 1$, so $23$ is a happy number. But, number $2$ is not and you can verify it.
The problem... |
I'm looking for some algorithms that detect statistical anomaly in time series.
For example, Google Trend automatically detects peaks of a specific search query in time, and associates those peaks with most popular news stories at that time.
See this for example: http://www.google.com/trends/explore#q=titan
I'm lookin... |
I was going through construction proofs for closure of regular languages under union, star and concatenation operation in the book: "Introduction to Theory of Computation" by Michael Sipser.
I have doubts regarding how he wrote the transition function.
When $Q \in F_1$ and $a=\epsilon$ he wrote $\delta_1(q,a) \cup \{... |
What is Harrison hashing and what are its applications in web searching?
Can some one give me some relevant information?
Update:
I found it here , and is a part of M.Tech syllabus of a friend of mine. I need to explain him this concept and then see how it can be applied in web applications.
Many thanks for spendin... |
I've recently came across a paper describing the parsing technique
mentioned in the title. Unfortunately, the terminology used in said paper
is somewhat beyond my comprehension, so I've been attempting to grasp the
construction algorithm more intuitively. I believe I succeeded (this
presentation was the source of the a... |
Turing machines and unrestricted grammars are two different formalisms that define the RE languages. Some RE languages are decidable, but not all are.
We can define the decidable languages with Turing machines by saying that a language is decidable iff there is a TM for the language that halts and accepts all strings ... |
Let $S$ be a finite set of integers (this set contains about 200000 elements). Let $T \subset S$ be a particular subset of $S$ called target. $S$ keeps growing. So does $T$. Each new element of $S$ might or might not be in $T$.
No (known, or practical) algorithm can determine if an element $s \in S$ is in the target se... |
I think understand how deforestation consumes and produces a list at the same time (from a fold and an unfold function -- see this good answer on CodeReview here), but when I compared that with the wikipedia entry on the technique it talked about 'removing trees' from a program.
I understand how a program can be parse... |
I am trying to understand the proof here of why the state space in 15 puzzle is divided into two separate parts, but the explanation is complicated for me.
Could someone please explain it in simpler terms? I have been struggling with this for days :(
|
From my recitation class -
Can you please explain
why does operator $"+"$ signature is $ int \rightarrow (int \rightarrow int)$ ?
How does this graph is build ?
And what is mean $t=u \rightarrow s$ ?
Thanks in advance .
|
Could anyone explain to me the differences & similarities between machine learning and system identifications? Are these just two names of the same thing? In this page, they say:
Machine learning and system identification communities are faced with similar problems where one needs to construct a model from limited or... |
In a recitation video for MIT OCW 6.006 at 43:30,
Given an $m \times n$ matrix $A$ with $m$ columns and $n$ rows, the 2-D peak finding algorithm, where a peak is any value greater than or equal to it's adjacent neighbors, was described as:
Note: If there is confusion in describing columns via $n$, I apologize, but this... |
From my recitation class, I have the following exercise:
$\mathrm{EXP} = 0 \mid 1 \mid b \mathrm{EXP} \mid \mathrm{EXP} a \mid \mathrm{EXP} m \mathrm{EXP}$
The above grammar is ambiguous.
Make an unambiguous grammar which produce same language as the above.
In the new grammar, $a$ has priority over $b$ and $b$ has pri... |
Let $L_{1}$ and $L_{2}$ be 2 languages over the same alphabet $\Sigma$.
$$A(L_1,L_2)=\{x\in \Sigma^*|\exists y,z\in L_2\text{ such that } yxz\in L_1\}$$
Assume that $L_{1}$ is regular and $L_{2}$ is context-free. The language $A(L_{1},L_{2})$:
is always a regular language
is always not a regular language
can sometim... |
When we talk about operators in descriptive complexity, are they something like this: for example, if transitive closure operator $TR$ is available, we can use variable $y$ that we define as $TR(x)$ where $x$ is input? or is it something else?
Also, when we say $FO(t(n))$, what does quantifier block being iterated $t(... |
Suppose I have a admissible and consistent heuristic.
Is it true, that when I expand a node, I have guaranteed that the path I found to this node is optimal?
Look at this pseudocode from wikipedia:
function A*(start,goal)
closedset := the empty set // The set of nodes already evaluated.
openset := {start} // Th... |
I've taken an introductory database course where like many good database courses, they taught relational algebra, including $\theta$-joins. However, I've recently read E. F. Codd's 1970 paper, A Relational Model of Data for Large Shared Databanks, and the concept of $\theta$-joins is nowhere to be found. He does use th... |
By "number of gates", I am wondering whether these gates include AND/OR gates that can receive several inputs or they just include AND/OR gates that receive two inputs.
|
Definition
A family of circuits $(C_{1}, C_{2}, \ldots)$ is uniform if some log
space transducer $T$ outputs $\langle C_{n}\rangle$ where $T$'s input is $1^{n}$. (from http://en.wikipedia.org/wiki/Boolean_circuit#Uniform_Boolean_Circuits)
Can anyone exlain this? I know what boolean circuits are, so only explanati... |
From http://rjlipton.wordpress.com/2009/05/27/arithmetic-hierarchy-and-pnp/,
Define, $M_{[x,c]}$ as the deterministic Turing machine that operates
as follows on an input $y$. The machine treats $x$ as a deterministic
program, and simulates $x$ on input $y$. At the same time the machine
runs a counter that stops ... |
I am reading chapter 32 - String Matching from the book "Introduction to Algorithms" 3rd edition Cormen et al. The Rabin-Karp Algorithm is not clear to me despite heaving read it several times. Specifically, when the authors start proposing about some modulo operations for solving some problem, I am unable to follow. T... |
I asked a similar question here on Rabin Karp algorithm. My present question is, how do we find the best $q$ (i.e modulus)? What is the criterion? We need to choose a $q$ which will be quick to calculate and also must result in lesser number of spurious hits, right?
Wow do we ensure these things?
|
I have a deterministic finite automaton which behaves mostly like a Turing machine, with following difference (relevant to this question):
The tape is initially finite.
The automaton can insert and delete cells from the tape.
Actions are associated with states rather than with transitions (this includes head shift and... |
I've been reading a bit about Hierarchical Temporal Memory and Memory Prediction. I found a great paper: How the brain might work: A hierarchical and temporal model for learning and recognition, Dileep George's dissertation for his PhD at Stanford.
I was searching google, to see if such a big network has been deployed... |
I am looking to generate a heat map from some data. I have a value and a location (longitude and latitude). I understand generating a colour from the value, however I'm not sure how I would go about generating the matrix to use for this.
I figure it's best to place the location points into buckets essentially (so that... |
I was looking at the question How to convert finite automata to regular expressions? to convert DFA to regex.
The question, I was trying to solve is:
I have got the following equations:
$Q_0=aQ_0 \cup bQ_1 \cup \epsilon$
$Q_1=aQ_1 \cup bQ_1 \cup \epsilon$
When solved, we will get $Q_0=a^*b(a \cup b)^* \cup\ \epsilon$
... |
Given an undirected tree (with no specific root), how to find the longest path, i.e. 2 vertices that are the farthest apart from each other? There are no lengths associated with the edges (each edge has length 1 by default).
Obviously one idea is to check the path lengths between all pairs of vertices (e.g. by doing a ... |
i have a problem regarding the following situation.
I have two arrays of numbers like this:
index/pos 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Array 1(i): 1 2 3 4 7 5 4 3 7 6 5 1 2 3 4 2
Array 2(j): 4 4 8 10 10 7 7 10 10 11 7 4 7 7 4
n... |
I encountered this problem involving manipulating a context-free language. Let $L$ be a context-free language. Define $L^{\#} = \{ x : x^i \in L$ for every $i=0,1,2,...\}$. Is $L^{\#}$ always context-free?
My guess is that it will preserve context-freeness. Can anyone provide an elementary proof of this?
|
Programmers do sometimes write a program that creates infinite loop if some particular input is passed into the program.
But Simply-typed lambda calculus has to stop - so the question is, can anyone show some "useful" program in Turing-complete language (e.g. untyped lambda calculus) that does not go into infinite loop... |
I have an $n$-dimensional grid space with two points on it defined by ordered pairs. I want to find the shortest path between the two points, but I can only increase one number in the ordered pair at a time. Is there an algorithm for this or at least one I can refer to?
|
In many discussions of binary heap, normally only decrease-key is listed as supported operation for a min-heap. For example, CLR chapter 6.1 and this wikipedia page. Why isn't increase key normally listed for min-heap? I imagine it is possible to do that in O(height) by iteratively swapping the increased element (x) wi... |
My question: do the non-regular languages have closure properties? For example, if the reverse of L is non-regular, then L is non-regular ? thank you :-)
|
I am writing a functional style interpreter for a non-functional programming language that supports both primitive and object values. Primitives are passed by value while objects are passed by reference. I understand how to deal with primitive values but cannot find any good resources on handling mutable object values.... |
I am reading William Stallings Computer Organization & Architecture to understand about control unit & micro-operations.
Stallings explain that interrupt cycle requires 3 time units to complete :
t1 : MBR <- (PC)
t2 : MAR <- Save_Address
PC <- Routine_Address
t3 : Memory <- (MBR)
t1 : Save the current PC value... |
Here's something from Slonneger's "Syntax and Semantics of Programming Languages":
A variable may occur both bound and free in the same lambda
expression: for example, in λx.yλy.yx the first occurrence of y is
free and the other two are bound.
I assume the free variable is the y right after the λx. and the bound ... |
I bought a great puzzle called Icosoku. Wikipedia describes it as: "The puzzle frame is a blue plastic icosahedron, and the pieces are 20 white equilateral-triangular snap-in tiles with black dots and 12 yellow pins for the corners. The pins are printed with the numbers from 1 to 12, and the triangular tiles have up to... |
Can anyone show how to express complexity class P using first-order logic with LFP? (descriptive complexity)
|
We know that $\text{3-SAT}$ problem is NP-complete, but I am not sure what is meant by size of input. Does this mean number of literals, or number of variables?
|
I am trying to solve a recurrence by using substitution method. The recurrence relation is:
$$T(n)=4T(n/2)+n^2$$
My guess is $T(n)$ is $\Theta(n\log n)$ (and I am sure about it because of master theorem), and to find an upper bound, I use induction. I tried to show that $T(n)\le cn^2\log n$ but that did not work, I got... |
Lets say I have a global dataset and I run queries over those data set.
For example my dataset would be
#id, #Name, #Employee, #Birthdate, #number_of_children
1, Nick, Nasa, 1982, 1
2, Jack, Exon, 1985, 5
3, Tom, ABCD, 1978, 0
And I can run queryies on those dataset.
sample queries would be
* #Query => #Result_ids
*... |
A SkipList provides the same $O(\log n)$ bounds for search as a balanced tree with the advantage that rebalancing isn't necessary. Since the SkipList is constructed using random coin flips, these bounds only hold as long as the structure of the SkipList is sufficiently "balanced". In particular, with probability $1/n^c... |
In a comment to Learning F#: What books using other programming languages can be translated to F# to learn functional concepts? Makarius stated:
Note that the "CPS" approach has done great harm to performance in
SML/NJ. Its physical evaluation model violates too many assumptions
that are built into the hardware. I... |
I know that master theorem is used for the recurrence relations of the form:
T(n) = aT(n/b) + f(n)
But in my question, i am supposed to solve the following recurrence relation by using master theorem:
T(n) = 2T(n/7) + 5T(n/8) + n
Can i take f(n)=n and since f(n)=Θ(nlogba), i say T(n) is O(nlogn)? But if i do this, i ne... |
Which of the following modes of data transfer is the fastest?
a. DMA
b. Interrupt-based
c. Polling
d. All are equally fast
I do not have the answer, so I cannot check, that's why I am posting here.
I think the answer is D. All are equally fast. In all data transfer cases the speed of data transfer is same, but in case... |
I'm studying for an entrance exam and I have sample questions. One of the questions is this
Prove that recurrence $T(n) = T(n/5) + T(4n/5)+n/2$
has a solution $T(n) = \omega(n \log n)$.
Solve by drawing the recursion tree.
This is what I drew on my paper:
root: n/2 => (4n/5)/2
=> (n/5)/2
right sub... |
How do we determine minimum $k$ such that $G$ is a strong $LL(k)$ Grammar
Like for grammar $G$ with the following rules
$S\rightarrow aAcaa \mid bAbcc,A\rightarrow a \mid ab \mid \epsilon$
|
Say I have a set of points on a 2d plane, how do I find the point(s) where the maximum euclidian distance to any of the points in the set is minimized?
|
This is a problem from the practice session of the Polish Collegiate Programming Contest 2012. Although I could find the solutions for the main contest, I can't seem to find the solution for this problem anywhere.
The problem is: Given a set of $N$ distinct positive integers not greater than $10^9$, find the size $m$ o... |
Given a set $S$ of $n$ elements, and a set $\mathcal{X}$ of $m$ subsets of $S$, decide if there exist $U,V \in \mathcal{X}$, s.t. $U \cup V = S$.
Brute force would take time $O(nm^2)$ but is there any way of solving this more efficiently?
|
Let $\operatorname{value}(x)$ be the result when the symbols of $x$ are multiplied from left to right according to
$\qquad \displaystyle\begin{array}{c|ccc}
\times & a & b & c \\
\hline
a & a & a & c \\
b & c & a & b \\
c & b & c & a
\end{array}$
Is $L=\{xy \mid |x|=|y| \land \operatorname{va... |
I have a undirected graph with no edge costs. A subset of the nodes are labeled $c_1, c_2, ..., c_k$ and one node is labeled $K$. I want to find the minimum cut of the graph with the extra condition that all nodes $c_i$ are in the same half of the cut and the node K is in the other cut.
My idea was to begin by doing a ... |
If $L$ is a binary language (that is, $L \subseteq \Sigma = \{0,1\}^∗$) and $\overline{L}$ is the complement of $L$:
How can I show that if $L \in \mathsf P$, then $\overline{L} \in \mathsf P$ as well?
|
I asked a question on Rabin-Karp Searching algorithm here, which I am reading from the book "Introduction to Algorithms" 3rd edition Cormen et al..
After reading few para of the section on Rabin-Karp, I got some more confusions:
In the third paragraph the authors say that the if we could find p (decimal value of patte... |
I need to disprove that a PARITY gate can be simulated using a single MAJORITY gate, or even a THRESHOLD gate. How do I go about doing this? Some ideas as to how to go about contradiction or otherwise would be helpful.
One possible argument would be monotonicity of MAJORITY and THRESHOLD while PARITY is non-monotone (P... |
Given a tree $T = (V , F)$, find an algorithm which finds $u \in V$, so in the graph $T = (V \setminus \{u\} , F)$ the size of each connected component is $\lceil |V| / 2 \rceil$ at most. What is the complexity?
Can I please have a hint?
|
Lets say I have a global dataset and I run queries over those data set.
For example my dataset would be
#id, #Name, #Employee, #Birthdate, #number_of_children
1, Nick, Nasa, 1982, 1
2, Jack, Exon, 1985, 5
3, Tom, ABCD, 1978, 0
And I can run queryies on those dataset.
sample queries would be
* #Query => #Result_ids
*... |
If $L$ is a binary language ($\Sigma = (0, 1)^*$) and $\overline{L}$ is the complement of $L$, the set of binary strings not in $L$.
How can I show that, if $L$ is in the complexity class $P$, then so is $\overline{L}$?
|
For an open-addressing hash table, what is the average time complexity to find an item with a given key:
if the hash table uses linear probing for collision resolution?
if the hash table uses double probing for collision resolution?
From my understanding my answer to the first question would be $O(n)$
but I'm not sur... |
I'm trying to solve this problem.
Problem: Given $n$ positive integers, your task is to select a maximum number of integers so that there are no two numbers $a, b$ in which $a$ is divisible by $b$.
I have to find the Maximum independent set and the size of this set. The size can be found by König's theorem. But h... |
I need a hint for writing a context-free grammar for the language $L=\{1^k0^{2k}:k\in \mathbb N\}$. I'm starting to doubt that it can be done for general $k$.
|
I am reading through PCA and it says that the maximum variance principal component has most of the information. Can we apply that to any data set? If a data set has n attributes and most of the attributes show high variance then can we infer that the dataset has captured lot of useful information?
I am trying to under... |
I am looking for practical applications of Finite State Machines like DFA, NFA, Moore, Mealy machines...
It would be helpful if someone point to examples from Linux Kernel. I know that DFA is used in string matching like KMP algorithm.
What is the significance of NFA, Moore and Mealy machines?
|
I don't understand why $n \log \log n $ is not $\Theta (n)$.
Suppose we give $n$ a value of $10,000$. Then $n \log \log n$ is $6020.6$. So isn't $n \log \log n$ upper- and lower-bounded by $n$, as $n \log \log n \geq Cn$?
|
What I only got currently from PCP theorem is that it needs at most $O(\log n)$ randomness and $O(1)$ query of proof to approximate. So how does this result relate to the fact that solution to NP problems are hard to approximate?
|
What is meant by saying an algorithm runs in time $Poly(|S|,n,\frac{1}{\epsilon})$.
Can somebody explain with an example.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.