Here’s one that popped into my mind when I was thinking about binary search. I’m thinking of an integer between 1 and n. You have to guess my number. You win as soon as you guess the correct number. If your guess is not correct, I’ll give you a hint by saying “too high” or […]

This has been asked at least twice here, but both questions have accepted answers which are wrong. I don’t really know any good way to draw attention to the question besides asking again and being a bit more careful about not accepting incorrect or incomplete answers, so here goes. Say I am standing at the […]

I am referring to the algorithm presented here used to find a good pivot: http://en.wikipedia.org/wiki/Selection_algorithm#Linear_general_selection_algorithm_-_Median_of_Medians_algorithm My question is I don’t quite understand why the elements have to be divided specifically into groups of 5. Why not some other number?

I’m looking for an algorithm but I don’t quite know how to implement it. More importantly, I don’t know what to google for. Even worse, I’m not sure it can be done in polynomial time. Given a set of numbers (say, {1, 4, 5, 9}), I want to enumerate all subsets of this set (its […]

In a recent discussion, I came across the idea of proving a lower bound for the number of comparisons required to find the largest element in an array. The bound is $n – 1$. This is so because the set of comparisons performed by every such algorithm looks like a tournament tree, which always has […]

Intereting Posts

Can the composition of two non-invertible functions be invertible?
Combinatorial Proof Of A Number Theory Theorem–Confusion
Value of $ \cos 52^{\circ} + \cos 68^{\circ} + \cos 172^{\circ} $?
Prove inequality: $\sum \frac{a^4}{a^3+b^3} \ge \frac{a+b+c}{2}$
Number of non-isomorphic non-abelian groups of order 10
Question on calculating hypercohomology
What is the intuitive relationship between SVD and PCA
Every bounded non countable subset of $\mathbb{R}$ has a bothsided accumulation point.
$\operatorname{span}(x^0, x^1, x^2,\cdots)$ and the vector space of all real valued continuous functions on $\Bbb R$
What's the deal with empty models in first-order logic?
Solving the recurrence $T(n) = 2T\left(\frac{n}{2}\right) + \frac{n}{2}\log(n)$
Proving that there are at least $n$ primes between $n$ and $n^2$ for $n \ge 6$
Number of triangles inside given n-gon?
Prove $n^2 > (n+1)$ for all integers $n \geq 2$
The fractional part of $n\log(n)$