Recent

Author Topic: indexind combinations function - math problem  (Read 2304 times)

Laur

  • New Member
  • *
  • Posts: 35
Re: indexind combinations function - math problem
« Reply #15 on: June 27, 2024, 05:44:03 pm »
TS is talking about combinations (https://en.wikipedia.org/wiki/Combination).

And here is some theory how to solve his problem: https://en.wikipedia.org/wiki/Combinatorial_number_system.

OK.
It's probably good... anyway, I guessed it myself.

iC = i << 1 + j << 1 + ... // where << = shl

for any combinations of numbers 01234... ie from 0 not 1.

additionaly we don't use N.

Thancs. :)
« Last Edit: June 27, 2024, 05:45:57 pm by Laur »

 

TinyPortal © 2005-2018