Problem Detail: Now I tried tackling this question from different perspectives (and already asked a couple of questions here and there), but perhaps only now can I formulate it well and ask you (since I have no good ideas). Let there Read More …
Category: Uncategorized
[Solved]: Recursive function calculating number of ways to sum $a + 2 b + 3 c = x$
Problem Detail: Using python need to code a recursive function with one input and no global integers that calculates the number of options to get $x$ using $a*1+b*2+c*3$. Say $x=3$, there are four options: $lbrace (1,1,1),(1,2),(2,1),(3)rbrace$. Asked By : yuvalz Answered By Read More …
[Solved]: Calculating time complexity of a code which may be incorrect
Problem Detail: I am a sophomore taking a course in algorithm analysis. We were asked by our professor to calculate time-complexity of several C functions, but some of them were incorrect and would result in a compile error. As far as Read More …
[Solved]: Lower bound for sorting n arrays of size k each
Problem Detail: Given $n$ arrays of size $k$ each, we want to show that at least $Omega(nk log k)$ comparisons are needed to sort all arrays (indepentent of each other). My proof is a simple modification of the decision tree argument Read More …
[Solved]: How can there be 10 steps in the binary search algorithm for the phone book search problem?
Problem Detail: The following example was given in an online lecture I was watching. A phone directory is 1000 pages long, and we have to find the name “Zurich Smith”. The algorithm is as follows: Split the phone directory into half. Read More …
[Solved]: Recurrence Problem $T(n) = 3T(n/3) + n$
Problem Detail: My question here is dealing with the residual that I get. We are trying to prove $T(n) = 3T(n/3) + n$ is $O(n*log n)$. So where I get is $T(n) le cn[log n – log 3] + n$. So Read More …
[Solved]: Probabilistic test of matrix multiplication with one-sided error
Problem Detail: Given three matrices $A, B,C in mathbb{Z}^{n times n}$ we want to test whether $AB neq C$. Assume that the arithmetic operations $+$ and $-$ take constant time when applied to numbers from $mathbb{Z}$. How can I state an Read More …
[Solved]: MinHeap represented by an array – two simple statements
Problem Detail: I’m trying to prove/disprove two statements. I just want to make sure with you I’m on the right line. These are the following statements: Preface : Let A[n] be an array of min-heap (a min-heap represented by an array], Read More …
[Solved]: TSP genetic algorithm: what mutation function for adjacency representation?
Problem Detail: When implementing TSP GA I decided for adjacency representation (i.e. $j$ value in $i$-th index means that node $j$ goes right after node $i$), as it enables interesting heuristical crossover operation (see Greffenstette, 1985). However this source, like many Read More …
[Solved]: Shannon Entropy to Min-Entropy
Problem Detail: In many papers I’ve read that it is well known that the Shannon entropy of a random variable can be converted to min-entropy (up to small statistical distance) by taking independent copies of the variable. Can anyone explain to Read More …