Skip to main content

New answers tagged

2 votes
Accepted

Nonintersecting lattice paths with given start and endpoints

It is not clear to me what "nonintersecting" means, I interpreted this as "vertex disjoint paths". Then, a possible solution goes as follows. ...
A. Kato's user avatar
  • 1,450
0 votes

Enumerating labeled graphs on n vertices

The idea suggested by @Szabolics in the comment is easily realized by Subsets[ ]: ...
A. Kato's user avatar
  • 1,450
1 vote

Count number of balls in each bin, given a two-element sequence of balls and bins

There are 7 balls in 5 bins: $\binom{7+5-1}{7}=\binom{11}{7}=330$. You can use IntegerPartitions and Permutations: ...
ubpdqn's user avatar
  • 62.8k
2 votes

Generate a list of the product of combinated terms in groups of 2

lst ={w11,w12,w21,w22}; Another way using Outer: ...
E. Chan-López's user avatar
3 votes

Generate a list of the product of combinated terms in groups of 2

v = Symbol @ StringRiffle[#, ""] & @* Prepend["w"] /@ Tuples[{1, 2}, {2}] {w11, w12, w21, w22} ...
eldo's user avatar
  • 81k
2 votes

Count number of balls in each bin, given a two-element sequence of balls and bins

list = {1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1}; Using SequenceSplit (new in 11.3) ...
eldo's user avatar
  • 81k

Top 50 recent answers are included