This homework should be done individually. You can start working in groups starting with Homework 1.
A tournament is a directed graph with exactly one edge between every pair of vertices. (So for each pair \((u,v)\) of vertices, either the edge from \(u\) to \(v\) or from \(v\) to \(u\) exists, but not both.) You can think of the nodes as players in a tournament, where each player has to play against every other player. The edge points from the winner to the loser of a game.
A Hamiltonian path is a sequence of directed edges, joined end to end, that visits every vertex exactly once. Prove that every tournament contains at least one Hamiltonian path.
Herr Professor Doktor Georg von den Dschungel has a 23-node binary tree, in which each node is labeled with a unique letter of the German alphabet, which is just like the English alphabet with four extra letters: Ä, Ö, Ü, and ß. (Don’t confuse these with A, O, U, and B!)
Preorder and postorder traversals of the tree visit the nodes in the following order:
(a) List the nodes in Professor von den Dschungel’s tree in the order
visited by an inorder traversal.
(b) Draw Professor von den Dschungel’s tree
Solve the following recurrences. State tight asymptotic bounds for each function in the form \(\Theta(f(n))\) for some recognizable function \(f(n)\). Assume reasonable but nontrivial base cases if none are given. Do not submit proofs—just a list of five functions—but you should do them anyway, just for practice.
The Fibonacci numbers \(F_{n}\) are defined by the recurrence \(F_{n} = F_{n-1} + F_{n-2}\), with base cases \(F_{0} = 0\) and \(F_{1} = 1\).
Prove that any non-negative integer can be written as the sum of distinct and non-consecutive Fibonacci numbers. That is, if \(F_{i}\) appears in the sum, then \(F_{i-1}\) and \(F_{i+1}\) do not appear in the sum. For example:
A perfect riffle shuffle, also known as a Faro shuffle, is performed by cutting a deck of cards exactly in half and then perfectly interleaving the two halves. There are two different types of perfect shuffles, depending on whether the top card of the resulting deck comes from the top half or the bottom half of the original deck.
An out-shuffle leaves the top card of the deck unchanged. After an in-shuffle, the original top card becomes the second card from the top. For example:
Suppose we start with a deck of \(2^n\) distinct cards, for some non-negative integer \(n\). What is the effect of performing exactly \(n\) perfect in-shuffles on this deck? Prove your answer is correct!