Problem Detail: I want to flatten a binary tree into a linear array, and I wonder if there are specific algorithms to improve locality in the linearized representation (for instance, ensuring that all data from the left child of the root Read More …
Blog
[Solved]: Difficulty understanding pre-emptive vs non-preemptive CPU scheduling
Problem Detail: I’m having difficulty understanding what my book is trying to say in regards to preemptive and non-preemptive CPU scheduling. It says the following: CPU Scheduling decisions may take place under the following four circumstances: When a process switches from Read More …
[Solved]: Deterministic and randomized communication complexity of set equality
Problem Detail: Two processors $A, B$ with inputs $a in {0, 1}^n$ (for $A$) and $b in {0, 1}^n$ (for $B$) want to decide whether $a = b$. $A$ does not know $B$’s input and vice versa. A can send a Read More …
[Solved]: Regarding the height of a recursion tree on dynamic programming
Problem Detail: I am trying to understand dynamic programming and I am watching this mit video. If you guys could take some time out , can you refer to the slide on 41:36 . Why is the height m+n. I just Read More …
[Solved]: Why is $BPP$ closed under complement?
Problem Detail: Why is $text{BPP}=text{co-BPP}$? I tried to find a proof online but couldn’t. Can anyone please provide a quick explanation (if it’s trivial and I just can’t see it) or a link to a proof? Asked By : so.very.tired Answered By Read More …
[Solved]: Inferring refinement types
Problem Detail: At work I’ve been tasked with inferring some type information about a dynamic language. I rewrite sequences of statements into nested let expressions, like so: return x; Z => x var x; Z => let x = undefined in Read More …
[Solved]: Is the complexity class NP computably enumerable?
Problem Detail: The definition of the complexity class $mathsf{NP}$ seems to ensure (as good as possible) that it is computably enumerable. It looks as if the class could be enumerated by enumerating all Turing machines, and for each Turing machine report Read More …
[Solved]: Generating number of possibilites of popping two stacks to two other stacks
Problem Detail: Context: I’m working on this problem: There are two stacks here: A: 1,2,3,4 <- Stack Top B: 5,6,7,8 A and B will pop out to other two stacks: C and D. For example: pop(A),push(C),pop(B),push(D). If an item have been Read More …
[Solved]: What is induction-induction?
Problem Detail: What is induction-induction? The resources I found are: the HoTT book, at the end of chapter 5.7. nLab’s article a paper called Inductive-inductive definitions this blog post also mentions inductive-inductive types The first two references are too brief for Read More …
[Solved]: Can we break the Shannon capacity?
Problem Detail: I have a friend working in wireless communications research. He told me that we can transmit more than one symbol in a given slot using one frequency (of course we can decode them at the receiver). The technique as Read More …