Skip to main content
5 votes

Select a subset in the bit-strings with even 1s overlapped - thank you

list = Permutations[{0, 0, 1, 1}, {4}] (* {{0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}} *) Compute which ...
Roman's user avatar
  • 47.5k
5 votes

Convert integer to words of specific length

...
Syed's user avatar
  • 54.5k
5 votes
Accepted

Period of repeating decimal

As written on MathWorld, you can use RealDigits. ...
Domen's user avatar
  • 25.3k
3 votes

Checking if a number is right sorted

Using SequenceCount f = SequenceCount[Rest @ IntegerDigits[#], x_ /; LessEqual @@ x] == 1 &; f /@ {51369, 51396} {True, ...
eldo's user avatar
  • 70.7k
3 votes

Convert integer to words of specific length

Update ...
user1066's user avatar
  • 18.4k
3 votes

Convert integer to words of specific length

...
lericr's user avatar
  • 28.3k
2 votes

Select a subset in the bit-strings with even 1s overlapped - thank you

If you want to find all pairs that have even overlap: Select[Tuples[list, 2], EvenQ@*Apply[overlap]] But you said We expect the answer is {{0, 0, 1, 1}, {1, 1, 0, ...
lericr's user avatar
  • 28.3k
2 votes

Convert integer to words of specific length

Get ways of expressing the number sum as len digits between 1 and 26: ...
ydd's user avatar
  • 3,748
2 votes

Convert integer to words of specific length

A 2-liner? ...
Roland F's user avatar
  • 3,637
2 votes

Period of repeating decimal

To illustrate NestWhileList ...
ubpdqn's user avatar
  • 60.9k
2 votes

Checking if a number is right sorted

Using Split: f = Length@Split[Rest@IntegerDigits[#], LessEqual] == 1 &; f /@ {51369, 51396} (*{True, False}*)
E. Chan-López's user avatar
1 vote

Ignoring text when converting strings of text to numbers

Using the three-argument form of Interpreter to provide a default value (here, Indeterminate) in case of failure: ...
Roman's user avatar
  • 47.5k

Only top scored, non community-wiki answers of a minimum length are eligible