Let S be a subset of [n]:={1,2,...,n} such that no three numbers in S are in arithmetic progression. Prove that |S| < 0.98n, using only elementary arguments.
Consider the set of n vertices of a convex polygon. Count the number of non-crossing paths that visit all the vertices. [Src: 11011110, David Eppstein]
#exportober
You are given an array A[1..n] in which each element is at most k positions away from the position it would have been in if A was sorted. You don't know the value of k. Design an algorithm to sort the array in O(n log k) time.
#exportober
Consider the following variant of chess: In the first move only, white can opt in to make a single chess move or two consecutive chess moves; after that it is usual chess. Let's call this variant mhess.
Theorem: In mhess, white can always force at least a draw.
Take an nxn grid. Colour each square white or black in such a way that each 2x2 grid has exactly 2 white and 2 black squares.
How many ways can this be done?
Like I said, it is accessible to high school students and teachers.
Of course counting options one by one is suicidal.
Tricky math puzzle: Suppose we have a disk of diameter 20 and strips of width 1 and length 20. We can cover the disk using 20 strips by laying them side-by-side. Can we do it with 19? No cutting is allowed. My next tweet is the answer/solution. 1/6
Suppose A is the adjacency matrix of an undirected graph. Prove that the absolute value of any eigenvalue of A is less than the max. degree of the graph.
#exportober
We have an array of size n and want to pick the k smallest elements. Show that with const. probability this algo. works:
1. Color each element u.a.r with one of the k^2 colors.
2. Pick the minimum element of each color. Call this set S.
3. Pick the k smallest elements from S.
Context: The above algorithm runs in O(n k^2 log k) which is linear for small k. It adapts well if the elements in the array are seen in streaming fashion.
#exportober
On an nxn grid a few nodes are set on fire at t=0. The fire spreads like this: if at least two neighboring nodes of node x are lit, then node x will also catch fire in the next time step. What's the minimum number of nodes that have to be lit to burn the entire grid?
#exportober
The integers on the number line are colored either white, black, or red. The coloring satisfies two conditions:
1. The negative of a black number must be white.
2. The sum of two black numbers (need not be distinct) must be white.
Determine all possible colorings.
#exportober
We are given as input the vertices of a polygon P. Determine in near-linear time if P is a star. Specifically, determine if there is a point q inside P such that for every point p on the boundary of P, the line segment pq lies in the interior of P. (Src: David Mount)
#exportober
We have a campus in the shape of a perfect disk of radius 1 km. We need to open 7 coffee shops so as to minimize the farthest distance anybody has to travel to get coffee. Where should we open the shops?
[Src: Puzzle Toad]
#exportober
In a directed graph, a king is defined as a node from which all the other nodes are reachable in at most two steps. A tournament is a directed graph that has exactly one edge between any distinct pair of vertices. Prove that every tournament has a king.
#exportober