| Problem 1 The Bank of Oslo issues two types of coin: aluminum (denoted A) and bronze (denoted B). Marianne has  aluminum coins and  bronze coins arranged in a row in some arbitrary initial order. A chain is any subsequence of consecutive coins of the same type. Given a fixed positive integer  , Marianne repeatdly performs the following operation: he identifies the longest chain containing the  coin from the left and moves all coins in that chain to the left and moves all coins in that chain to the left end of the row. For example, if  and  , the process starting from the ordering  would be  
 Find all pairs
  with  such that for every initial ordering, at some moment during the process, the leftmost  coins will all be of the same type.
 | 
 
 | Solution Define a word to be a sequence of  s and  s representing Marianne's row of coins. 
 We claim that the answer is all ordered pairs
  such that  
 First, for
  clearly both  and  work. 
 Now, assume that
  and  We first show that all such ordered pairs  don't work. If the word started with    s followed by a  then clearly Marianne's operation never changes the word, so all such ordered pairs  don't work. 
 We now show that all ordered pairs
  with  don't work. Consider the word  where the first string of  s has length  the first string of  s has length  the second string of  s has length  and the second string of  s has length  Note that since    Denote this word by  where  denotes the  string of the word. Then, because of the bounds on  Marianne's operation would result in the process  which never results in a situation where the  leftmost coins are the same type. 
 Now we tackle the case where
  and  Define the score of a word to be the number of instances of two consecutive letters being  or  For instance, the score of  is  and the score of  is  We present a claim. 
 Claim: Under Marianne's operation, the score of a word never decreases. To do so, we use the following lemma:
 
 Lemma: When we join at least two chains of the same letter together to form a large chain, the score of the large chain is larger than the sum of the scores of the smaller chains.
 
 Proof: Let the lengths of the smaller chains be
  Note that the score of a chain with length  is  so the sum of the scores of the smaller chains is  However, the composition of these chains has length  so its score is  and since  by assumption, the lemma is proven. 
 When Marianne performs her operation, none of the initial chains are broken, and there may be linkings of chains of the same letter to form larger chains. Combining this observation with our lemma, our claim is proven.
 
 Again using our lemma, we see that the words of fixed length
  with the largest score are  and  where each string of  s and  s has length  
 Now, we are ready to show that all ordered pairs
  such that  work. It suffices to show that there isn't a word  (other than  and  ) such that, no matter how many operations Marianne performs on  the score of  doesn't increase. 
 Assume for the sake of contradiction that such a
  exists. Let the leftmost letter of the chain Marianne moves during her first operation be the  letter of  and the rightmost letter of the chain she is moving be the  letter of  WLOG, let this chain contain  s. If  and  then the  letter of  and the  letter of  are  s by the assumption that the chain is optimal. Then, when Marianne moves the chain, the  s are joined together, and by our lemma, this increases the score of  Hence, either  or  
 Now, we split into cases.
 
 Case 1:
  Then, clearly  as the maximum length of the chain is  Hence  However, this implies that  where each string of  s and  has length  contradicting the assumption that  wasn't  where string of  s and  s has length  
 Case 2:
  Then, clearly  as the maximum length of the chain is  Hence  However, this implies that  where each string of  s and  s has length  contradicting the assumption that  wasn't  where each string of  s and  s has length  
 Case 3:
  As in case    Additionally, the length of any chain that Marianne moves cannot have length  because if a chain Marianne moves did have length  the word formed would start with  instances of the same letter. Let  where the  s are the strings of identical letters in  
 At every moment, the chain Marianne moves must contain the both the
  letter and the  letter. Hence every chain Marianne moves must have length at least  letters. Additionally, since the chain Marianne moves must contain the  letter and be of maximal length, the chains Marianne moves must be  in that order. We thus have that each  has length at least  but less than  
 However, this leads to a contradiction! A subset of the
  s must contain all of the    s, but this is impossible if every  has length at least  but less than  This is because    s would contain more than  letters, while    would contain less than  letters. 
 We are done.
 |