instruction stringlengths 35 29.1k |
|---|
I have googled endlessly, and I cannot find it. Can anyone point me to a reference that gives a way to calculate the number of parameters in an undirected Graphical Model?
Adapting from the similar formula for Bayes nets, this is my guess: if we have variables $1 \ldots k$ where variable $i$ has $d_i$ possible values, ... |
I got this question for homework:
Decide if this language is context free or not:
$\qquad \{x@1^m: x \in \left\{0,1\right\}^*, m \in \mathbb{N}, x_m = 1\}$.
Intuitively I think it's not context-free because a $PDA$ can't remember the places of all the $1$'s in $x$.
I tried using the pumping lemma but couldn't find th... |
Given a sorted array
1 2 3 4 5 6 7 8
and an operation that takes the N-th element out the array and puts it in front (or rotates the first N elements to the right by one), leaving the following for N = 3
4 1 2 3 5 6 7 8
I need to be able to figure out the state of the array, after performing an arbitrary number of th... |
Do you know any easy to implement algorithm for constructing a Voronoi diagram from a given set of points on a surface, using some different metric (taxicab, for instance)?
It can be some modification of Fortune's algorithm.
|
I have two langages $ A, B \in \mathrm{coRE}$. How can I prove that $ A \triangle B= ( A - B) \cup (B - A)$ is also in $\mathrm{coRE}\,$?
|
Alan Kay stated in one of his talks that there was a paper in 1968 that listen at least 3000 programming languages that were known in the year 1968.
What would be an unsientific but "educated guess" on the number of programming languages that existed up till now?
(I.e., this number would assume that if a programming la... |
If P = NP, why does P = NP also then equal NP-Complete?
I.e. Why would it then be the case that P = NP = NP-Complete?
Assuming P != NP , there were problems in NP not in NP - Complete. When P = NP, all NP problems are actually now P.
Shouldn't there still be P = NP problems not in NP - Complete?
|
I have been at this for hours. The question is:
Prove that the language $A = \{0^kx \mid k > 0, x \in \{0,1\}^*, \text{ and } \#(0,x) \geq k\}$ is regular,
where $\#(n, x)$ denotes the number of $n$ in string $x$.
So far, I have used the pumping lemma to determine that the opposite is not regular, i.e. that if $\#(0,... |
I am studying the basics of Computation Theory and I came up with an example I can't understand.
Let's have a language $L = \{\langle M\rangle \mid L(M) = \Sigma^{\ast} \}$, so $L$ contains codes of all Turing machines which generate all the words from $\Sigma^{\ast}$. It's been said that we can reduce $H$ (the halting... |
Currently, I'm trying to understand the definition and notion of MaxSNP and MaxSNP-hardness. I see that several combinatorical problems such as Max-3SAT are in MaxSNP since one can easily express them as first order predicates quantified over the set of all structures.
The question is: Is the definition of MaxSNP appli... |
Given a polynomial $a(x)$ of degree at most $242$ over $\mathbb{Z}_{487}$, I'd like to choose distinct values $x_0, x_1, . . . , x_{242} ∈ \mathbb{Z}_{487}$, such that I'll be able to calculate $a(x_j )$ for all $j = 0, . . . , 242$ by calculating three polynomials $a
_0 (x), a_1(x), a_2(x)$ of degree at most $80$ for ... |
I encountered this problem.
Let $A$ , $B$ , $C$ be disjoint sets $(A\cap B = B\cap C = A\cap C = \emptyset)$. The $f_1, f_2$ and $f_3$ are partially computable functions that are defined as follow:
$$
f_1(x) =
\begin{cases}
1 & x \in A\cup B \\
2 & x \in C \\
\uparrow & \text{otherwise.}
\end{cases}
$$
$$
f_2(x) =
... |
Let's say we have a Turing machine which head can only write 1 or blank to the tape (although it can read all symbols from any input alphabet correctly). Can we operate with it on any input?
My approach was that we can rewrite our input tape with unary coding and symbol-codings separated with blanks. If we had, for exa... |
Say I have a set of 3-CNF clauses
$$\mathcal{S} = \{ x_1 \vee x_2 \vee \bar{x_3}, ~~x_4 \vee x_5 \vee x_6\}$$
where $\bar{x}$ is the negation of $x$. Each variable range over $\mathbb{Z}^2$.
How many satisfying assginments are there for $S$? In general, how many satisfying assignments are there for $S$ is the size of $... |
In the Bellman–Ford algorithm, what is the practical meaning of
having a negative path between routers?
I have tried searching the net but didn't find any data
thanks
Eli
|
I found a statement (without explanation) that a language $A = 0^*$ is decidable. How is that possible? I mean, how would we build a Turing machine that would accept (or reject) a possibly infinite string of 0's? I also thought that maybe we could create an enumerator that would create all words from $0^*$ with increas... |
In operating systems, Is a transaction a process? Are they the same
concept?
Does a transaction have the same meaning in database management
systems, as in OS?
A database book says
A transaction is defined as any one execution of a user program in a DBMS and differs from an execution of a program outside the DBMS
... |
I hope this question isn't too 'soft' for here. It's been a while $\tiny{\text{an eternity for some people's standards}}$ since I've touched this stuff, and I had a convincing explanation to this question eight minutes ago but must have misplaced it, so please help me find it again:
Most classical sorting algorithms o... |
My professor gave us an old exam to look over for our final exam and I am having a hard time understanding the push down automata problem he gave. In the problem it says:
Let $\Sigma = \{0,1\}$ and $B$ is the collection of all strings that contain at least one $1$ in the second half. To state it more precisely: $B=\{u... |
My question in response to this answer: what would the finite automata look like for $L_1$ and $L_0$ in the answer?
I get how the languages are formed; however, since $M_L$ cannot remember how many times it has looped, how does $q$ branch off (if it does) into the two different DFAs for $L_0$ and $L_1$?
Definitions:
... |
The number of possible inversions in an array is bounded by $\binom{n}{2}$, i.e $\frac{n(n-1)}{2} \in O(n^2)$. How it is possible to calculate $O(n^2)$ results in $O(n\log n)$ time using something like modified merge sort? (sample algo : http://www.geeksforgeeks.org/counting-inversions/).
|
The algorithm (called as rmax(1,n)) finds the maximum of a list of numbers contained in an array S[1..n].
rmax(x, y)
// return maximum in S[x..y]
if y − x ≤ 1
then return maximum(S[x], S[y])
else max1 ← rmax(x, [x+y]/2)
max2 ← rmax([x+y]/2 + 1, y)
return maximum(max1, max2)
How would I go about arguing that ... |
I am trying to solve the following problem:
For each Turing machine $M_k$ and each string $x$ in $\{$0,1$\}$$^\ast$ let
$time_k(x)$ = $\{$the number of steps executed by $M_k(x)$ if $M_k(x)$$\downarrow$ (halts), and $\infty$ if $M_k(x)$$\uparrow$ (does not halt)$\}$
Prove that the function $T$: $\mathbb{N}$ $\rightarr... |
I am studying CLR Parser and have a query about Grammar. If a Grammar can't be parsed using CLR(1) Parser ( i.e LR(1)) parser is it necessarily ambiguous?
Is it possible that a grammar which is unambiguous can't be parsed using CLR Parser?
|
To prove that some decision problem $A$ is NP-complete, my understanding is that it suffices to show that the problem is in NP (i.e. that one can verify or reject all statements in polynomial time), and to demonstrate that some known NP-complete problem $B$ can be reduced to $A$ (such that we can write $B \leq_p A$), b... |
Define the language
$\qquad R = \{x \in \{0,1\}^\ast \mid C(x) \ge |x| \}$
where $C(x)$ is the Kolmorgorov Complexity of $x$ and $|x|$ denotes the length of $x$.
Prove that $R$ is co-recursively enumerable (co-r.e.).
So far, I have the following:
In order to prove the above, we need to show
$\qquad R^c$ = $\{x \in \... |
Suppose that we have a number $x \in \mathbb{Z}^+$.
I am seeking an algorithm to find three numbers $a, b, c \in \mathbb{Z}^+$ such that $a \times b \times c = x$ and $a + b + c$ is minimum.
Is this problem a variant of subset sum? Am I stuck with an exponential time algorithm?
Examples
$32 = 4 \times 4 \times 2$
$36 =... |
I'm using the Random Forest algorithm for classification. I have some variable to use as features in input, but I was wondering if I can use the output of the classification itself as input.
Suppose, for example, that I want to classify people in two categories : "criminal" or "honest". In order to do that, I have a ve... |
If I have a directed graph with $n$ weighted edges, is it possible to prove that Dijkstra's single-source shortest path algorithm takes $\Omega(n\log n)$ in the worst case?
I know heaps reduce Dijkstra's algorithm to $Ο(m \log n)$ and can be stored in an array.
Rooted, binary, as complete as possible tree with all node... |
To get a lower bound of nlogn I am taking the sorting algorithm, which is well known to have that, and transforming/adapting it to Dijkstra's single source shortest path problem.
I know you need to do create a graph based on the numeric values and that Dijkstra will traverse it in order, any help with the rest and how ... |
I am using a Finite Difference scheme to solve a simple PDE in conserved form:
$$\partial_t u = \partial_x (\partial_x u +au\partial_x u) = (1+a)\partial_x^2u +a(\partial_x u)^2 $$
$$\frac{u_n+1,j - u_n,j}{dt} = (1+a) \frac{u_n+1,j+1 - 2 u_n+1,j + u_n+1,j-1}{dx^2} + a \bigg(\frac{u_n,j+1-u_n,j-1}{2 dx}\bigg)^2$$
As you... |
Are there program systems that can discover the need of routines - and then design them, code them and use them as parts of the system?
Any group of humans trying to pursue an activity has to develop in a developed system, to solve their problems by formulating the issues, search for knowledge and methods, to be teste... |
If I'm correct, some boolean formulas in CNF require exponential size when being converted to an equivalent DNF version (and vice versa).
But what is an example of such a formula (and is there a general way to capture their structure - if the first question is too easy, and I'm just too stupid to see it)?
In this pos... |
I'm trying to find a family of hash functions mapping $\{1, 2, ..., 2^n\}$ to $\{0, 1\}$ that is 2-wise independent but not 3-wise independent. Any ideas on that?
I know two 2-wise independent families but I think they are 3-wise independent as well:
1) Let x be a vector in $\{0, 1\}^n$. The hash functions are $h_{a, b... |
With holiday season coming up I decided to make some cinnamon stars. That was fun (and the result tasty), but my inner nerd cringed when I put the first tray of stars in the box and they would not fit in one layer:
Almost! Is there a way they could have fit? How well can we tile stars, anyway? Given that these are reg... |
What is the price paid for the vast virtual address space provided to
programmers for their applications? Or in other words, what is the overhead due to virtual memory?
Is there any other overhead from implementing virtual memory, beyond memory consumed by the kernel?
|
When I looked on wikipedia, all the sorting algorithms listed have worst case $O(n^2)$.
My question is suppose we are given a list of integers, each of which is in some fixed, finite set (i.e. $\{-1, 0, 1\}$). Does there exist a sorting algorithm that sorts this list in $O(n)$ time?
|
I'm looking at a problem in the book Introduction to Algorithms by Cormen et al. It says that if we are given a random number generator rand() which satisfies the distribution:
$P(X = 0) = p,\;\;P(X=1)=1-p,\;\;0<p<1$,
then we can use rand() as a subroutine to create a unbiased sampler from the set {0,1}. My idea for th... |
How can I construct a Turing Machine that accepts the language
L = <'M'> which is an encoding of a Turing Machine M?
|
This is a question on a practice final.
Problem A is polynomially reducible to problem B. Which of the following
statements is correct?
I. If problem A is solvable in a polynomial time then problem B is solvable in polynomial time.
II. If problem A is NP-complete then problem B is NP-complete.
III. If problem A is ... |
I have a list of length N, and I have M workers. I want each of my workers to independently select a contiguous section of the list, with the property that every element of my list is selected by exactly one worker.
Using the SQL notion of offset and limit, I have an approximation:
offset = (worker_number / total_work... |
I have the following problem for homework:
Given an array of the form $[m+1, m+2,..., n, 1, 2,..., m]$ as an input,
analyze quicksort's run time complexity.
TIP: check for $m > \frac{n}{2}$ and $m \le \frac{n}{2}$
The quicksort algorithm is the deterministic version from CLRS.
I have a sense of what's going on but ... |
Are there any standard Prolog knowledge bases available anywhere that have the same purpose as Cyc, namely to encode generally accepted common sense and human knowledge?
Typically containing generally accepted facts such as the ones given at
http://www.cs.utsa.edu/~wagner/CS1023/readings/prolog.html
|
I am having a hard time understanding the numbers of probing which might occur due to using different collision prevention method such as separate chaining, Linear Probing, double probing, which is given here.
Let $\alpha = N/M$ (the load factor: average number of keys per array index). Analysis is probabilistic, rath... |
I know that I can build a non-deterministic algorithm with a CHOICE function that verifies if a value x is in an array in O(1) time complexity.
The usual algorithm to do that is
find (A, x)
j = CHOICE(1, .. , A.length)
if A[j] == x
return VALID
return FAIL
But, it works because we are able to acces... |
what is the general name of a problems where learning agent observe new data as a learning goes on. For example when playing platformer games one must incrementally learn new level areas and states while remembering all previous states so as to successfully proceed through the level.
|
As the title states, why are long block lengths commonly assumed or used in channel coding proofs?
|
Is Morse code without spaces uniquely decipherable?
Discusses how Morse code isn't very clear without the third (usually)
unseen element, the space.
Is there a (historical?) human-optimised (vs. say, ascii or something)
binary (on vs. off) code for transmitting information?
After sleeping on it, I recall one code used... |
Wikipedia's graph isomorphism problem page would seem to indicate that, no, it has not been solved. However, a friend of mine pointed out A Polynomial Time Algorithm for Graph Isomorphism . I am not sophisticated enough to follow the reasoning in the paper.
I do have my own very rough attempt at a polynomial time algor... |
So I'm reviewing my Computability notes for my final, and I understand how reduction arguments work, but I'm having trouble framing one for the following Turing machine: Undecidable TM = { ⟨M⟩ | L(M) is undecidable }. (in words, a Turing machine that accepts encodings of machines that accept undecidable languages.)
I'm... |
Can I utilize the backpropagation algorithm in a layered, feed-forward ANN in instances where there are multiple output neurons? If so, how? Links to (somewhat) comprehensible resources would be greatly appreciated, if nothing else.
The background is that I'm working on a simple C program that can create, propagate, an... |
Is it possible to show particular classes of techniques (for instance dynamic programming) cannot produce polynomial time algorithms to any NP-complete problem?
|
Let $L_4$ $\subseteq$ {0,1}$^*$ be the set of all palindromes whose first character is 1. Give a context-free grammar for $L_4$.
I just wanted to check if my grammar is correct or not.
$$A \rightarrow 1B1$$
$$B \rightarrow 0B0\;|\;1B\;|\;0B\;|\;A\;|\;\epsilon$$
|
I am a computer engineering student and trying to get the idea behind all these Artificial Intelligence Concepts and applications. I know little theoretically about machine learning and some high level brief introduction of artificial intelligence as a whole and neural network. What i am interested in is knowing the si... |
I am having some difficulties splaying the element 4 to the root.
Considering the following splay tree.
0
\
1
\
2
\
3
\
4
Could anyone show me the steps how to get the 4 to the root?
|
I was just curious as to if there are (or could by) any hash values that are impossible to compute due to the implementation of the algorithm. For example, SHA-256 produces a value that is 256-bits long. Technically, there are $2^{256}$ possible hash values that can be computed. Is it possible that a specific sequence ... |
I've been having trouble understanding a unification algorithm for first order logic, as I don't know what a compound expression is. I googled it, but found nothing relevant. I also don't know what a list means in this context. A list of what?
Edit: I think I've cleared up with compound expressions are and what lists ... |
I got some problems with building a set, which should looks like this: $S = A\times B \subset N \times N $, where $S$ is decidable but $A$ is undecidable.
Could somebody give me a clue how to actually do this?
|
I've got the following problem:
Tommy has a toy consisting of wooden posts and in each move he can either hit one post (which decreases its height by 1) or pull out a post (which increases its height by one). Tommy wants to set all poles to the same height but he must do that using minimal ammount of moves. How many mo... |
Is the following a valid $LL(1)$ grammar:
$ \begin{align} S &\rightarrow L \$ \\ L &\rightarrow M L_2 \\ L_2
&\rightarrow \underline{::} L \\ L_2 &\rightarrow \epsilon \\ M
&\rightarrow \underline{id} R \\ R &\rightarrow \underline{(} R_2 \\
R_2 &\rightarrow M \underline{)} \\ R_2 &\rightarrow \underline{)}
\end{a... |
In B. Pierce's book "Types and Programming Languages", he talks about the size of types (see pictures below).
I searched the book for a definition but could not find one. I only found a definition for the size of terms, but not for the size of types.
Could someone please explain what Pierce means by the expression "$si... |
This question came up in my operating systems class in a section about file system cache and RAID.
I'm speculating that the answer is that writes are seen more at the physical disk level because an efficient cache reduces the need to read from the disk.
Can someone confirm or correct this?
|
Every single NFA has an equivalent DFA representation so that every language recognized by NFA is recognized by the DFA, but is it also true that the language recognized by NFA is recognized by a push down automata and a Turing machine?
|
I don't understand what it means for A to be polynomial time reducible to B. I'm guessing is that we can revised the algorithm some how such that it becomes B, where B is a polynomial time algorithm.
Can someone point out if I have this completely wrong?
|
I'm studying discrete math for tomorrow's exam and got stuck in the below question. I tried to google it and couldn't find anything useful.
Prove the following sum is $\Theta (n^2)$ (we have to find $O(n^2)$ and $\Omega (n^2)$)
$P(n)= 1+2+3+4\cdots + n$
$P(n) = n+(n+1)+(n+2)+\cdots +2n$
Note you cannot use any formul... |
I thought about this question while looking at a textbook where it wanted me to compare the time complexity of $\lg^*(n)$ and $\lg^*(\lg(n))$
Now it is well known that $\lg^*$ is a tremendously slow growing function, so what is inside of $\lg^*$ shouldn't contribute to its complexity.
But is it true in general that any... |
I'm still in the process of grokking computational complexity.
However, I came across a statement like the above in an old midterm paper I'm reviewing, and I'm not sure I completely follow its logic.
$NP$ is the class of solveable decision problems that can be verified in polynomial time.
So when we say that $A$ is ... |
I cannot comprehend how you can prove hardness between two NP complete problems.
For example, let X be a NP hard problem, I want to prove Y is also NP hard.
I can do this by reducing X to Y, if Y is as difficult as X then it is NP hard, otherwise it is not.
But how is this done exactly? Do we restate the problem?
When ... |
I am trying to compute the average cell size on the following set of points, as seen on the picture: . The picture was generated using gnuplot:
gnuplot> plot "debug.dat" using 1:2
The points are almost aligned on a rectangular grid, but not quite. There is a limited bias (jitter?) of 10-15% along either X or Y (never ... |
There was a question something like, "Consider the language of all integers converted to binary form. The language of all strings divisible by 7 is :
1) Recognizable by a finite-automaton.
2) Recognizable by a Non-deterministic finite-automaton.
3) Recognizable by a deterministic Pushdown Automaton.
4) Recognizable by ... |
There are $p$ projects and $s$ students where $p \le s$. Multiple students can work on the same project but the same student cannot work on multiple projects. All projects must be allocated and all students must have a project. I need to compute and display all possible ways of allocating projects to students under the... |
Suppose we have given a list of 100 numbers. Then How can we calculate the minimum number of comparisons required to find the minimum and the maximum of 100 numbers.
Recurrence for the above problem is
$$T(n)=T(\lceil \frac{n}{2} \rceil) + T(\lfloor \frac{n}{2} \rfloor) + 2$$
$$\approx 1.5 \times n - 2$$
hence
$$T(100)... |
Consider a data structure called LazyHeap that supports the following operations:
INSERT(x): Given an element $x$, insert it into the data structure. It has no cost.
DELETE(x): Delete $x$ from the data structure. It has no cost.
RETURN: Return an element $x$ such that its order, if the elements are sorted, satisfies:
... |
I've been working on implementing an efficient Cartesian product operation (actually the <*> operation, but it amounts to about the same thing) for sequences based on Hinze and Paterson's "Finger trees: a simple general-purpose data structure". It seems that a natural way to calculate $xs \times ys$ when $xs$ and $ys$ ... |
After reading difference between user-level threads and kernel-level threads ,now I am in doubt of context switching.Context switching is managed by OS when switching between processes/threads but google didn't clarify me when i asked it that in which case more number of switching will take place for these cases :
1). ... |
Large period PRNGs such as Mersenne Twister require good seeding otherwise the initial output in the sequence may not seem to be high-quality, at least for the first few words (and in the way that is useful in production). For example, Marsaglia talked about seeding methods in his May 2003 Communications of the ACM ar... |
Consider a connected undirected acyclic graph $G$ with $n$ nodes and $n-1$ edges. The nodes have non-negative integer weights less than $n$.
A positive integer $x$ is given and you want to choose at most $x$ nodes so that
There is a path connecting all the nodes you choose that doesn't visit any node you haven't chos... |
I've an example which I simply don't get at all.
Implement an attributed grammar that checks that either
the word ends in $b$ or
each prefix of the word contains at least as many $b$s as $a$s
E.g. the word $bbbbaabaabaa$ is allowed but $abbabaabba$ is not. (I know - what an example!)
However, the grammar looks li... |
Let $A$ be a set of $n$ closed intervals, $I_i$, with both extremes positive integers. Is there an efficient algorithm to find a set of $n$ points $P_i$, with $P_i \in I_i$, such that the minimum distance between all pairs of points is maximized?
Assume that the intervals are bounded by a positive integer $C$.
What's t... |
I'd like to quote from Nielsen & Chuang, Quantum Computation and Quantum Information, 10th anniversary edition, page 5 (emphasis mine):
One class of challenges to the strong Church–Turing thesis comes from the field of
analog computation. In the years since Turing, many different teams of researchers have
noticed ... |
I have a practice problem that I'm not sure how to solve:
Use sephamores to solve the following synchronization requirement. We have 4 processes: P1, P2,P3 and P4. P1 must run before any of the other processes, P2 must run before P3 and P2 and P4 run concurrently.
This is how I solved it:
initialize 3 sepahmores s1,s... |
Suppose that there are two problems $P$ and $Q$.
How can I say that "solving $P$ is same thing with solving $Q$"?
For instance, if $P$ is NP-Hard, then we can say "$P$ can be solved in polynomial time iff there exists an algorithm $A$ that solves $Q$ in polynomial time".
There should be a shorter term for this, and I'm... |
I can't think of an example of a non-regular language $L$ such that $L^*$ is regular. . Any help ?
|
I'm currently studying for my algorithms final and I came across a practice problem that I can't seem to figure out. Here's the problem:
Consider the following set of difference constraints:
x1 - x4 <= 1
x2 - x1 <= 2
x2 - x4 <= 0
x3 - x1 <= 1
x4 - x1 <= -1
x4 - x3 <= -2
What is the solution that will be p... |
How do I prove that $\overline{\mathrm{ALL_{CFG}}}$ does not fall in NP, where
$\qquad\mathrm{ALL_{CFG}} = \{\langle G \rangle \mid G \text{ is a CFG}, L(G) = \Sigma^* \}$
|
I thought if the values in a max or min heap is monotonically increasing or decreasing, then this will trigger a worst case run time of $\mathcal{O}(n)$ because you will have to go through each and every single node to get to the value you want.
However, many sources state that heap has a worst case of $\mathcal{O}(n\l... |
Do programmers (in real life), always insert at the top node or somewhere else? Because in my text book CLRS it is not made very clear, so the insertion process can take a best case of O(1), if you insert it just at the right place, or a worst case when you have to rebalance the entire tree.
So in practice is there a p... |
I'm so bad at solving the problem of the type:
"If $A$ is an NP-complete problem, $B$ is reducible to $A$, then $B$ is..."
That I have to come here and ask these silly questions each and every time I encounter them.
Is there a good way of using the Venn Diagram shown below to tackle these kind of problem?
For examp... |
I am attempting to prove this result but I found a case where I can easily disprove this statement.
Suppose $G$ is a graph with two nodes u, v and an edge (u,v) and respective self edges, then removing the edge u,v results in two nodes left, therefore leaving the resulting graph disconnected.
Can someone show me why... |
I'm having trouble intuitively understanding why PSPACE is generally believed to be different from EXPTIME. If PSPACE is the set of problems solvable in space polynomial in the input size $f(n)$, then how can there be a class of problems that experience greater exponential time blowup and do not make use of exponentia... |
Suppose $\Pi$ is a decidable decision problem.
Does $\Pi\not \in NP$ imply $\Pi$ is $NP$-Hard?
Edit: if we assume there exists $\Pi\in coNP\setminus NP$ then we are done. Can we refute the claim without any unknown assumptions?
|
Contextsensitive grammars define exactly the langauges acceptable by nondeterministic LBA. But how about deterministic LBA - is there a grammar type capturing exactly the languages acceptable by this restricted automaton type? (Just as contextfree grammars capture nondeterministic, and LR-k grammars capture determinist... |
I've heard several times that for sufficiently small values of n, O(n) can be thought about/treated as if it's O(1).
Example:
The motivation for doing so is based on the incorrect idea that O(1)
is always better than O(lg n), is always better than O(n). The
asymptotic order of an operation is only relevant if under re... |
Can anyone explain to me how the following is true for any language?
$$L^+ = LL^* = L^*L$$
I'm confused because $L^*$ is the set of all words including the empty string, while $L^+$ is the set of all words excluding the empty string. I don't understand how concatenating $L^*$ with $L$ makes it equal to $L^+$. What happ... |
Is it true that an infinite language is in P iff it is the range of a length increasing polytime function? I ask because I know that it is a basic result in computability theory that a set is recursive iff it is the range of an increasing recursive function and I was wondering if there might be an analogue in complexi... |
In other words, is there a relationship between the step size and the actual running time? Suppose that the algorithm is run on identical machine.
|
My best attempt at a specific case of the problem where $n =$ 256:
For a specific case that a RB tree has 256 nodes, we can use the RB tree theorem to deduce that the height of the tree $h \leq 2*lg(n+1)$ then $h\leq 16$ for $n =$ 256.
But this doesn't exactly help me deduce whether the last row is all black nodes (th... |
http://homepages.math.uic.edu/~leon/cs-mcs401-s08/handouts/mst.pdf
I have some trouble understanding the proof above.
I understand that we assuming two MSTs, T and T', and an edge e that is the cheapest edge of G that located in T. Then the weight of this edge is larger than any weight on T', given that T' contains (... |
Question:
Suppose you have a list of integers and it might contain duplicates. Build a Max Heap using this list. Where would the duplicates of the max integer reside in this Max Heap data structure? Where would the duplicates of other integers reside in the heap?
My Answer:
The duplicates can reside below (as chil... |
I was studying closure properties of CFLs and I came across this. I want to understand why $L^*$ is not a CFL, can anyone explain me in depth with simple examples?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.