Results 1 to 5 of 5
Like Tree1Thanks
  • 1 Post By Plato

Thread: How many possibilities are there for dividing a string to substrings, of any length?

  1. #1
    Member
    Joined
    Nov 2012
    From
    israel
    Posts
    164
    Thanks
    2

    How many possibilities are there for dividing a string to substrings, of any length?

    Hi.
    I just can wrap my head around this.

    Let S be a string of length n:

    $\displaystyle S=\sigma_1\sigma_2... \sigma_n$

    how many possibilities are there for dividing it to substrings?
    for example:
    $\displaystyle S_1=\sigma_1\sigma_2\hspace{12pt} S_2=\sigma_3...\sigma_i\hspace{12pt} S_3=\sigma_{i+1}...\sigma_n$
    is one division, and:
    $\displaystyle S_1=\sigma_1 \hspace{12pt}S_2=\sigma_2...\sigma_n$
    is another.
    how many like that are there?

    I can't think of anything and could really use some help here.
    Thanks in anvanced!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Nov 2012
    From
    israel
    Posts
    164
    Thanks
    2

    Re: How many possibilities are there for dividing a string to substrings, of any leng

    Never mind...
    found it.
    It's $\displaystyle 2^{n-1}$
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Aug 2006
    Posts
    21,743
    Thanks
    2814
    Awards
    1

    Re: How many possibilities are there for dividing a string to substrings, of any leng

    Quote Originally Posted by Stormey View Post
    Let S be a string of length n:
    $\displaystyle S=\sigma_1\sigma_2... \sigma_n$
    how many possibilities are there for dividing it to substrings?
    for example:
    $\displaystyle S_1=\sigma_1\sigma_2\hspace{12pt} S_2=\sigma_3...\sigma_i\hspace{12pt} S_3=\sigma_{i+1}...\sigma_n$
    is one division, and:$\displaystyle S_1=\sigma_1 \hspace{12pt}S_2=\sigma_2...\sigma_n$
    is another. how many like that are there?
    Here is one string $\displaystyle S=\sigma_1\sigma_2... \sigma_n$.

    You gave another: $\displaystyle S_1=\sigma_1{\color{red}|}~S_2=\sigma_2... \sigma_n$

    We can "move" the $\displaystyle {\color{red}|}$ to $\displaystyle n-2$ positions on the original string to get a total of $\displaystyle n-1$ decompositions of into two strings.

    Now put two $\displaystyle {\color{red}|,~|}$ to $\displaystyle \binom{n-1}{2}$ positions on the original string to get a total of $\displaystyle \binom{n-1}{2}$ decompositions of into three strings.

    In fact you can put as many as $\displaystyle n-1$ of those red bars into the original string. Add them up.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Nov 2012
    From
    israel
    Posts
    164
    Thanks
    2

    Re: How many possibilities are there for dividing a string to substrings, of any leng

    Hi Plato, thanks for the help.

    according to what you're saying, it's $\displaystyle \sum_{k=0}^{n-1}\binom{n-1}{k}$, which is $\displaystyle 2^{n-1}$.
    Last edited by Stormey; Nov 14th 2013 at 08:28 AM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor

    Joined
    Aug 2006
    Posts
    21,743
    Thanks
    2814
    Awards
    1

    Re: How many possibilities are there for dividing a string to substrings, of any leng

    Quote Originally Posted by Stormey View Post
    according to what you're saying, it's $\displaystyle \sum_{k=0}^{n-1}\binom{n-1}{k}$, which is $\displaystyle 2^{n-1}$.
    Yes exactly.
    It is well known that $\displaystyle \sum_{k=0}^{N}\binom{N}{k}=2^{N}$.
    That is the number of subsets of a set of N elements.
    Thanks from Stormey
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 13
    Last Post: May 12th 2011, 04:32 AM
  2. Bit String Length
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: Dec 3rd 2009, 11:19 AM
  3. How many different possibilities?
    Posted in the Statistics Forum
    Replies: 0
    Last Post: Nov 16th 2009, 02:37 PM
  4. possibilities
    Posted in the Statistics Forum
    Replies: 2
    Last Post: Sep 20th 2009, 04:09 AM
  5. Length of string around circular rod
    Posted in the Geometry Forum
    Replies: 8
    Last Post: Dec 15th 2008, 10:13 AM

Search Tags


/mathhelpforum @mathhelpforum