2,107 views
1 votes
1 votes
why do we count here empty string also , it has no 1's , so what's the reason for counting this ?

1 Answer

Best answer
3 votes
3 votes
Empty string does not violate the given condition. But usually we don't count that when we count the no. of strings. To avoid confusion they usually say non-empty string.
selected by

Related questions

0 votes
0 votes
1 answer
1
Sanjay Sharma asked Mar 9, 2017
1,634 views
How many bit strings of length n contains 1)at least 2) at most 3) exactly r 1's
3 votes
3 votes
2 answers
2
Akriti sood asked Nov 7, 2016
6,678 views
A palindrome is a string whose reversal is identical to the string. How many bit strings of length n are palindromes? 2⌈n⁄2⌉ 2(⌊ n/2⌋ ) 2⌈n⁄2⌉ -1 2(�...
5 votes
5 votes
1 answer
3
Vivek sharma asked Jun 28, 2015
4,944 views
How many 4-permutations of the positive integers not exceeding 100 contain three consecutive integers k, k + 1, k + 2, in the correct ordera) where these consecutive inte...
0 votes
0 votes
2 answers
4
dhruba asked Jun 5, 2023
1,150 views
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). ...