Concrete mathematics: a foundation for computer science
Concrete mathematics: a foundation for computer science
Hi-index | 0.01 |
In this paper, we solve the SPECTRA Puzzle and express the solution in terms of color-path sets. We can add, invert, and combine these sets by the addition, inverse, and the union operators, respectively. We express the solution by a mathematical formula in which we use color-path sets and its operators. To simplify the C++ implementation of the solution, we define a C++ SPECTRA class. We translate the mathematical formula into C++ code by using the SPECTRA class. The SPECTRA class contains a color-path set and the set operators. The color-path set is implemented as a linked list and the set operators are implemented by extending the C++ operators "+", "--" and "*".