For two vectors , the Fixed Length Levenshtein distance between and is defined as the smallest number such that can be transformed to through deletions and insertions. \nFind the maximum size of the balls of radius in centered at .
[THOUGHT] The Fixed Length Levenshtein distance between two vectors of length n in is defined as the smallest such that deletions and insertions transform one vector to the other. This distance equals , where is the length of the longest common subsequence (LCS) between the vectors.
For the ball of radius 1 centered at a vector , we consider vectors such that the distance to is at most 1. This means:
- For , .
- For , , so .
The LCS occurs if and only if differs from in exactly one position. This is because:
- If differs in one position, the LCS is 99 (by keeping all elements except the differing one).
- If differs in more than one position, the LCS is at most 98 (by skipping the differing positions), so .
There are 100 positions in , and for each position, flipping the bit gives a unique differing in exactly one position. Thus, there are 100 such vectors.
The ball includes:
- The center (1 vector).
- All 100 vectors differing in exactly one position.
The total size of the ball is .
Since the space is symmetric, every ball of radius 1 has the same size. Therefore, the maximum size is 101.
Final answer:
[THOUGHT] The ball of radius 1 in centered at any vector includes:
- The center vector (1 vector).
- All vectors that differ from in exactly one position. There are 100 such positions, and flipping any one bit gives a unique vector.
The size of the ball is .
We use Python to verify the number of vectors at Hamming distance 1 from , which is 100. [/THOUGHT] [PYTHON] n = 100 print(n) [/PYTHON]