# Questions tagged [permutation]

For questions about the functionality related to permutations in Mathematica.

175 questions
Filter by
Sorted by
Tagged with
305 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 ...
79 views

### Permutations without using the built in function in Wolfram

I suspect this is a really silly question but for the life of me, I am unable to figure out how to define a function that creates all the permutations of a given list. I know I can use the Permutation ...
82 views

25 views

89 views

### Given the permutation, permute the indices a function

How can we permute the indices of a function? Like in my case I have the permutation of three indices and I am using this code but it isn't working. I have to permute the indices of a. Thanks in ...
438 views

### How to generate all involutive permutations?

Take a finite set $S$ (i.e., a list). An involutive permutation is one that squares to the identity. How can we generate all such permutations efficiently, that is, without generating all permutations ...
49 views

### Generating list of binomial outcomes [closed]

As an example, imagine if I have a set of 3 coins and I want to generate a list of possible coin states. I know I can brutishly execute: ...
297 views

105 views

Given: ...
98 views

### Sum over permuted and unpermuted indices

I would like to write a code to evaluate the following (up to $N=20$) $\sum_{s_1,...,s_N=\pm 1;s_1 \cdot \cdot \cdot s_N=1}\sum_{\sigma\in S_N}\prod_{i=1}^N x_{\sigma(i)}^{s_i \lambda_i}$ There are ...
37 views

### Apply all possible permutations into a function [duplicate]

I need to create a function that returns all possible trebles of integers that sum up to a given number. For example, is n=2 then I need something like this: ...
90 views

### Improve quality of my code to generating list

I need to write a function that constructs a set of certain permutations of a list of an even number of entries. Below, you can see my program that gives the correct result. ...
556 views

### Programming challenge: restricted Permutations

I need to generate the set of all inequivalent permutations for a collection of objects of the form {symbol, integer}. Here is an example collection from which I ...
975 views

### Combinations of two lists of lists

I have two sets set1 = {2, 3, 4, 5}; set2 = {1, 3, 4, 5}; and I make permutations of them: ...
51 views

### How to rename the output in operations?

The problem is the following, i have 23 Cycles, every cycle have a name: ...