-2
$\begingroup$

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?

  • 0
    *consist entirely of 1s*: What do you mean by that statement ?2017-01-01
  • 0
    this 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
  • 0
    Wouldn't it be $n$? For string length $1, 2,...,n$ the strings would be $s,ss,...,ss..(\times n)$.2017-01-01
  • 0
    right 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 2

2

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.

  • 0
    sir 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
  • 0
    plz solve below2017-01-01
  • 0
    In 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
  • 0
    Lot of thanks sir.2017-01-01
  • 0
    sir i need help of ur2017-01-11
  • 0
    http://gateoverflow.in/10905/gate1989-1-vii-isro2015-142017-01-11
0

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.

Original question is 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.

  • 0
    Please see and tell me is it correct. Because I have some problem in understanding your question.2017-01-01
  • 0
    answer is n+1 question is from kenneth rossen2017-01-01
  • 0
    Is answer is n?2017-01-01
  • 0
    I am wrong first. String not exceeding n so we can up to n.2017-01-01
  • 0
    answer is n+1 singh sir2017-01-01
  • 0
    Ok let me try this once again.2017-01-01
  • 0
    I have edited my question. Hope its clear now. If any doubt please ask me.2017-01-01
  • 0
    The new link I added see that also. Both links solve your confusion I hope.2017-01-01
  • 0
    You got it or having any doubt?2017-01-01