The Art of Computer Programming exercise question: Chapter 1, Question 8
问题 I'm doing the exercises to TAOCP Volume 1 Edition 3 and have trouble understanding the syntax used in the answer to the following exercise. Chapter 1 Exercise 8 Computing the greatest common divisor of positive integers m & n by specifying T j ,s j ,a j ,b j Let your input be represented by the string a m b n (m a's followed by n b's) Answer: Let A = {a,b,c}, N=5. The algorithm will terminate with the string a gcd(m,n) j T j s j b j a j 0 ab (empty) 1 2 Remove one a and one b, or go to 2. 1