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 …
Category: Uncategorized
[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]: 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]: 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]: 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]: 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]: 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]: 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]: Turing Machine for strings without bbb
Problem Detail: I am trying to generate a transition graph for a turing machine that accepts the languages of all strings that do not contain the substring $bbb$ with the input alphabet $Sigma = {a, b}$. When I implement this graph Read More …
[Solved]: Algorithm for fastest division below threshold
Problem Detail: Take a number i. You need to split it in two pieces as many times as necessary so that all splits are less than or equal to j. How does one obtain this with the minimum number of splits? Read More …