Problem Detail: The list of finite languages over a finite alphabet is countable. I could prove it by saying that the list of languages of size 1 is countable, the language of size 2 is countable, and so on. Then I Read More …
Author: ignougroup
[Solved]: Complexity of taking mod
Problem Detail: This seems like a question that should have an easy answer, but I don’t have a definitive one: If I have two $n$ bit numbers $a, p$, what is the complexity of computing $abmod p$ ? Merely dividing $a$ Read More …
[Solved]: Combinational Logic – Need help with proof by rewrite
Problem Detail: In my Computer Logic class we were assigned the following problem: Complete a truth table that has $3$ inputs $(A, B,C)$ and one output $(F)$. $F$ is asserted whenever $B$ or $C$ are asserted, but deasserted if both $B$ Read More …
[Solved]: Is the language TMs that accept finite languages Turing-recognizable?
Problem Detail: I know that $L={ langle M rangle mid |L(M)| < infty }$ is not decidable (by Rice’s theorem or using reduction, I followed it from $L$ not being decidable ). But is $L$ recognizable? What I tried is, let Read More …
[Solved]: How many number of different binary trees are possible for a given postorder (or preorder) traversal
Problem Detail: I came across the problem: What is the number of binary trees with 3 nodes which when traversed in postorder give the sequence A,B,C? Now 3 being small number I was quick to draw all possible binary trees and Read More …
[Solved]: Algorithm: ordering non-overlapping intervals
Problem Detail: Assume we have a (multi)set of nontrivial intervals $mathcal{I} = {I_1,…,I_n}$ and for any two $I_i, I_j in mathcal{I}$, we have that $I_i cap I_j$ is trivial (that is: contains at most one point), or one of them contains Read More …
[Solved]: Proving NP-hardness of strange graph partition problem
Problem Detail: I am trying to show the following problem is NP-hard. Inputs: Integer $e$, and connected, undirected graph $G=(V,E)$, a vertex-weighted graph Output: Partition of $G$, $G_p=(V,E_p)$ obtained by removing any $e$ edges from $E$ which maximizes $$max sumlimits_{G_i in Read More …
[Solved]: How can I make sense of amortized accounting method?
Problem Detail: Amortized accounting method has to be one of the most abstract analysis technique I have ever seen in my life (maybe aside from the potential method which I haven’t read). In the example of the Stack with Multiple Pops Read More …
[Solved]: Can an interrupt handler be preempted?
Problem Detail: Can a running interrupt handler be pre-empted by another interrupt handler? If this is possible, in which scenarios is this safe, and in which scenarios is it not? If this is not possible, why? Asked By : sanatana Answered By Read More …
[Solved]: Is $L_{half} = {w : text{for some } z in L, x in Sigma^*, z = wx wedge |w| = |x| } $ regular?
Problem Detail: Suppose we have some regular language $L$, then can we say that $$L_{half} = {w : text{for some } z in L, x in Sigma^*, z = wx wedge |w| = |x| } $$ is also regular? I have Read More …