Solution of the spectra puzzle

  • Authors:
  • Robert L. Lamphere

  • Affiliations:
  • Elizabethtown Community College, Elizabethtown, KY

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2002

Quantified Score

Hi-index 0.01

Visualization

Abstract

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 "*".