Problem Detail: I am using neural networks to predict a time series. The question I’m facing now is how do I encode date/time/serial no. of each input set as an input to the neural network? Should I use 1 of C Read More …
Author: ignougroup
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 …
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 …
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 …
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 …
Confused about proof that $log(n!) = Theta(n log n)$
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 …
Why is ‘Manhattan distance’ a better heuristic for 15 puzzle than ‘number of tiles misplaced’?
Problem Detail: Consider two heuristics $h_1$ and $h_2$ defined for the 15 puzzle problem as: $h_1(n)$ = number of misplaced tiles $h_2(n)$ = total Manhatten distance Could anyone tell why $h_2$ is a better heuristic than $h_1$? I would like to Read More …
When are two simulations not a bisimulation?
Problem Detail: Given a labelled transition system $(S,Lambda,to)$, where $S$ is a set of states, $Lambda$ is a set of labels, and $tosubseteq StimesLambdatimes S$ is a ternary relation. As usual, write $p stackrelalpharightarrow q$ for $(p,alpha,q)into$. The labelled transition $pstackrelalphato Read More …
Why is the optimal cut-off for switching from Quicksort to Insertion sort machine dependent?
Problem Detail: I fail to understand why cut off value would be system dependent, and not a constant. From Princeton University website Cutoff to insertion sort. As with mergesort, it pays to switch to insertion sort for tiny arrays. The optimum Read More …
How long does the Collatz recursion run?
Problem Detail: I have the following Python code. def collatz(n): if n <= 1: return True elif (n%2==0): return collatz(n/2) else: return collatz(3*n+1) What is the running-time of this algorithm? Try: If $T(n)$ denotes the running time of the function collatz(n). Read More …