How many n-bit binary strings (0/1) have exactly k transitions (an adjacent pair of dissimilar bits, i.e., a 01 or a 10)?

Transitions Solution

lib/DbaDatabase.php:134: Warning: dba_replace() [<a href='function.dba-replace'>function.dba-replace</a>]: You cannot perform a modification to a database without proper access