Question Detail: I want to detect cycles in an undirected graph such that I get a list of all edges/vertices which form each cycle. For a graph G({a,b,c,d}, {a-b, b-c, c-d, d-a, b-d}) this would be {a, b, c, d}, {a, Read More …
Blog
How do O and Ω relate to worst and best case?
Question Detail: Today we discussed in a lecture a very simple algorithm for finding an element in a sorted array using binary search. We were asked to determine its asymptotic compelxity for an array of $n$ elements. My idea was, that Read More …
How does one know which notation of time complexity analysis to use?
Question Detail: In most introductory algorithm classes, notations like $O$ (Big O) and $Theta$ are introduced, and a student would typically learn to use one of these to find the time complexity. However, there are other notations, such as $o$, $Omega$ Read More …
How are statistics being applied in computer science to evaluate accuracy in research claims?
Question Detail: I have noticed in my short academic life that many published papers in our area sometimes do not have much rigor regarding statistics. This is not just an assumption; I have heard professors say the same. For example, in Read More …
Find the longest path from root to leaf in a tree
Question Detail: I have a tree (in the graph theory sense), such as the following example: This is a directed tree with one starting node (the root) and many ending nodes (the leaves). Each of the edge has a length assigned Read More …
Floyd’s Cycle detection algorithm | Determining the starting point of cycle
Question Detail: I am seeking help understanding Floyd’s cycle detection algorithm. I have gone through the explanation on wikipedia (http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare) I can see how the algorithm detects cycle in O(n) time. However, I am unable to visualise the fact that once Read More …
Hash tables versus binary trees
Question Detail: When implementing a dictionary (‘I want to look up customer data by their customer IDs’), the typical data structures used are hash tables and binary search trees. I know for instance that the C++ STL library implements dictionaries (they Read More …
Why are some programming languages Turing complete but lack some abilities of other languages?
Question Detail: I came across an odd problem when writing an interpreter that (should) hooks to external programs/functions: Functions in ‘C’ and ‘C++’ can’t hook variadic functions, e.g. I can’t make a function that calls ‘printf’ with the exact same arguments Read More …
What is the novelty in MapReduce?
Question Detail: A few years ago, MapReduce was hailed as revolution of distributed programming. There have also been critics but by and large there was an enthusiastic hype. It even got patented! [1] The name is reminiscent of map and reduce Read More …
How/when is calculus used in Computer Science?
Question Detail: Many computer science programs require two or three calculus classes. I’m wondering, how and when is calculus used in computer science? The CS content of a degree in computer science tends to focus on algorithms, operating systems, data structures, Read More …