Problem Detail: Basically, the problem I am solving is this. Initially, the array $A$ is empty. Then I am given data to fill the array and at any time I have to make a query to print the $|A|/3$-th largest element Read More …
Blog
[Solved]: Jamming signal useless in CSMA / CD?
Problem Detail: I’m looking at collision detection in communication protocols, in particular Carrier sense multiple access with collision detection (CSMA/CD). According to what I’ve read on Wikipedia, a collision seems to cause the wave of the outgoing signal and the wave Read More …
[Solved]: Round-robin scheduling: allow listing a process multiple times?
Problem Detail: In a round-robin scheduler, adding a process multiple times to the process list is a cheap way to give it higher priority. I wonder how practical an approach this might be. What benefit does it have over other techniques Read More …
[Solved]: Richard Karp’s 21 NP-Hard problems, the meaning of his research?
Problem Detail: In Richard Karp’s paper “Reducability among combinatorial problems” he lists 21 NP-Hard problems. Though I can somewhat understand the ideas and motivation behind the paper I am searching for some clarity. From what I know and understand this paper Read More …
[Solved]: Find longest common substring using a rolling hash
Problem Detail: The longest common substring (LCS) of two input strings $s,t$ is a common substring (in both of them) of maximum length. We can relax the constraints to generalize the problem: find a common substring of length $k$. We can Read More …
[Solved]: String of minimum length in ${a, b}^*$ not in a regular expression
Problem Detail: I’m doing an exercise in my book, the question is to find a string of minimum length in ${a, b}^*$ not in the language corresponding to the given regular expression. a. $b^*(ab)^*a^*$ My answer: $aab$ b. $(a^* + b^*)(a^* Read More …
[Solved]: What is the advantage of Day-Stout-Warren algorithm for balancing BST?
Problem Detail: While reading about Day–Stout–Warren algorithm for balancing BST which takes any BST and transforms it into a balanced BST in O(n) time. In my opinion I can achieve absolutely the same with these simple steps: convert BST into array Read More …
[Solved]: What piece am I missing to turn this idea into a programming language?
Problem Detail: I’ve been doing some reading (I’ll name drop along the way) and have selected a few scattered ideas that I think could be cobbled together into a nifty esoteric programming language. But I’m having some difficulty assembling the parts. Read More …
[Solved]: Are expert systems outdated, what are better alternatives to them, if any?
Problem Detail: I need to link facts to actions through rules. If a person bought soup 10 times and he is coming at midday every day, then the system should link the fact that the person bought soup so many times, Read More …
[Solved]: Difference between algorithm and procedure
Problem Detail: I came to know that the important difference between algorithm and procedure is that the algorithm halts and procedure doesn’t halts(stops). But i am not able to understand the concept. Please can any one explain with the example? Asked Read More …