Catalan Unrank

A binary sequence is called totally balanced if the number of zeros is at least as large as the number of ones as you traverse , and the total counts are equal. If has length , this implies and .
For ones there are totally balanced binary sequences, where is the th Catalan number.
The sorted list of balanced binary sequences for starts with 00001111 and ends with 01010101.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.