Problem Detail: While doing the second code kata (which asks you to implement a binary search algorithm five times, each time with a different method), I’ve come up with a slightly different solution which works as follows: If i have a Read More …
Blog
Representing Negative and Complex Numbers Using Lambda Calculus
Problem Detail: Most tutorials on Lambda Calculus provide example where Positive Integers and Booleans can be represented by Functions. What about -1 and i? Asked By : zcaudate Answered By : Andrej Bauer First encode natural numbers and pairs, as described by jmad. Read More …
Performance of microkernel vs monolithic kernel
Problem Detail: A microkernel implements all drivers as user-space programs, and implements core features like IPC in the kernel itself. A monolithic kernel, however, implements the drivers as a part of the kernel (e.g. runs in kernel mode). I have read Read More …
How hard is finding the discrete logarithm?
Problem Detail: The discrete logarithm is the same as finding $b$ in $a^b=c bmod N$, given $a$, $c$, and $N$. I wonder what complexity groups (e.g. for classical and quantum computers) this is in, and what approaches (i.e. algorithms) are the Read More …
“At least one” clause in Relational Algebra
Problem Detail: I’m fairly new to the syntax of relational algebra, and I’m having a hard time understanding how I could set a “at least one” clause. Example: I have: a table with books (listing the title, year published and ID), Read More …
Running Floyd-Warshall algorithm on graph with negative cost cycle
Problem Detail: I am trying to find the answer to the following question for the Floyd-Warshall algorithm. Suppose Floyd-Warshall algorithm is run on a directed graph G in which every edge’s length is either -1, 0, or 1. Suppose that G Read More …
Count unique increasing subsequences of length 3 in $O(nlog n)$
Problem Detail: Problem: Given an array of $n$ integers, $A[1 dots n]$, such that any integer occurs at most 2 times in the array, we have to find the number of unique increasing subsequences of length 3 (duplicate subsequences must be Read More …
Disk scheduling and process scheduling
Problem Detail: Whats the diffrence between Disk scheduling and process scheduling? I mean i know the roles of disks and processes, but it seems to me they both have the same aim. to reduce monopolies, they even both share similar algorithms Read More …
How to describe algorithms, prove and analyse them?
Problem Detail: Before reading The Art of Computer Programming (TAOCP), I have not considered these questions deeply. I would use pseudo code to describe algorithms, understand them and estimate the running time only about orders of growth. The TAOCP thoroughly changes Read More …
Ambiguous Grammar to Unambiguous Grammar
Problem Detail: I’m wondering if somebody can please help me to understand how I go about converting this grammar to an unambiguous grammar. If you can point me in the right direction, I would greatly appreciate it. S -> AB | Read More …