A New Algorithm for Generating Gray Code: Chinese Rings Approach
ISEF · 2019 Systems Software
Overview
A Gray Code sequence is a set of 2^n binary numbers in which only one bit changes between two consecutive elements. This property helps in reduce errors in data transmission and is commonly used in rotary mechanical and optical encoding devices. Its application also extends to software engineering, such as 3D imaging scanning. However, Gray Code sequences have to be converted to binary or decimal when used in mathematical computations or for display purpose which may take time especially for a large number of n. In this project a new and revolutionary algorithm is introduced that can directly convert decimal number to Gray Code and not involving previous sequence with no recursive is needed. In traditional Gray Code conversion, it includes XOR or using mirroring method to generate the sequence. The process must first include the conversion of binary number. This new algorithm is inspired by the Chinese Rings Puzzle. The Gray Code sequence can be regarded as a set of reserved n Chinese Ring solution and a set of n -1 Chinese Ring solution. The unique algorithm is further fitted into the Gros Sequence to verify its correctness and completeness. By running the algorithm in a computer program, this new algorithm is 40% faster in generating Gray Code Sequence than traditional methods. It is hoped that when the new algorithm is used in future digital engineering applications, much faster data process can be achieved.
Competition history
- ISEF 2019
Resources
Related projects
ISEF · 2020
Generating Gray Code with Double Chinese Rings Algorithm
ISEF · 2021
An innovative Conversion from Decimal to Gray Code: Inspired by Chinese Rings
ISEF · 2015
Single-Track Gray Codes: An Efficiently Decodable Maximum Period General Construction and Extensions
ISEF · 2017
Novel Application of Collatz-like Sequences to Cryptographically Secure Pseudo-Random Number Generation
Closest projects by meaning, across every fair and year in the corpus.
Source: Regeneron International Science and Engineering Fair