Recurrence relation for Stirling numbers of the second kind












0












$begingroup$


I was solving a recurrence relation for Stirling numbers of the second kind:



$$S(n,k)=kS(n-1,k)+S(n-1,k-1)$$



For $k=1$ or $k=n $ $ S(n,k)=1$



For $k=0$ or $k>n $ $ S(n,k)=0$



Substitution method is not working here because at every time $k$ the value changes.
Can anyone tell me what will be the correct method for this? I just want to calculate the time complexity.










share|cite|improve this question











$endgroup$












  • $begingroup$
    I have edited abit of your question, let me know if I did it right!
    $endgroup$
    – Zacky
    Dec 20 '18 at 14:42










  • $begingroup$
    thank you very much @Zacky
    $endgroup$
    – akashking
    Dec 20 '18 at 15:06










  • $begingroup$
    Also, you want a proof for that recurrence too, or ??
    $endgroup$
    – Zacky
    Dec 20 '18 at 15:08










  • $begingroup$
    yes if you can provide me dear
    $endgroup$
    – akashking
    Dec 20 '18 at 15:14






  • 2




    $begingroup$
    It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
    $endgroup$
    – leonbloy
    Dec 20 '18 at 15:57
















0












$begingroup$


I was solving a recurrence relation for Stirling numbers of the second kind:



$$S(n,k)=kS(n-1,k)+S(n-1,k-1)$$



For $k=1$ or $k=n $ $ S(n,k)=1$



For $k=0$ or $k>n $ $ S(n,k)=0$



Substitution method is not working here because at every time $k$ the value changes.
Can anyone tell me what will be the correct method for this? I just want to calculate the time complexity.










share|cite|improve this question











$endgroup$












  • $begingroup$
    I have edited abit of your question, let me know if I did it right!
    $endgroup$
    – Zacky
    Dec 20 '18 at 14:42










  • $begingroup$
    thank you very much @Zacky
    $endgroup$
    – akashking
    Dec 20 '18 at 15:06










  • $begingroup$
    Also, you want a proof for that recurrence too, or ??
    $endgroup$
    – Zacky
    Dec 20 '18 at 15:08










  • $begingroup$
    yes if you can provide me dear
    $endgroup$
    – akashking
    Dec 20 '18 at 15:14






  • 2




    $begingroup$
    It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
    $endgroup$
    – leonbloy
    Dec 20 '18 at 15:57














0












0








0





$begingroup$


I was solving a recurrence relation for Stirling numbers of the second kind:



$$S(n,k)=kS(n-1,k)+S(n-1,k-1)$$



For $k=1$ or $k=n $ $ S(n,k)=1$



For $k=0$ or $k>n $ $ S(n,k)=0$



Substitution method is not working here because at every time $k$ the value changes.
Can anyone tell me what will be the correct method for this? I just want to calculate the time complexity.










share|cite|improve this question











$endgroup$




I was solving a recurrence relation for Stirling numbers of the second kind:



$$S(n,k)=kS(n-1,k)+S(n-1,k-1)$$



For $k=1$ or $k=n $ $ S(n,k)=1$



For $k=0$ or $k>n $ $ S(n,k)=0$



Substitution method is not working here because at every time $k$ the value changes.
Can anyone tell me what will be the correct method for this? I just want to calculate the time complexity.







combinatorics recurrence-relations stirling-numbers






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 20 '18 at 14:41









Zacky

6,6451958




6,6451958










asked Dec 20 '18 at 13:46









akashkingakashking

33




33












  • $begingroup$
    I have edited abit of your question, let me know if I did it right!
    $endgroup$
    – Zacky
    Dec 20 '18 at 14:42










  • $begingroup$
    thank you very much @Zacky
    $endgroup$
    – akashking
    Dec 20 '18 at 15:06










  • $begingroup$
    Also, you want a proof for that recurrence too, or ??
    $endgroup$
    – Zacky
    Dec 20 '18 at 15:08










  • $begingroup$
    yes if you can provide me dear
    $endgroup$
    – akashking
    Dec 20 '18 at 15:14






  • 2




    $begingroup$
    It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
    $endgroup$
    – leonbloy
    Dec 20 '18 at 15:57


















  • $begingroup$
    I have edited abit of your question, let me know if I did it right!
    $endgroup$
    – Zacky
    Dec 20 '18 at 14:42










  • $begingroup$
    thank you very much @Zacky
    $endgroup$
    – akashking
    Dec 20 '18 at 15:06










  • $begingroup$
    Also, you want a proof for that recurrence too, or ??
    $endgroup$
    – Zacky
    Dec 20 '18 at 15:08










  • $begingroup$
    yes if you can provide me dear
    $endgroup$
    – akashking
    Dec 20 '18 at 15:14






  • 2




    $begingroup$
    It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
    $endgroup$
    – leonbloy
    Dec 20 '18 at 15:57
















$begingroup$
I have edited abit of your question, let me know if I did it right!
$endgroup$
– Zacky
Dec 20 '18 at 14:42




$begingroup$
I have edited abit of your question, let me know if I did it right!
$endgroup$
– Zacky
Dec 20 '18 at 14:42












$begingroup$
thank you very much @Zacky
$endgroup$
– akashking
Dec 20 '18 at 15:06




$begingroup$
thank you very much @Zacky
$endgroup$
– akashking
Dec 20 '18 at 15:06












$begingroup$
Also, you want a proof for that recurrence too, or ??
$endgroup$
– Zacky
Dec 20 '18 at 15:08




$begingroup$
Also, you want a proof for that recurrence too, or ??
$endgroup$
– Zacky
Dec 20 '18 at 15:08












$begingroup$
yes if you can provide me dear
$endgroup$
– akashking
Dec 20 '18 at 15:14




$begingroup$
yes if you can provide me dear
$endgroup$
– akashking
Dec 20 '18 at 15:14




2




2




$begingroup$
It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
$endgroup$
– leonbloy
Dec 20 '18 at 15:57




$begingroup$
It's unclear what you are asking (esp the bit about "time complexity"). If you want the solution to the recurrence, well, see the explicit form of the Stirling numbers of the second kind , as an alternating sum. You can check that it verifies the recurrence (with the initial conditions). If you want a general recipe for solving that kind of recurrence... I doubt you'll find anything. The normal way of getting the formula is by combinatorial reasoning - and the combinatorial interpretation can be linked to the recursion also.
$endgroup$
– leonbloy
Dec 20 '18 at 15:57










1 Answer
1






active

oldest

votes


















0












$begingroup$

Welcome to MSE! The proof I know uses a Pascal argument, i.e., the set of $k$-partitions of the set $[n]={1,ldots,n}$ is divided into two sets such that $A$ is the set of $k$-partitions of $[n]$ which contain ${n}$ as an element and $B$ is the remaining set of $k$-partitions of $[n]$. Then $S(n,k) = |A|+|B|$, since both sets are disjoint.



Each element of $A$, $P={P_1,ldots,P_{k-1},{n}}$, becomes a $k-1$-partition of $[n-1]$ by deleting the element ${n}$. This gives a bijection between $A$ and the set of $k-1$-partitions of $[n-1]$, i.e., $|A|= S(n-1,k-1)$.



In view of the set $B$, each $k$-partition of $[n-1]$, $P={P_1,ldots,P_k}$, can be ''extended'' to a $k$-partition $P^{(i)}$ of $[n]$ by adding the element $n$ to one element $P_i$. The assignment $(i,P)mapsto P^{(i)}$ gives a bijection $[k]times (mbox{set of $k$-partitions of $[n-1]$})rightarrow B$. Thus $|B|=kcdot S(n-1,k)$.



As a hint, for the bijection concerning $B$ it suffices to consider $k$-partitions of $[n-1]$ in standard-form.
A partition $P={P_1,ldots,P_k}$ of $[n]$ is in standard-form if $1in P_1$ and for each $igeq 1$, $P_{i+1}$ contains the smallest number not contained in $P_1cupldotscup P_i$. E.g., if $P={{1,2},{3,6},{5,8},{4,7}}$, then $P_1={1,2}$, $P_2={3,6}$, $P_3={4,7}$, and $P_4={5,8}$.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3047552%2frecurrence-relation-for-stirling-numbers-of-the-second-kind%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    Welcome to MSE! The proof I know uses a Pascal argument, i.e., the set of $k$-partitions of the set $[n]={1,ldots,n}$ is divided into two sets such that $A$ is the set of $k$-partitions of $[n]$ which contain ${n}$ as an element and $B$ is the remaining set of $k$-partitions of $[n]$. Then $S(n,k) = |A|+|B|$, since both sets are disjoint.



    Each element of $A$, $P={P_1,ldots,P_{k-1},{n}}$, becomes a $k-1$-partition of $[n-1]$ by deleting the element ${n}$. This gives a bijection between $A$ and the set of $k-1$-partitions of $[n-1]$, i.e., $|A|= S(n-1,k-1)$.



    In view of the set $B$, each $k$-partition of $[n-1]$, $P={P_1,ldots,P_k}$, can be ''extended'' to a $k$-partition $P^{(i)}$ of $[n]$ by adding the element $n$ to one element $P_i$. The assignment $(i,P)mapsto P^{(i)}$ gives a bijection $[k]times (mbox{set of $k$-partitions of $[n-1]$})rightarrow B$. Thus $|B|=kcdot S(n-1,k)$.



    As a hint, for the bijection concerning $B$ it suffices to consider $k$-partitions of $[n-1]$ in standard-form.
    A partition $P={P_1,ldots,P_k}$ of $[n]$ is in standard-form if $1in P_1$ and for each $igeq 1$, $P_{i+1}$ contains the smallest number not contained in $P_1cupldotscup P_i$. E.g., if $P={{1,2},{3,6},{5,8},{4,7}}$, then $P_1={1,2}$, $P_2={3,6}$, $P_3={4,7}$, and $P_4={5,8}$.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Welcome to MSE! The proof I know uses a Pascal argument, i.e., the set of $k$-partitions of the set $[n]={1,ldots,n}$ is divided into two sets such that $A$ is the set of $k$-partitions of $[n]$ which contain ${n}$ as an element and $B$ is the remaining set of $k$-partitions of $[n]$. Then $S(n,k) = |A|+|B|$, since both sets are disjoint.



      Each element of $A$, $P={P_1,ldots,P_{k-1},{n}}$, becomes a $k-1$-partition of $[n-1]$ by deleting the element ${n}$. This gives a bijection between $A$ and the set of $k-1$-partitions of $[n-1]$, i.e., $|A|= S(n-1,k-1)$.



      In view of the set $B$, each $k$-partition of $[n-1]$, $P={P_1,ldots,P_k}$, can be ''extended'' to a $k$-partition $P^{(i)}$ of $[n]$ by adding the element $n$ to one element $P_i$. The assignment $(i,P)mapsto P^{(i)}$ gives a bijection $[k]times (mbox{set of $k$-partitions of $[n-1]$})rightarrow B$. Thus $|B|=kcdot S(n-1,k)$.



      As a hint, for the bijection concerning $B$ it suffices to consider $k$-partitions of $[n-1]$ in standard-form.
      A partition $P={P_1,ldots,P_k}$ of $[n]$ is in standard-form if $1in P_1$ and for each $igeq 1$, $P_{i+1}$ contains the smallest number not contained in $P_1cupldotscup P_i$. E.g., if $P={{1,2},{3,6},{5,8},{4,7}}$, then $P_1={1,2}$, $P_2={3,6}$, $P_3={4,7}$, and $P_4={5,8}$.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Welcome to MSE! The proof I know uses a Pascal argument, i.e., the set of $k$-partitions of the set $[n]={1,ldots,n}$ is divided into two sets such that $A$ is the set of $k$-partitions of $[n]$ which contain ${n}$ as an element and $B$ is the remaining set of $k$-partitions of $[n]$. Then $S(n,k) = |A|+|B|$, since both sets are disjoint.



        Each element of $A$, $P={P_1,ldots,P_{k-1},{n}}$, becomes a $k-1$-partition of $[n-1]$ by deleting the element ${n}$. This gives a bijection between $A$ and the set of $k-1$-partitions of $[n-1]$, i.e., $|A|= S(n-1,k-1)$.



        In view of the set $B$, each $k$-partition of $[n-1]$, $P={P_1,ldots,P_k}$, can be ''extended'' to a $k$-partition $P^{(i)}$ of $[n]$ by adding the element $n$ to one element $P_i$. The assignment $(i,P)mapsto P^{(i)}$ gives a bijection $[k]times (mbox{set of $k$-partitions of $[n-1]$})rightarrow B$. Thus $|B|=kcdot S(n-1,k)$.



        As a hint, for the bijection concerning $B$ it suffices to consider $k$-partitions of $[n-1]$ in standard-form.
        A partition $P={P_1,ldots,P_k}$ of $[n]$ is in standard-form if $1in P_1$ and for each $igeq 1$, $P_{i+1}$ contains the smallest number not contained in $P_1cupldotscup P_i$. E.g., if $P={{1,2},{3,6},{5,8},{4,7}}$, then $P_1={1,2}$, $P_2={3,6}$, $P_3={4,7}$, and $P_4={5,8}$.






        share|cite|improve this answer









        $endgroup$



        Welcome to MSE! The proof I know uses a Pascal argument, i.e., the set of $k$-partitions of the set $[n]={1,ldots,n}$ is divided into two sets such that $A$ is the set of $k$-partitions of $[n]$ which contain ${n}$ as an element and $B$ is the remaining set of $k$-partitions of $[n]$. Then $S(n,k) = |A|+|B|$, since both sets are disjoint.



        Each element of $A$, $P={P_1,ldots,P_{k-1},{n}}$, becomes a $k-1$-partition of $[n-1]$ by deleting the element ${n}$. This gives a bijection between $A$ and the set of $k-1$-partitions of $[n-1]$, i.e., $|A|= S(n-1,k-1)$.



        In view of the set $B$, each $k$-partition of $[n-1]$, $P={P_1,ldots,P_k}$, can be ''extended'' to a $k$-partition $P^{(i)}$ of $[n]$ by adding the element $n$ to one element $P_i$. The assignment $(i,P)mapsto P^{(i)}$ gives a bijection $[k]times (mbox{set of $k$-partitions of $[n-1]$})rightarrow B$. Thus $|B|=kcdot S(n-1,k)$.



        As a hint, for the bijection concerning $B$ it suffices to consider $k$-partitions of $[n-1]$ in standard-form.
        A partition $P={P_1,ldots,P_k}$ of $[n]$ is in standard-form if $1in P_1$ and for each $igeq 1$, $P_{i+1}$ contains the smallest number not contained in $P_1cupldotscup P_i$. E.g., if $P={{1,2},{3,6},{5,8},{4,7}}$, then $P_1={1,2}$, $P_2={3,6}$, $P_3={4,7}$, and $P_4={5,8}$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 20 '18 at 14:36









        WuestenfuxWuestenfux

        4,7001413




        4,7001413






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3047552%2frecurrence-relation-for-stirling-numbers-of-the-second-kind%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei