Assume you have a string of elements called w and b where w == 1 and b == -1. The value of the string is the sum total of adding up each w and b in the string. For example: the value of wbw is 1, and the value of wbww is 2, etc.
Rules:
1) The string is developed by adding one element at a time onto the end of the existing string.
2) You can't add more than 2 w or 2 b in a row.
3) If the string consists of an odd number of elements the difference between the number of w and the number of b can't be greater than 1.
Question:
If the string ends in b can the value of the string ever be 2, or visa versa if the string ends in w can the value of the string ever be -2?
Answer: Not that I can figure out. Can anybody develop a string to show otherwise?
Reason for asking--I'm trying to develop an algorithm to pair up players in a chess tournament according to Swiss Tournament rules and came up with this tidbit which I thought was interesting.