Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Strings with given frequency

Is there a sage function that gives me all vectors/strings/lists/tuples of integers with given "absolute frequency"? i.e.

dwim([2, 1]) == ["001", "010", "100"]