tLCM: Computes the largest least common multiple of all prime...

View source: R/xegaGeCodonPrecision.R

tLCMR Documentation

Computes the largest least common multiple of all prime factors of the integers in the interval 1:m for k-bit integers.

Description

For 64 bit numbers, numerically stable up to m==42. The modulo rule in grammatical evolution assigns to the choices of substitutions for a non-terminal slightly (biased) probabilities. For an integer coding, the least common multiple of all rule choices from no choice (1) to the maximal number of substitutions of a non-terminal removes this bias completely. However, whenever the prime factors of the least common multiple contain a prime different from 2, the bias cannot be removed completely for a binary gene coding. However, each additional bit used for coding approximately halves the bias.

Usage

tLCM(k)

Arguments

k

Number of bits.

Details

This could be done with the help of the function mLCM of the R-package numbers. We implement this by enumerating the vector of prime factors in 1:42.

Value

A list of three elements:

  • $k: The number of bits.

  • $m: Maximal number of substitutions for a non-terminal symbol in a grammar.

  • $mLCM: Least common multiple of the prime factors of all rule choices from 1 to $m.

See Also

Other Diagnostics: CodonChoiceBiasesDeprecated(), CodonChoiceBiases(), CodonPrecision()

Examples

  tLCM(8)
  tLCM(16)
  tLCM(32)

xegaGeGene documentation built on May 29, 2024, 8:48 a.m.

Related to tLCM in xegaGeGene...