How many bit strings with length not exceeding $n$, where $n$ is a positive integer, consist entirely of $1$'s, not counting the empty string?
How many nonempty strings with length not exceeding $n$ consist entirely of $1$'s?
-
0*consist entirely of 1s*: What do you mean by that statement ? – 2017-01-01
-
0this question is from kenneth rossen book ...i hope u read it . I did not get question so i cpy and pasted here . – 2017-01-01
-
0Wouldn't it be $n$? For string length $1, 2,...,n$ the strings would be $s,ss,...,ss..(\times n)$. – 2017-01-01
-
0right answer . Can u explain step by step or in easy word with taking n some integer ? – 2017-01-01
-
0@WiCK3DPOiSON although the question does say **not** counting the empty string. – 2017-01-01
-
0@sittian The question seems too obvious. Are you sure that is the correct question. – 2017-01-01
2 Answers
This is simply a counting matter: for a string up to length $n$ consisting only of repeats of a single character, the number of options depends only on the length of the string. So there will be $n$ non-empty strings consisting only of $1$s up to length $n$.
Effectively this is base $1$ (tally mark) number representation.
-
0sir can u help me one more question .. i m new and i further not posted more question bcz it is showing question limit is exceed . – 2017-01-01
-
0plz solve below – 2017-01-01
-
0In how many ways can a photographer at a wedding arrange six people in a row, including the bride and groom, if the bride is positioned somewhere to the left of the groom? – – 2017-01-01
-
0@sittian Accept his answer you will get the privilege to chat in math chatroom. There are people who can help you get answers to some simple questions quickly. Also try to refer and solve some example problems when solving a particular topic. – 2017-01-01
-
0@WiCK3DPOiSON good point, although I remember struggling to find the chat link when I first joined... (it's one of the links down at the bottom of the page, just below the heavy line) – 2017-01-01
-
0Lot of thanks sir. – 2017-01-01
-
0sir i need help of ur – 2017-01-11
-
0http://gateoverflow.in/10905/gate1989-1-vii-isro2015-14 – 2017-01-11
Your bit string is totally depend upon number n.
And suppose you have n = 5 then you can have strings of length 1, 2, 3, 4, 5.
So you can simply say n strings can be formed if we are excluding empty string.
Edit -
But in actual question is not the same as you are mentioning here.
You are mixing two questions. You are taking the case of excluding the non-empty string. But you are taking the answer of including non-empty string i.e n+1.
Edit -
Also see this link for the same question and the answer I am giving i.e n.
-
0Please see and tell me is it correct. Because I have some problem in understanding your question. – 2017-01-01
-
0answer is n+1 question is from kenneth rossen – 2017-01-01
-
0Is answer is n? – 2017-01-01
-
0I am wrong first. String not exceeding n so we can up to n. – 2017-01-01
-
0answer is n+1 singh sir – 2017-01-01
-
0Ok let me try this once again. – 2017-01-01
-
0I have edited my question. Hope its clear now. If any doubt please ask me. – 2017-01-01
-
0The new link I added see that also. Both links solve your confusion I hope. – 2017-01-01
-
0You got it or having any doubt? – 2017-01-01