Problem Detail: I have no formal training in computer science as I have not yet taken any such classes, so perhaps this question appears naive. I was reading about BPP and it was claimed that a deterministic Turing machine is a Read More …
Blog
[Solved]: How does one formulate a backtracking algorithm
Problem Detail: I am new to learning algorithms. I was reading backtracking algorithm for generating all strings for n bits. If I dry run the program I know the program is giving right result. But I didn’t understood the logic can Read More …
[Solved]: Maximum Spanning Tree vs Maximum Product Spanning Tree
Problem Detail: So I’m kind of wondering if I’m correct on something relating to an algorithms class. Let’s say I want to, for whatever reason, find the maximum spanning tree of a graph such that the edge weight is at maximum 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 …
[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]: 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]: 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]: 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]: 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]: 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 …