单词 | Gray Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
释义 | Gray CodeAn encoding of numbers so that adjacent numbers have a single Digit differing by 1. A Binary Gray code with Digits corresponds to a Hamiltonian Path on an -D Hypercube (including direction reversals). The term Gray code is often used to refer to a ``reflected'' code, or more specifically still, the binary reflected Gray code. To convert a Binary number to its corresponding binary reflected Gray code, start at theright with the digit (the th, or last, Digit). If the is 1, replace by ; otherwise,leave it unchanged. Then proceed to . Continue up to the first Digit , which is kept the same since is assumed to be a 0. The resulting number is the reflected binary Gray code. To convert a binary reflected Gray code to a Binary number, start again with the thdigit, and compute If is 1, replace by ; otherwise, leave it the unchanged. Next compute and so on. The resulting number is the Binary number corresponding to the initial binaryreflected Gray code. The code is called reflected because it can be generated in the following manner. Take the Gray code 0, 1. Write it forwards,then backwards: 0, 1, 1, 0. Then append 0s to the first half and 1s to the second half: 00, 01, 11, 10. Continuing, write 00,01, 11, 10, 10, 11, 01, 00 to obtain: 000, 001, 011, 010, 110, 111, 101, 100, ... (Sloane's A014550). Each iteration thereforedoubles the number of codes. The Gray codes corresponding to the first few nonnegative integers are given in the followingtable.
The binary reflected Gray code is closely related to the solution of the Towers of Hanoias well as the Baguenaudier. See also Baguenaudier, Binary, Hilbert Curve, Ryser Formula, Thue-Morse Sequence,Towers of Hanoi
Gardner, M. ``The Binary Gray Code.'' Ch. 2 in Knotted Doughnuts and Other Mathematical Entertainments. New York: W. H. Freeman, 1986. Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. ``Gray Codes.'' §20.2 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 886-888, 1992. Sloane, N. J. A. Sequence A014550in ``The On-Line Version of the Encyclopedia of Integer Sequences.''http://www.research.att.com/~njas/sequences/eisonline.html. Vardi, I. Computational Recreations in Mathematica. Redwood City, CA: Addison-Wesley, pp. 111-112 and 246, 1991. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
随便看 |
|
数学辞典收录了8975条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。