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 …
Blog
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 …
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 …
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 …
What is the difference between variables and pointers?
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 …
Quantum lambda calculus
Problem Detail: Classically, there are 3 popular ways to think about computation: Turing machine, circuits, and lambda-calculus (I use this as a catch all for most functional views). All 3 have been fruitful ways to think about different types of problems, Read More …
Not able to convert from NFA to DFA
Problem Detail: I have a simple problem of making a DFA which accepts all inputs starting with double letters (aa, bb) or ending with double letters (aa, bb), given $Sigma ={a, b}$ is the alphabet set of the given language. I Read More …
Automaton for substring matching
Problem Detail: Given $s$ as a string over some alphabet, what is the best known algorithm to compute a corresponding deterministic finite-state automaton (DFA) that accepts any string that contains $s$? I am mostly interested of the lowest time complexity so Read More …
Does cooperative scheduling suspend processes when they perform an I/O operation?
Problem Detail: Many operating systems references say that with cooperative (as opposed to preemptive) multitasking, a process keeps the CPU until it explicitly voluntarily suspends itself. If a running process performs an I/O request that cannot be immediately satisfied (e.g., requests Read More …
Dynamic programming table for finding similar substrings is too large
Problem Detail: Substring Diff Given two strings of length $n$, $P = p_1dots p_n$ and $Q = q_1 dots q_n$, we define $M(i, j, L)$ as the number of mismatches between $p_i dots p_{i+L-1}$ and $q_j dots q_{j+L-1}$. In set Read More …