Problem Detail: I was playing around with Shannon-Fano (SF) entropy encoding when I ran into this issue. I am aware that the compression that can be achieved with SF is sometimes inferior to that of Huffman encoding, but I just though Read More …
Category: Uncategorized
[Solved]: A text-classifier that explains its decisions
Problem Detail: I am building a text categorizer for short sentences. In addition to telling the user “the category of the text you entered is C”, I want to be able to explain why I made this decision, in a short Read More …
[Solved]: How append, prepend, and generally insertAt work in RRB-tree
Problem Detail: I read the paper about Relaxed Radix Balanced trees (RRB trees) and am trying to implement them. What I can’t get is how insertion at an index should be performed step by step. Can anyone proficient in this data Read More …
[Solved]: Is the “data path cycle” the same thing of the “fetch-decode-execute cycle”?
Problem Detail: I am reading the book Structured Computer Organization (5th edition) by Tanenbaum and at a certain point, in the second chapter, he talks about data path cycle and fetch-decode-execute cycle, and I am not understanding if they are really Read More …
[Solved]: Top Down Insertion in a B Tree
Problem Detail: I have a B-Tree of order 5. So the keys are between $lceil n/2 rceil- 1 leq keys leq n – 1$ and children are between $lceil n/2 rceil leq children leq n $. Am I doing it right? Read More …
[Solved]: Bin packing problem or not?
Problem Detail: Suppose I have $N$ bins and $M$ items as depicted in the figure below (3 bins and 3 items): Suppose that every bin has unit capacity and the weights of the items depend on the bins used. I want Read More …
[Solved]: Synchronization using serialization
Problem Detail: How can someone synchronize two or more threads using serialization? According to my professor’s slides and code assignments you can use serialization to solve the synchronization problem. (He doesn’t explain what serialization is). I tried to do my research Read More …
[Solved]: Is “Find the shortest tour from a to z passing each node once in a directed graph” NP-complete?
Problem Detail: Given a directed graph with the following attributes: – a chain from node $a$ to node $z$ passing nodes $b$ to $y$ exists and is unidirectional. – additionally a set of nodes having bidirectional vertices to at least two Read More …
[Solved]: regular expression given the language
Problem Detail: The language is: $$ L = { (a^n) (b^m) mid n + m = 3k, k ge 0 } $$ My attempt at an answer: $$ (a cup b)^{3k} $$ This will work if the a OR b can Read More …
[Solved]: How can I quantify the number of swaps required for insertion sort?
Problem Detail: Based on the Wikipedia implementation of insertion sort: Given an input array $A$: for i ← 1 to length(A) j ← i while j > 0 and A[j-1] > A[j] swap A[j] and A[j-1] j ← j – 1 Read More …