Skip to main content

All Questions

3 votes
2 answers
178 views

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

Model 1 Consider the permutation list of 4-bit-strings: list = Permutations[{0, 0, 1, 1}, {4}] which outputs: {{0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, ...
wonderich's user avatar
  • 923
5 votes
6 answers
694 views

String permutation

I have a string "abcd". Is there any way in Mathematica such that when I apply some exchange operator $P^{ab}$ it gives me string "bacd"? Edit: After reading answers I felt like I ...
user824530's user avatar
-3 votes
1 answer
78 views

Permutation Combinations Mobile Pattern Codes [closed]

Please help write codes to determine 4 to 6 dot patterns. I am stuck after permutations input. It would really help if one could write direct so I could copy paste code to determine list of 4 to 6 dot ...
VIJIT's user avatar
  • 1
12 votes
5 answers
420 views

StringContainsQ, but anywhere in order

I am trying to find a string within a string, but "anywhere", so long as it is in the right order. For example StringContainsQ["aabbc","ac"] returns ...
apg's user avatar
  • 2,195
7 votes
3 answers
429 views

dictionary lookups of words composed of specified characters

I am trying to find all English words composed of specified characters. For example, all words composed of one or more of the following: ...
Michael Stern's user avatar
4 votes
1 answer
362 views

Permute list of strings

Say I have a list of strings like slist={"apple","123","Car"} What I want is a list of all permutations of slist. The result ...
Drakonomikon's user avatar
6 votes
3 answers
3k views

neighbor swapping distance between two strings

Updated Problem Description I have a collection of strings $S$ that only contain two (or $m$ in general) kinds of elements: in this case C and D. For all $s\in S$, the length is the same, the number ...
wdg's user avatar
  • 1,189