Problem Detail: I am unable to understand that what the characteristic path length (CPL) of a graph is. In one of its definitions, it is written that it is defined as the median of the means of the shortest path lengths Read More …
Blog
Algorithm for building a suffix array in time $O(n log^2 n)$
Problem Detail: I’ve been working with suffix arrays lately, and I can’t find an efficient algorithm for building a suffix array which is easy to understand. I have seen in many sites that there is an $O(n log^2 n)$ algorithm, but Read More …
Counting inversions in a list of integers using divide and conquer techniques
Problem Detail: This is a homework. It looks easy, but not really. A list of integers $a_n$, for every $i<j$, if $a_i>2a_j$, then it is an inversion. Count the inversions in the list, and return the count and the ordered list. Read More …
Constructing of Double Connected Edge List (DCEL)
Problem Detail: For a given planar graph $G(V,E)$ embedded in the plane, defined by list of segments $E= left { e_1,…,e_m right } $, each segment $e_i$ is represented by its endpoints $left { L_i,R_i right }$. Construct a DCEL Read More …
Convolutional Neural Network Example in Tensorflow
Problem Detail: I want to ask the dimension change in different convolution and max-pooling layer. I am referring to the example in TensorFlow tutorial: http://tensorflow.org/tutorials/mnist/pros/index.html#deep-mnist-for-experts The original image is a 28x28x1 The first convolutional layer: apply convolution to a 5×5 patch Read More …
What is coinduction?
Problem Detail: I’ve heard of (structural) induction. It allows you to build up finite structures from smaller ones and gives you proof principles for reasoning about such structures. The idea is clear enough. But what about coinduction? How does it work? Read More …
A* to find the longest path in a directed cyclic graph
Problem Detail: I have written an A* algorithm to find the shortest path through a directed cyclic graph. I am trying to modify it to find the longest path through the same graph. My attempt was to write it so that Read More …
Proof of the undecidability of the Halting Problem
Problem Detail: I’m having trouble understanding the proof of the undecidability of the Halting Problem. If $H(a,b)$ returns whether or not the program $a$ halts on input $b$, why do we have to pass the code of $P$ for both $a$ Read More …
What is an Efficient Algorithm?
Problem Detail: From the point of view of asymptotic behavior, what is considered an “efficient” algorithm? What is the standard / reason for drawing the line at that point? Personally, I would think that anything which is what I might naively Read More …
How to proof that a language is not recursively enumerable
Problem Detail: How does one prove that some arbitrary language $L$ is not recursively enumerable. I know I can proof that language $L$ is recursively enumerable by constructing a Turing machine $M$ that accepts all words in the language (and the Read More …