Problem Detail: I understand without memoization it is going to be $O(3^{max,{m,n}})$ because every call results in extra three calls: thus we end up having a call tree with three children for each node, with height $max,{m,n}$, m and n being Read More …
Blog
[Solved]: Reduction between $Sigma^*$ and $emptyset$
Problem Detail: Throughout the subject of reductions, I was wondering: If we take $L_1 = Sigma^* $ and $L_2 = emptyset$, is $L_1 leq L_2$? is $L_2 leq L_1$? What I mean is, Is there some sort of reduction between any Read More …
[Solved]: Feedback polynomial of 7-bit Linear Feedback Shift Register
Problem Detail: My friend gave me a question to solve. The question he asked me was: the following sequence has been generated by a 7-bit linear feedback shift register. He asked me to find the feedback polynomial. I went through some Read More …
[Solved]: Convex Hull algorithm – why it can’t be computed using only comparisons
Problem Detail: Say I want to compute a covnex hull of given points on the plane. I would like to write an algorithm, that only compares the points and doesn’t do any arithmetic operations. Wikipedia states, that: The standard $Omega(n log Read More …
[Solved]: What if traversal order of two of pre-order, in-order and post-order is same?
Problem Detail: Supposing a tree T has the identical: Pre-order traversal and in-order traversal Pre-order traversal and post-order traversal In-order traversal and post-order traversal How does T look like? From the previous discussion in SO, I learned that pre- and post-order Read More …
[Solved]: Why is the orthogonal line segment intersection algorithm $O(nlog n+R)$ instead of $O(nlog n + Rn)$?
Problem Detail: In the same lecture notes without providing many details it says that the complexity of the algorithm which uses a balanced search tree is $O(nlog n+R)$ where $R$ is the total amount of intersections. However I don’t understand Read More …
[Solved]: The equivalence relations cover problem (in graph theory)
Problem Detail: An equivalence relation on a finite vertex set can be represented by an undirected graph that is a disjoint union of cliques. The vertex set represents the elements and an edge represents that two elements are equivalent. If I Read More …
[Solved]: Maximum I/O Data Transfer if DMA is used
Problem Detail: I was reading lecture notes of Universiti Malaysia Perlis when I am came across following question: A computer consists of a CPU and an I/O device $D$ connected to main memory $M$ via a shared bus with a data Read More …
[Solved]: What’s the difference between Process Context and Process Control Block?
Problem Detail: I know that Process Context is something that is stored when a process is preempted, containing all the necessary info to restart the process at a later time. I also know that the Process Control Block(PCB) contains all the Read More …
[Solved]: Type inference with product types
Problem Detail: I’m working on a compiler for a concatenative language and would like to add type inference support. I understand Hindley–Milner, but I’ve been learning the type theory as I go, so I’m unsure of how to adapt it. Is Read More …