0 votes 0 votes How many bit strings with length not exceeding $n$ ,where n is a positive integer ,consist entirely of $1's?$ Combinatory counting discrete-mathematics + – rtalwar asked Oct 13, 2018 edited Jun 25, 2019 by srestha rtalwar 2.3k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply vishalshrm539 commented Oct 13, 2018 reply Follow Share Is it n ? bcoz for each length, there will be only one string, consists entirely of all 1's. 0 votes 0 votes Shubhgupta commented Oct 14, 2018 reply Follow Share it will be n+1 , n for n length strings and 1 for empty string. 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes No. of NULL string $1.$ No. of $1$ length string $1.$ No. of $2$ length string $1.$ No. of $3$ length string $1.$ .................. No. of $n$ length string $1.$ Total number of string $n+1.$ srestha answered Jun 25, 2019 srestha comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments Arjun commented Jun 25, 2019 reply Follow Share n is positive integer. 1 votes 1 votes Satbir commented Jun 25, 2019 reply Follow Share I think it should be n. It is a simple counting problem why are seeing it wrt language ? Imagine if we would have question like How many words with length not exceeding n ,where n is a positive integer ,consist entirely of A's Will we consider $\epsilon$ here ? 0 votes 0 votes srestha commented Jun 25, 2019 reply Follow Share Ans of Rosen is k+1, So they might considered $0$ +ve integer too. '0' is positive integer or not, it totally depends. Sometimes it considered +ve integer too. So, yes answer also depends 0 votes 0 votes Please log in or register to add a comment.