MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Binary System Problem


Frieder Schweigert wrote:
--------------------------

does anybody know an algorithm or generating system for
those binary numbers with a fix amount of '1's,
for example (four times '1'):

 1111
10111
11011
11101
11110

------------------
Try this,

BaseForm[FromDigits[#, 2], 2] & /@ Permutations[{1, 1, 1, 0, 0}]

Regards,
Ted Ersek


  • Prev by Date: Re: Solving difficult integral
  • Next by Date: RE: [Q] Extracting patterns
  • Previous by thread: Re: Binary System Problem
  • Next by thread: Re: Binary System Problem