Problem Detail: Whist reading an article outlining differences in OO and Functional programming I came across function pointers. It has been a while since I completed my Computer Science degree (2003) and so I looked up pointers to refresh my memory. Read More …
Author: ignougroup
Generating a adjacency matrix representing a DAG
Problem Detail: Does anyone have a pointer to a resource or, even better, a tip to provide on how to efficiently generate a very large matrix representing a connected graph. Graph can be randomly created although I would ideally generate a Read More …
Does Quicksort always have quadratic runtime if you choose a maximum element as pivot?
Problem Detail: If you have a quick-sort algorithm, and you always select the smallest (or largest) element as your pivot; am I right in assuming that if you provide an already sorted data set, you will always get worst-case performance regardless Read More …
How to evaluate the clock cycle for MIPS single cycle CPU
Problem Detail: The Situation I’m trying to read the book ‘Digital Design Computer Architecture’. In the part of Performance Analysis(7.3.4 in the book), Author refers to clock cycle for MIPS single cycle processor. But I think there’s something wrong with author’s Read More …
Algorithm for compressing binary data that can efficiently be partially decompressed
Problem Detail: So I have been given the following problem and since I have no experience at all in this field, I would really appreciate some advice/guidance. These are the requirements: So three times per second a certain amount (fixed per Read More …
How does Stack Inspection work?
Problem Detail: This is precursor to my other, more advanced question about Stack Inspection. Stack Inspection is a security mechanism introduced in the JVM to deal with running code originating from locations having different levels of trust. This is question aims Read More …
How to measure “sortedness”
Problem Detail: I’m wondering if there is a standard way of measuring the “sortedness” of an array? Would an array which has the median number of possible inversions be considered maximally unsorted? By that I mean it’s basically as far as Read More …
How do I show that whether a PDA accepts some string ${ w!w mid w in { 0, 1 }^*}$ is undecidable?
Problem Detail: How do I show that the problem of deciding whether a PDA accepts some string of the form ${ w!w mid w in { 0, 1 }^*}$ is undecidable? I have tried to reduce this problem to another undecidable Read More …
Mapping Reductions to Complement of A$_{TM}$
Problem Detail: I have a general question about mapping reductions. I have seen several examples of reducing functions to $A_{TM}$ where $A_{TM} = {langle M, w rangle : text{ For } M text{ is a turing machine which accepts string } Read More …
Finding recurrence when Master Theorem fails
Problem Detail: Following method is explained by my senior. I want to know whether I can use it in all cases or not. When I solve it manually, I come to same answer. $T(n)= 4T(n/2) + frac{n^2}{lg n}$ In above recurrence Read More …