Problem 45303. Combinatorics - 01
Solution Stats
Problem Comments
-
3 Comments
Binbin Qi
on 2 Apr 2020
I don't understand, can you explain the second rule?
Asif Newaz
on 2 Apr 2020
all combinations of x & y of length n
1. they must appear n/2 times each
2. no initial segment of the string has more y's than x's
so, 'yyxyxx' -- the 2nd rule is broken here. since 1st appearance of x contains only one x while y [the second element] contains 2.
count (1stelement) >= count (2nd element) >= count (3rd element) ..
Hope this makes it clear
Binbin Qi
on 2 Apr 2020
@Asif, thank you! I see.
Problem Recent Solvers3
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1034 Solvers
-
Given two arrays, find the maximum overlap
831 Solvers
-
85 Solvers
-
198 Solvers
-
Create logical matrix with a specific row and column sums
223 Solvers
More from this Author149
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!