I don't understand, can you explain the second rule?
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
@Asif, thank you! I see.
random picture with random colours
pressure to dB?
Sort numbers by outside digits
Convert a vector into a number
Create a Multiplication table matrix...
generate the matrix
Cat's paw - 01
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office