Skip to main content
Notice removed Reward existing answer by Albert Hendriks
Bounty Ended with Yuval Filmus's answer chosen by Albert Hendriks
Tweeted twitter.com/StackCompSci/status/827620869379854336
Notice added Reward existing answer by Albert Hendriks
Bounty Started worth 50 reputation by Albert Hendriks
deleted 42 characters in body
Source Link

imho this is not at all a duplicate, because the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function. Also I don't know how to write this as a Taylor expansion. If I would, I would still not know how to solve this specific instance.

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

edit: stackexchange wants me to explain that this question is different than the "possible duplicate". I don't know how to write this a Taylor expansion. If I would, I would still not know how to solve this specific instance. Also, the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function.

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

edit: stackexchange wants me to explain that this question is different than the "possible duplicate". I don't know how to write this a Taylor expansion. If I would, I would still not know how to solve this specific instance. Also, the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function.

imho this is not at all a duplicate, because the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function. Also I don't know how to write this as a Taylor expansion. If I would, I would still not know how to solve this specific instance.

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

added 395 characters in body
Source Link

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

edit: stackexchange wants me to explain that this question is different than the "possible duplicate". I don't know how to write this a Taylor expansion. If I would, I would still not know how to solve this specific instance. Also, the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function.

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.

edit: stackexchange wants me to explain that this question is different than the "possible duplicate". I don't know how to write this a Taylor expansion. If I would, I would still not know how to solve this specific instance. Also, the other question does not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$, which appears to be part of the Taylor expansion of this function.

Source Link

Can the output value be solved and/or written as Taylor expansion?

Consider the following function. Maybe it could be more efficient, but I'm only interested in the output value, not the runtime complexity. All variables are whole numbers.

function branch(currentDepth, maxDepth, n, k) {
    if (currentDepth == maxDepth) {
        return n;
    }
    sum = 0;
    for (i=0; i<=k; i++) {
        tmpN = branch(currentDepth+1, maxDepth, n, i);
        sum += branch(currentDepth+1, maxDepth, tmpN, k-i);
    }
    return sum;
}

For $2 < k << n$ and $2 < d = O(\log n)$, is there a formula in terms of $d$, $k$ and $n$ (either exact, big-O or Theta), that predicts the output for

branch(0, d, n, k);

Will it be exponential in $n$? Can we maybe solve this for small $k$? ($k\le7$).

Application: the output value is a factor of the runtime complexity of a Fixed Parameter algorithm I made up, but I don't think it will beat existing algorithms. However I still wanted this solved.