instruction stringlengths 35 29.1k |
|---|
I am clearly not understanding the Busy Beaver function. Why wouldn't it be infinite for n > k,
while(true)
{
print("1");
}
|
How can one generate all unlabeled trees with $\le n$ nodes?
That is, generate and store the adjacency matrices of those graphs? (not just count them)
Visualization of all unlabeled trees with $\le6$ nodes:
|
I have these in my lecture notes, its about the rules where knights always tell the truth and knaves always lie:
If A says “The statement ‘there is gold on the island’ and the statement ‘I am a knight’ are either both true or both false” he is asserting A ≡ G where A is the assertion A is a knight and G the assertion t... |
Suppose the function $f(n)$ is defined as the number of $\ast$ printed in the following code
for(int i = 0; i<n; i++) {
for(int j = i; j<n; j++) {
for(int k = j + 200; k<2n; k++) {
for( int r = k^2; r<n; r++) {
print(*);
}
}
}
}
I suspect the answer is $\... |
I want to prove the search of an element in a Young tableau of size $n\times n$ is $\Omega(n)$, but I do not have any clue. Any help is appreciated!
|
Suppose a Turing machine $M$ has a read-only input-tape and $k$ read-write work-tapes whose non-blank cells are each bounded by $f(|x|)$ where $|x|$ is the length of the input.
Is there some constant $C(k)$ and Turing machine $M^{'}$ with a read-only input tape such that $M^{'}$ accepts exactly when $M$ accepts, $M^{'}... |
My main question is can with R.kanon , Fortnow ,... technique that shows lower bounds for SAT seperate P and NP ?
Baker-Gill-Solovay showed that $P?=NP$ could not be solved with relativization. Does indirect diagonalization a relativized proof?
Suppose with indirect diagonalization we show that $NP\not\subset A$ (A i... |
Consider $$ \bigcup_{c \in \mathbb{N}} \mathsf{DSPACE}(2^{c (\log{n})^2}) \quad \overset{?}{=} \quad \bigcup_{c \in \mathbb{N}} \mathsf{DSPACE} ( n^{c \log{n}})$$
My lecture notes say that this is an equality, can someone point me to the theorem (or explain) why this is ?
I've observed that one power of the logarithm... |
I'm trying to build a list of algorithms/problems that are "exceptionally useful", as in, solving problems that 'seem' very exponential in nature, but have some particularly clever algorithm that ultimately solves them. Examples of what I mean:
Linear Programming (The simplex algorithm is exponential time; it took a l... |
Let a counting function inc for inputs of N bits be defined as:
inc(b0 | b1 ... | bN) = F0(b0) | F1(b0,b1) ... | FN(b0,b1,...bN)
Where FN is a function from N bits to a bit, and such that the period of inc is 2^N. Notice that, here, we have a special restriction: the nth bit of the output of inc must only depend on bi... |
I want to generate a bunch of graphs of about 100 nodes, where each node is a categorial variable. I want the graphs to satisfy complex properties, like, "if a node of type A is connected to a node of type B, that node of type B should also be either connected to both a node of type C and a node of type D, or should b... |
Suppose you have a maze represented by a graph where each vertex represents a room and edges represent paths between rooms and each edge has a weight denoting the time it takes to go that way. Now here comes the tricky part: suppose each room needs a set of keys for you to enter, and inside each room you can find anoth... |
I know its very hard to show a human what the 4th dimension would look like and the mind can't even comprehend more dimensions, but what about a computer?
How many "dimensions" can a computer handle?
Or maybe a better way to ask, does computing power exponentially increase when extra dimensions are added?
|
A function $T: \mathbf{N} \rightarrow \mathbf{N}$ is time constructible if $T(n) \ge n$ and there is a Turing Machine $M$ that computes the function $x \mapsto \lfloor T(|x|) \rfloor$ in time $T(n).$
Here $\lfloor m \rfloor$ denotes the binary representation of $m$ for a natural number $m$.
I understand that $T(n) \ge ... |
I want to start a wiki post about meta-result of meta-reductions in the theory of $\mathrm{NP}$-completeness.
This can be regarded as a reference request post. Any links are appreciated.
At least, this can be helpful in drastically mitigating the frequently asked questions related to homework assignments that are givin... |
In designing a public-key cryptosystem, there are often two desirable properties:
Public/private key pair of each participant can be exchanged. Meaning that whenever a participant has generated a key pair $(a, b)$, it is free up to him to choose to public either $a$ or $b$ (but not both, of course)
Encoding/decoding a... |
I have came across a question stating that language $L = a^n b^n c^{2n}$ is not a context free language and hence, no PDA can be constructed for it. But what I am wondering is that, if I add another alphabetical comparison to the above language as
$L_1= a^n b^n c^{2n} d^n$
$L_2= a^n b^{2n} c^n d^{2n}$
And a mixture o... |
Given a graph and a set of origin-destination $\langle o_i,d_i\rangle$ pairs. The goal is computing a set of paths such that every pair has a path and number of common vertices between paths is minimized.
If you have any relevant references to share I'd like to read them.
|
Suppose I have a vertex-disjoint set $S$ of simple cycles in a weighted undirected graph. So no vertex $v$ is contained in more than one cycle. A cycle $c$ is a closed path with no repeated vertices: $c=(v_1, v_2, \ldots, v_n)$, where $v_n=v_1$. Each edge $e=(v_i,v_j)$ has a positive weight $w(e)$. The weight of a cycl... |
I recently came across this question:
Let the following relation schemas be given:
$R=(A,B,C)$
$S=(D,E,F)$
Let relations r(R) and s(S) be given. Give an expression in the tuple relational
calculus that is equivalent to the following:
a. $\pi_A(r)$
The solution provided is:
$\{t|\exists q \in r(q[A]=t[A]) \}$
But acco... |
The problem is that: in a directed acyclic graph $G$, I want to know the maximum vertices that can be covered by $k$ vertex-disjoint paths.
Obviously, the value of $k$ is smaller than the minimum path coverage of $G$. Are there any approximation algorithms that can solve this problem?
|
I am trying to find a reasonable data structure for representing a
partition of an (axis aligned) rectangular domain into a set of (axis aligned) rectangles.
I need to be able to look up for a given point which (unique) rectangle contains it.
So far I have taken a look at Quadtrees, and this seems reasonable to me - wh... |
I am coming across two slightly different definitions of big-oh and need to prove that they are equivalent to each other:
Definition 1: f(n) = O(g(n)) if there exists constants c and N such that f(n) ≤ c g(n) for all n > N.
Definition 2: f(n) = O(g(n)) if there exists a constant c such f(n) ≤ c g(n) for all n≥1.
Intuit... |
I was wondering if there exists an efficient algorithm for calculating the "rolling mode of an array of integers.
By rolling mode I mean that we have an array of integers of size $n$ and a sliding window of size $k$ and we we want to compute the mode for each window in the array.
There is an algorithm to do this in $O... |
In "Computational Complexity" by Arora and Barak they state that the following is $NP$-complete:
$\{ \langle \alpha, x, 1^n , 1^t \rangle : \exists u \in \{0,1\}^n \text{ s.t. } M_{\alpha} \text{ outputs } 1 \text{ on input } \langle x,u \rangle, \text{ within } t \text{ steps} \}$.
They call this language $TSAT$.
I a... |
The question comes from the following scenario,
assume we have the traveler problem which is NP (the one where a traveler wants to visit all countries with the lowest cost(by summing up all flights))
So basically Neural Network can not just predict, but generate results from things they've learned, for instance, traini... |
The title says it all. The language $\{ a^{2^n} \mid n \in N\}$ looks quite simple. Yet I could not find a grammar that generates this language.
|
Question:
Given Input: Courses and their dependencies(prerequisites)
such as A < B; A < C; B < D; C < D return course order in the order a student can take. i.e answer should return A, B, C, D or A, C, B, D
I solved the problem, but the running time is very slow, I cannot seem to figure out how to improve my algorithm.... |
Question: Given two sorted arrays A1 and A2, check if A2 is a subset of A1. Also, assume there might be duplicates.
Example:
A1 = [0,0,0,0,1], A2 = [0,1] // should return true
A1 = [-1,0,1,2,3,4,5], A2 = [1,2,3] // should return true
Answer: My answer is below and works, but I believe my running time is slow. Not ... |
I have an array of distinct integers which I want to save in the most compact manner. I may have to do occasional lookups, deletions, and insertions in this array so the compression algorithm must adjust for such cases.
What is the appropriate algorithm/ data structure that I should think of?
Is there anything along th... |
Could someone give me a simple explanation why an oracle machine that can solve the halting problem for standard Turing machines, is however unable to solve the halting problem for other such oracle machines?
I have tried searching for the answer online but could not find any that really answered the question.
|
A few days ago, I proposed the Abstract Calculus, a minimal untyped language that is very similar to the Lambda Calculus, except for the main difference that substitutions are O(1) (i.e., variables only occur once) and copying is an explicit, constant-time and incremental operation. Here is an example:
let (a & b) = (λ... |
Given a list with $n$ positive elements and positive number $k$, determine whether there are two numbers whose difference is less than $k$.
The average time complexity should be $O(n)$, and the memory should be $O(n)$ as well.
My attempt: initialize a hash table, and insert every element from the list to the hash, a... |
What is the biggest complexity class that is low for each other equivalent definition of $\mathrm{PP}$?
I already know that $\mathrm{PP}^\mathrm{BQP}=\mathrm{PP}$. This is a lowness result using standard definition of $\mathrm{PP}$.
Since, it is known that $\mathrm{PP} = \mathrm{PostBQP} = \mathrm{PQP}$.
If we use $\m... |
In this process list situation
How can I find the quantum time ( time slice ) at 80% of CPU time ?
I found only for 100% of CPU time, so I don't know if it's the same for 80% case
B.T.Q= [mean + median ] / 2
mean=(P1+P2+P3+.....Pn) / n
|
I am working on a task embedding sentences into a lower-dimensional space according to style, both grammatical and lexical. As such, I want to have as input the linear ordering of tokens in each sentence, together with its dependency parse as provided by spacy.
In particular, I'd like to find a way to tie together th... |
My question is about the quantum computer. I have tried to prove that the quantum computer is equivalent to some logical circuit.
I know this has already been proven, but I will present my attempt:
First we know that the quantum computer is composed of quantum logic gates
https://en.wikipedia.org/wiki/Fredkin_gate. Ac... |
I was reading David Marr's "Artificial Intelligence-A Personal View" and he talks about "computational theory of AI" or what he laters labels as "Type 1" Theory. He provides the example of Chomsky's notion of "competence theory for English syntax as an example of what he means by that. However, with the current trend o... |
Google's new in-production OS which it desires to replace not only Android but many other devices utilizes a completely new kernel:
The code differs from Android and Chrome OS due to its being based on the "Zircon" kernel (formerly "Magenta") rather than on the Linux kernel.
https://en.wikipedia.org/wiki/Google_Fuchs... |
Given n points and 0 < p < n, find the maximum number k of rectangles such that each rectangle contains at least p points and no two rectangles overlap. Each point is distinct from every other point, and the edges of all rectangles must be parallel to the coordinate axes.
For example, 1 rectangle can contain all n poi... |
I have an assignment, it's asked to write a context free grammar recognising the language $L=\{ w \mid w\text{ has an even number of }0\text{s and an odd number of }1\text{s}\}$, over the alphabet $\{0,1\}$.
My first guess was:
$$
\begin{align}
S &\rightarrow A1A\\
A &\rightarrow A0A0A \mid A1A1A \mid \varepsilon
\end{... |
Is it proven that $\mathrm{PP}$ has uniform constant-depth threshold circuit?
|
What are the consequences of proving some relation ($\subseteq$, $\subset$, $=$, or $\neq$) on one of the following, to the other?
$P$ vs. $BPP$
$P$ vs. $NP$
|
Let L be a problem that DTM can't solve. Can we prove that there is an abstract machine that can solve this problem?
Here, L is not Halting problem or Hilbert's tenth problem (because we proved that algorithms for these don't exist).
In other words, is there an abstract machine more powerful than DTM? If not, how do we... |
Sorry if I am doing it wrong in some way.
Some days ago I have passed trough an technical test in which I had 3 tasks to complete. The tasks were a problem and I have to write an algorithm to solve it.
One of the 3 tasks I could not complete. Really, I have absolutly no idea how to start.
I am not asking for ready algo... |
I have seen many research papers with log space algorithms, but not many with $AC^0$ algorithms. Is there any reason for this.
Question : Are $AC^{0}$ algorithms interesting to research communities?
|
I would appreciate some help with this question.
The 32 bit numbers below represent a MIPS instruction. identify the different fields and state which instruction it is. give the assembler source code that can be converted into this instruction.
001000|10001|10010|0000000000001111
I separated the bits and I know the fir... |
Suppose I have a graph $G$ and a set of target nodes $S = \{A_1, ..., A_n\}$. I'm attempting to find the shortest path that visits each target node, in order, without visiting the same node twice.
For example, consider the following:
I have attempted to solve this by first performing a breadth-first search to find the... |
Assuming there is no attack/bug and I use NTP: Are there any formal guarantees about the accuracy of the local time? Can there be any over the network?
Even if the communication is going directly between the time server (stratum-1) and the client, I have no idea if the devices / protocols on OSI layer 1-4 have time gua... |
In my book, this formula is given for calculation of address of row major order's element $[I,J]$:
Address of $[I,J]$th element in row major order $= B + W[n(I-L_r)+ [J-L_c]]$
where B denotes base address, W denotes element size in bytes, n is the number of columns; $L_r$ is the first row number, $L_c$ is the first c... |
I have the following definitions
Definition nat'' {X : Type} := (X -> X) -> X -> X.
Definition nat' := forall (X : Type), @nat'' X.
And when I wanted to prove a certain property I ended up in the following situation:
m : nat'
H : 0 = m nat S 0
X : Type
s : X -> X
z : X
============================
m X s ... |
Having read all these posts
Constant-depth threshold circuit for $\mathrm{PP}$
Is there any interesting consequence of $\mathrm{DLogTime}$-uniform ${\mathrm{Mod}_6}^0=\mathrm{NP}$
I wonder about the weakest possible reduction for 3-$\mathrm{SAT}$ to be complete for $\mathrm{NP}$?
|
It is a classic problem to simulate a fair coin with a biased one.
According to Fair Coin (wiki),
John von Neumann gave the following procedure:
Toss the coin twice.
If the results match, start over, forgetting both results.
If the results differ, use the first result, forgetting the second.
In the worst case, the ... |
I am working on an assignment where one of the sub questions is:
Let $A$ and $B$ be languages. Suppose $A$ is context free and $A ≤_m B$, which means that there is a computable function $f\colon \Sigma^* \to \Sigma^*$ such that for all $w \in \Sigma^*$, $w \in A$ iff $f(w) \in B$. Is it possible that $B$ is regular?
... |
I understood that a NTM can say only yes but it doesn't know if the input is a NO instance with a single execution. Furthermore, the NTM can diverges and, at the same time, can decide a language (source: Papadimitrou - Computational Complexity, proposition 7.1). While a TM must converges in a "yes" or "no" answer to de... |
We define an initial function called projection as $$I^k_i(n_1,\ldots,n_k) = n_i, \quad i \leq 1 \leq k, \quad k \in \mathbb{N}.$$
Suppose now that we want to define it in some programming language where we have no access to superscripting nor subscripting. Should we call it Iki or Iik?
My stand point is that it should... |
I'm trying to implement a simple image segmentation application that accepts an initial contour and evolves it to compute a refined contour in successive iterations. I'm taking some inspiration from the explanation provided here:
https://profs.etsmtl.ca/hlombaert/levelset/
I'm having trouble understanding what exactly ... |
I'm trying to prove the following problem:
Show that $RP$ is closed under concatenation
Now, let's say that the two languages are $L_{1}$ and $L_{2}$ (both in $RP$). Then I accept a word iff the TM of $L_{1}$ accepted the first part of the word (with a probability $\geq\frac{1}{2}$), and the TM of $L_{2}$ accepted th... |
The question is clear from the title. What is the complexity of the following decision problem:
Input: An undirected graph $G(V, E)$
Output: $\mathrm{YES}$ if $G$ can be decomposed into two edge-disjoint spanning trees, $\mathrm{NO}$ otherwise
|
For example the nodes in this graph should be separated into two groups (A,B,C) and (D,E,F,G).
By looking at a graph of citations, assuming that most citations are papers from the same field, can we separate papers into fields?
|
Let SAT-100 be the following problem:
Input: Any boolean logic formula
Output: True if there exists a combination of exactly 100 input variables that satisfy the formula.
This is the description of a problem that is apparently in $P$. (old exam question)
I have tried to design an algorithm but I got stuck, so here it g... |
I am trying to complete this question. However, I am unsure of the steps necessary to complete the conversion from a CFL to a deterministic PDA.
I know that $ww' | w \in \left \{ a,b \right \}^{*}, w' \in \left \{ b,c \right \}$ is a context free grammar.
I need to create a deterministic PDA diagram.
What steps do I n... |
E::= zero|two|expression + expression|expression*expression, E element of expression how do i prove E to be even.
I have no clue on how to go about tackling this.
|
I'm trying to prove the following problem:
Prove that if $P=NP$ then there is a polynomial time algorithm for the following problem:
INPUT: A boolean formula $\phi$.
OUTPUT: A satisfying assignment of $\phi$ if $\phi$ is satisfiable. If $\phi$ is unsatisfiable, return $false$.
My proof:
If $P=NP$ then $SAT$ can be d... |
I want to know what are the efficient way to invert a Sparse Matrix? Are there any algorithm,linear algebra or expansions that make this task easier with out actually inverting the matrix?
Thank you in advance
|
I want to detect the non existence of a cycle in a graph using Datalog (which is a declarative logic programming language).
The proposed solution was:
(set-option :fixedpoint.engine datalog)
(define-sort s () Int)
(declare-rel edge (s s))
(declare-rel path (s s))
(declare-var a s)
(declare-var b s)
(declare-va... |
I have variables x y and z, and I have the values that they can be assigned to, I.E. x can be assigned 1,2, or 3, y can be 1, and z can be 2. The problem is a constraint that says once a value has been taken by a variable, no other variables can have that value.
The issue that I am running into is if I start with x, ... |
Normally, $\mathrm{SUBEXP}$ is defined to be the intersection of all $\mathrm{DTIME}(2^{n^\epsilon})$. That means each problem in this class has infinitely many exponential time algorithms with the exponent arbitrarily polynomially ($n^\epsilon$) small.
We all know that another closely related definition is also lurkin... |
I'm new to lambda calculus, and I read all kinds of interesting stuff about encoding data types as functions. Church booleans, numbers and lists.
https://en.wikipedia.org/wiki/Church_encoding
Is there a way to encode (binary) trees?
|
I am looking at the following algorithm for performing a Postorder Traversal of a binary tree
POSTORDER(root):
if root != nullthen
POSTORDER(root.left);
POSTORDER(root.right);
visit root;
end if;
I am supposed to be able to demonstrate that this algorithm runs in Θ(n) time complexity when the input is a n-... |
Is there an easy way (maybe by using hierarchy theorems) to disprove that $DTIME(f) = NSPACE(f)$ for any computable $f: \mathbb{N}\rightarrow\mathbb{N}$ with $f(n)\geq n$?
|
If I have an algorithm A that, in the worst case, has a lower bound of $Ω(n\log n)$ and an upper bound of $O(n²)$, how can I go about determining possible time complexities for best and average cases?
For instance, only one of the following is possible:
a. Best case $\Theta(n)$
b. Worst case $\Theta(n\sqrt{n})$
c. Aver... |
I know for an LBA the emptiness problem is undecidable. However I am not clear on how to reduce the halting problem of Turing machines to this as LBAs are strictly computationally less powerful than Turing machines. Or should I approach with reductions using computational histories of a Turing machine on an input.
|
Consider a router with a packet arrival rate of $a$ where each packet has $L$ bits, and a transmission rate (in bits/s) of $R$. My textbook describes the traffic intensity as $\frac{La}{R}$ and states that as $\frac{La}{R} \to 1$, the average queueing delay approaches $\infty$. I'm just struggling to understand why thi... |
how does Paxos Consensus algorithm behave in an asynchronous environment? Because as far as I know Paxos only work in synchronous environment. Correct me if I am wrong :)
Sorry for the noob question, started learning about Paxos yesterday only.
|
Given a deterministic parity automaton $\mathcal{A}$ with state set $Q$ and a state $q \in Q$, we denote with $\mathcal{A}_q$ the same automaton with initial state $q$. Two states $p$ and $q$ are language equivalent if $L(\mathcal{A}_p) = L(\mathcal{A}_q)$.
What is an efficient algorithm to compute the set of all langu... |
Is it correct to say that since the SHA256 function domain is finite (as reported here) we can build a DFA that calculates this function (i.e. trivially a giant lookup table)?
Furthermore, if we eliminate the limitation on the length of the input, is it correct to say that SHA256 function belongs to the class of $\math... |
A language $L'$ is $PSPACE$-hard if for every $L \in PSPACE$ we have $L \le_p L'$.
Here $L \le_p L'$ means that $L$ is polynomial-time reducible to $L'$.
Why does we use time reductions instead of space reductions in this situation?
|
We define a signature as a triple $$\Sigma\ =\ (S,F,\mathrm{type})$$ where $S$ is a set of sorts, $F$ a set of $n$-ary function symbols $f$ of the type $\mathrm{type}(f)$ $=$ $(M_1,\dotsc,M_n\dashrightarrow M_{n+1})$, where $n\ge 0$ and all $M_i$ lie in $S$ ($1\le i\le n$).
A $\Sigma$-algebra for us is a pair $$A\ =\ (... |
I am currently studying recursion theory, but I cannot really understand where to put the Primitive Recursive functions in the Chomsky hierarchy.
In my understanding, Primitive Recursive functions contain all finite languages but are not contained in Regular expressions.
For instance, I think that $\{a^nb^n | n \in \ma... |
The assumption $\mathrm{SUBEXP}\subset \mathrm{P}/\mathrm{poly}$ seems to yield nothing interesting at all. Is that true?
|
Suppose that each person in a group of n people votes for exactly two people from a set of candidates to fill two positions on a committee. The top two finishers both win positions as long as each receives more than n/2 votes.
Describe a divide-and-conquer algorithm that determines the top two candidates and whether th... |
Knuth in his book provides a method of how to efficiently calculate mod(w +1) or mod(w-1) where w is a power of 2. I am not sure I could understand his assembly language completely.
Could you explain how to efficiently calculate those mod operations through mod(2^w) and can we extend it to a more common case of mod(w ... |
I am currently learning machine learning and I stumbled across gradient descent. I understand why the algorithm always converges to the global/local minimum when the learning rate is small enough in my head, but is there a mathematical proof?
Thank you!
|
If I understand correctly (from reading Wikipedia), median-of-medians pivot selection makes quickselect $O(n)$ because the pivot is guaranteed to be in between the 30th and 70th percentiles and so at least 30% of elements will be removed in each selection pass.
But I have tried to prove this percentage inductively but ... |
I have a set of (integer) ranges and want to compute the (possibly non-disjoint) set of all subsets of overlapping ranges. The data structure used for the output is not of particular importance to me; if a linked list can be used to reduce the run time, for example, then that's alright with me.
Formal problem
Consider ... |
In Computational Complexity -- A Modern Approach, by Arora and Barak, they have the following claim (Example 3.6).
Let EXPCOM be the following language
$$ \{ \langle M, x, 1^n\rangle \mid M \text{ outputs 1 on $x$ within $2^n$ steps} \} $$
Then $\mathbf{P}^{\mathrm{EXPCOM}} = \dots = \mathbf{EXP}$. [...]
Clearly, an ... |
For a function $f$, consider the language $$L=\{\langle M\rangle\mid M\text{ computes }f\}\,.$$
Where does the language above is and how do I prove it?
To me it seems that it's not in RE nor coRE but I struggle to prove so.
what I have so far is reduction from HP to $L$ as follows:
$$R(<M>,w) = <M'>$$
$$
Define \ M': \... |
I have the following problem. The problem can be formulated in three different ways
Given sets $B_{-n},\ldots,B_n \subset \{1,\ldots,m\}$.
Find $i,j \in \{-n,\ldots,n\}$ with $|i| \neq |j|$ and $i,j \neq 0$ that satisfy $B_i \cap B_j = \emptyset$
"Invert" the sets $B_i$
Define $A_k=\{i: k\in B_i \}$. $A_1, \ldots, A_... |
GIven a number N, Threshold T and an array A. Find the lexicographically smallest order of N numbers from A such that the total of these N numbers is <= T.
This question is a simplification of this dynamic programming question:
It’s Tushar’s birthday today and he has N friends. Friends are
numbered [0, 1, 2, …., N-1... |
Is anyone able to give a concise proof for the implication stated in the title? This is gonna be in stark contrast to this question.
For definition of $\mathrm{strict}$-$\mathrm{SUBEXP}$, see here.
|
Sipser goes on to show that regular languages are closed under concatenation using NFAs. His proofs typically use NFAs to prove closure under the operations.
Is there an alternative proof that goes on to show that regular languages are also closed under concatenation using DFAs?
|
In string theory, the $k$-th power of a string $w$ is named as $w^k$, where $w^0$ is the empty string $\epsilon$ and $w^n$ is the concatenation of $w$ and $w^{n - 1}$ $(n \in \mathbb{N}^{+})$.
The power in a string that mentioned below means some power which is one substring of the string. In addition, two strings are ... |
Suggest a Data Structure for N elements that support on the following operations:
Describe the Data Structure on a sketch and literally, describe how each method work.
\begin{array}{|c|c|c|c|}
\hline
Operation & Average Running Time & Deterministic Running
Time \\ \hline
Init(N)& &O(1)\\ \hline
Insert(x)& O(log(n... |
I'm trying to understand the proof of the Cook-Levin thereom in Aurora and Barak's "Computational Complexity" text.
A snapshot $z_i$ of $M$’s execution on some input $y$ at a particular step $i$ is the triple $(a, b, q_i) \in \Gamma \times \Gamma \times Q$ such that $a, b$ are the symbols read by $M$’s heads from the t... |
Can someone explain the steps to reduce
$$ (\lambda n. \lambda m. \lambda f. \lambda x.\ n\ (m\ f)\ x)\ (\lambda f. \lambda x.\ f\ (f\ x))\ (\lambda f. \lambda x.\ f\ x) $$
to $\lambda y. \lambda z.\ y\ (y\ z)$?
|
I am trying to generate output consisting of three-tuples (A,B,C), where A,B, and C are three different datatypes representing different values. I also have a collection of functions $f_i \in F$ which each take in either one, two, or all of A,B, and C as input, and output whether a condition regarding the relevant var... |
I am studying about Finite State Automaton, and I found that the when reversing a language (i.e., transforming $L$ to $L^R$), I have to add new start state. Why is that?
Also, can a Finite State Automaton have more than one starting state?
|
I am studying some algorithms interview questions and I am seeing many path-based questions like "if a robot is at the top left of a grid and can only move down or to the right, how many paths can take it to the bottom left of the grid". Or similarly sometimes they ask if the particular destination can be reached at a... |
In page 71 of Mathematics for Computer Science (page 77 in the pdf) it says that "The Turing award (the “Nobel Prize” of computer science) was ultimately bestowed on Robert Floyd, for, among other things, being discoverer of a simple program that would insert the brackets properly [into an arithmetic expression]."
What... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.