Problem Detail: So I was able to show that: $log(n!) = O(nlog n)$ without any problems. My question is when trying to prove that $log (n!) = Omega(nlog n)$. I was able to show that: $$begin{align*} log n! &= log(1 cdot Read More …
Blog
How many comparisons do we need to find min and max of n numbers?
Problem Detail: Suppose we have given a list of 100 numbers. Then How can we calculate the minimum number of comparisons required to find the minimum and the maximum of 100 numbers. Recurrence for the above problem is $$T(n)=T(lceil frac{n}{2} rceil) Read More …
Why is Uniform cost search called “uniform” cost search?
Problem Detail: By this possibly good attempt to explain this, the “uniformity” in the Uniform cost search is actually the uniformity of the heuristic function. Is this explanation correct ? If yes, then don’t all un-informed cost searches (like BFS, DFS, Read More …
NP-completeness of a spanning tree problem
Problem Detail: I was reviewing some NP-complete problems on this site, and I meet one interesting problem from NP completeness proof of a spanning tree problem In this problem, I am interested in the original problem, which the leaf set is Read More …
Dealing with intractability: NP-complete problems
Problem Detail: Assume that I am a programmer and I have an NP-complete problem that I need to solve it. What methods are available to deal with NPC problems? Is there a survey or something similar on this topic? Asked By Read More …
Can a semi-decidable problem be also decidable?
Problem Detail: As far as I understand, a semi-decidable (recursively enumerable) problem could be: decidable (recursive) or undecidable (nonrecursively enumerable) This post made me wonder if this is not conventionally followed. This is my answer to it and as far as Read More …
How does interpreting a script work?
Problem Detail: Suppose I have a script (.vbs, for example) that is stored in a file. How does the code in the file get converted into machine instructions? What is between the vbs file and the processor? Asked By : developer747 Answered Read More …
Practical applications of disjoint set datastructure
Problem Detail: I know that the disjoint set datastructure is used to keep track of the connected components of an undirected graph when the edges are added to the graph dynamically . I also know that is is used in Kruskal’s Read More …
Print bottom view of a binary tree
Problem Detail: For a binary tree we define horizontal distance as follows: Horizontal distance(hd) of root = 0 If you go left then hd = hd(of its parent)-1, and if you go right then hd = hd(of its parent)+1. The bottom Read More …
Good way to describe co-RE (co-recursively enumerable)?
Problem Detail: I get that R is a set of languages that are decidable by a Turing Machines And that RE is a set of languages that a each language can be recognized by a TM, that is the machine will Read More …