Problem Detail: I am curious in determining an approach to tackling a “suggested friends” algorithm. Facebook has a feature in which it will recommended individuals to you which it thinks you may be acquainted with. These users normally (excluding the edge Read More …
Blog
Data compression using prime numbers
Problem Detail: I have recently stumbled upon the following interesting article which claims to efficiently compress random data sets by always more than 50%, regardless of the type and format of the data. Basically it uses prime numbers to uniquely construct Read More …
What is the difference between “strict schedule” and “cascadeless schedule”?
Problem Detail: In database transactions theory, what is the difference between a strict schedule and a schedule that is merely secured against cascade aborts? Could you give an example of a schedule that is secured against cascade aborts but is not Read More …
Are all languages in P?
Problem Detail: Are all languages in $mathbf{P}$? Note: The definitions of all the symbols and functions here follow the document [1]. The following is my attempt to answer the question. Assume that we design a special Turing machine $M_1$, no matter Read More …
What can Idris not do by giving up Turing completeness?
Problem Detail: I know that Idris has dependent types but isn’t turing complete. What can it not do by giving up Turing completeness, and is this related to having dependent types? I guess this is quite a specific question, but I Read More …
Destination-based vs source-based routing
Problem Detail: I understand that destination-based routing builds the “route” from the destination backwards to the source (e.g. if using a spanning tree, then the tree is routed at the destination). With source-based routing the opposite is true: the route is Read More …
Sorting functions by asymptotic growth
Problem Detail: Assume I have a list of functions, for example $qquad n^{log log(n)}, 2^n, n!, n^3, n ln n, dots$ How do I sort them asymptotically, i.e. after the relation defined by $qquad f leq_O g iff f in O(g)$, Read More …
Finite state automata, multiple completion states?
Problem Detail: I’m currently studying for an exam for a course where some of the material covered included finite state automata, I’ve completed a question and I’m not sure about my answer. Question http://i.stack.imgur.com/vDFax.png My Answer http://i.stack.imgur.com/rSnEv.png Are multiple completion states Read More …
Range update + range query with binary indexed trees
Problem Detail: I am trying to understand how binary indexed trees (fenwick trees) can be modified to handle both range queries and range updates. I found the following sources: http://kartikkukreja.wordpress.com/2013/12/02/range-updates-with-bit-fenwick-tree/ http://programmingcontests.quora.com/Tutorial-Range-Updates-in-Fenwick-Tree http://apps.topcoder.com/forums/?module=Thread&threadID=756271&start=0&mc=4#1579597 But even after reading through all of them I Read More …
Relation between simple and regular grammars
Problem Detail: I am reading “An Introduction to Formal Languages and Automata” written by Peter Linz and after reading the first five chapters I face below problem with simple and regular (especially right linear) grammars which are very similar to each Read More …