Where does my counting argument fails (Counting of numbers with freshness $k$)?












3














Doing some recreational math, i was trying to reproduce the combinatorial proof of the identity



$$
n^n=sum_{k=1}^nfrac{n!}{(n-k)!}cdot kcdot n^{n-k-1},,,,(*)
$$



mentioned by OP in the Question Non combinatorial proof of formula for nn
?



To be honest this shouldn't be too difficult:



the number of all sequences with length $n$ out of numbers $1,2,..,n$ is clearly $underbrace{ n cdot n...cdot n}_{n,,times}=n^n$ which establishs the l.h.s. . For the r.h.s we demand that the first $k$ numbers are distinct but that the rest of the sequence can be choosen freely as before (Denote this number by $a_k$). In the end we sum over all $a_k$. I get



$$
a_k=underbrace{ncdot(n-1)...cdot(n-k+1)}_{choose,,k,,numbers\distinct}timesunderbrace{n^{n-k}}_{choose,,n-k,,numbers\freely}\=
frac{n!}{(n-k)!}n^{n-k} ,,,,(**)
$$



But this is not the same then the terms under the summation sign in $(*)$ so what am i doing wrong?





Edit 1:



I think i got it, i have to discount for the sequences with $k'>k$ distinct numbers (they can still fall out of the random part of my product) .Is this correct?





Edit 2:



To finish this, the correct quantity is given by the difference of sequences with $k$ and $k+1$ distinct numbers:



$$
a_{k+1}-a_{k}=-frac{n!}{n^{n-k}}left(frac{1}{(n-k-1)!n}-frac{1}{(n-k)!}right)=-frac{k}{n(n-k)!}frac{n!}{n^{n-k}}
$$



Done!





Edit3:



To avoid algebra we can also reason as follows (credit to @darijgrinberg):



Add to $(**)$ the following condtion: the $k+1$ number is fixed to ne one of the numbers in the first part of the product so that we don't get a sequence with $k+1$ distinct numbers. There are $k$ possiblities. Afterwards we can choose all remaining $n-k-1$ numbers at our wish. This results in a replacement $n^{n-k}rightarrow ktimes n^{n-k-1}$










share|cite|improve this question




















  • 2




    You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
    – darij grinberg
    2 days ago










  • @darijgrinberg thanks: i was already suspecting that. See my edit!
    – tired
    2 days ago










  • @darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
    – tired
    2 days ago






  • 1




    You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
    – darij grinberg
    2 days ago










  • apart from the sign, edit 2 is correct.
    – G Cab
    2 days ago
















3














Doing some recreational math, i was trying to reproduce the combinatorial proof of the identity



$$
n^n=sum_{k=1}^nfrac{n!}{(n-k)!}cdot kcdot n^{n-k-1},,,,(*)
$$



mentioned by OP in the Question Non combinatorial proof of formula for nn
?



To be honest this shouldn't be too difficult:



the number of all sequences with length $n$ out of numbers $1,2,..,n$ is clearly $underbrace{ n cdot n...cdot n}_{n,,times}=n^n$ which establishs the l.h.s. . For the r.h.s we demand that the first $k$ numbers are distinct but that the rest of the sequence can be choosen freely as before (Denote this number by $a_k$). In the end we sum over all $a_k$. I get



$$
a_k=underbrace{ncdot(n-1)...cdot(n-k+1)}_{choose,,k,,numbers\distinct}timesunderbrace{n^{n-k}}_{choose,,n-k,,numbers\freely}\=
frac{n!}{(n-k)!}n^{n-k} ,,,,(**)
$$



But this is not the same then the terms under the summation sign in $(*)$ so what am i doing wrong?





Edit 1:



I think i got it, i have to discount for the sequences with $k'>k$ distinct numbers (they can still fall out of the random part of my product) .Is this correct?





Edit 2:



To finish this, the correct quantity is given by the difference of sequences with $k$ and $k+1$ distinct numbers:



$$
a_{k+1}-a_{k}=-frac{n!}{n^{n-k}}left(frac{1}{(n-k-1)!n}-frac{1}{(n-k)!}right)=-frac{k}{n(n-k)!}frac{n!}{n^{n-k}}
$$



Done!





Edit3:



To avoid algebra we can also reason as follows (credit to @darijgrinberg):



Add to $(**)$ the following condtion: the $k+1$ number is fixed to ne one of the numbers in the first part of the product so that we don't get a sequence with $k+1$ distinct numbers. There are $k$ possiblities. Afterwards we can choose all remaining $n-k-1$ numbers at our wish. This results in a replacement $n^{n-k}rightarrow ktimes n^{n-k-1}$










share|cite|improve this question




















  • 2




    You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
    – darij grinberg
    2 days ago










  • @darijgrinberg thanks: i was already suspecting that. See my edit!
    – tired
    2 days ago










  • @darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
    – tired
    2 days ago






  • 1




    You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
    – darij grinberg
    2 days ago










  • apart from the sign, edit 2 is correct.
    – G Cab
    2 days ago














3












3








3


1





Doing some recreational math, i was trying to reproduce the combinatorial proof of the identity



$$
n^n=sum_{k=1}^nfrac{n!}{(n-k)!}cdot kcdot n^{n-k-1},,,,(*)
$$



mentioned by OP in the Question Non combinatorial proof of formula for nn
?



To be honest this shouldn't be too difficult:



the number of all sequences with length $n$ out of numbers $1,2,..,n$ is clearly $underbrace{ n cdot n...cdot n}_{n,,times}=n^n$ which establishs the l.h.s. . For the r.h.s we demand that the first $k$ numbers are distinct but that the rest of the sequence can be choosen freely as before (Denote this number by $a_k$). In the end we sum over all $a_k$. I get



$$
a_k=underbrace{ncdot(n-1)...cdot(n-k+1)}_{choose,,k,,numbers\distinct}timesunderbrace{n^{n-k}}_{choose,,n-k,,numbers\freely}\=
frac{n!}{(n-k)!}n^{n-k} ,,,,(**)
$$



But this is not the same then the terms under the summation sign in $(*)$ so what am i doing wrong?





Edit 1:



I think i got it, i have to discount for the sequences with $k'>k$ distinct numbers (they can still fall out of the random part of my product) .Is this correct?





Edit 2:



To finish this, the correct quantity is given by the difference of sequences with $k$ and $k+1$ distinct numbers:



$$
a_{k+1}-a_{k}=-frac{n!}{n^{n-k}}left(frac{1}{(n-k-1)!n}-frac{1}{(n-k)!}right)=-frac{k}{n(n-k)!}frac{n!}{n^{n-k}}
$$



Done!





Edit3:



To avoid algebra we can also reason as follows (credit to @darijgrinberg):



Add to $(**)$ the following condtion: the $k+1$ number is fixed to ne one of the numbers in the first part of the product so that we don't get a sequence with $k+1$ distinct numbers. There are $k$ possiblities. Afterwards we can choose all remaining $n-k-1$ numbers at our wish. This results in a replacement $n^{n-k}rightarrow ktimes n^{n-k-1}$










share|cite|improve this question















Doing some recreational math, i was trying to reproduce the combinatorial proof of the identity



$$
n^n=sum_{k=1}^nfrac{n!}{(n-k)!}cdot kcdot n^{n-k-1},,,,(*)
$$



mentioned by OP in the Question Non combinatorial proof of formula for nn
?



To be honest this shouldn't be too difficult:



the number of all sequences with length $n$ out of numbers $1,2,..,n$ is clearly $underbrace{ n cdot n...cdot n}_{n,,times}=n^n$ which establishs the l.h.s. . For the r.h.s we demand that the first $k$ numbers are distinct but that the rest of the sequence can be choosen freely as before (Denote this number by $a_k$). In the end we sum over all $a_k$. I get



$$
a_k=underbrace{ncdot(n-1)...cdot(n-k+1)}_{choose,,k,,numbers\distinct}timesunderbrace{n^{n-k}}_{choose,,n-k,,numbers\freely}\=
frac{n!}{(n-k)!}n^{n-k} ,,,,(**)
$$



But this is not the same then the terms under the summation sign in $(*)$ so what am i doing wrong?





Edit 1:



I think i got it, i have to discount for the sequences with $k'>k$ distinct numbers (they can still fall out of the random part of my product) .Is this correct?





Edit 2:



To finish this, the correct quantity is given by the difference of sequences with $k$ and $k+1$ distinct numbers:



$$
a_{k+1}-a_{k}=-frac{n!}{n^{n-k}}left(frac{1}{(n-k-1)!n}-frac{1}{(n-k)!}right)=-frac{k}{n(n-k)!}frac{n!}{n^{n-k}}
$$



Done!





Edit3:



To avoid algebra we can also reason as follows (credit to @darijgrinberg):



Add to $(**)$ the following condtion: the $k+1$ number is fixed to ne one of the numbers in the first part of the product so that we don't get a sequence with $k+1$ distinct numbers. There are $k$ possiblities. Afterwards we can choose all remaining $n-k-1$ numbers at our wish. This results in a replacement $n^{n-k}rightarrow ktimes n^{n-k-1}$







combinatorics summation






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited 2 days ago







tired

















asked 2 days ago









tiredtired

10.5k12043




10.5k12043








  • 2




    You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
    – darij grinberg
    2 days ago










  • @darijgrinberg thanks: i was already suspecting that. See my edit!
    – tired
    2 days ago










  • @darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
    – tired
    2 days ago






  • 1




    You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
    – darij grinberg
    2 days ago










  • apart from the sign, edit 2 is correct.
    – G Cab
    2 days ago














  • 2




    You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
    – darij grinberg
    2 days ago










  • @darijgrinberg thanks: i was already suspecting that. See my edit!
    – tired
    2 days ago










  • @darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
    – tired
    2 days ago






  • 1




    You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
    – darij grinberg
    2 days ago










  • apart from the sign, edit 2 is correct.
    – G Cab
    2 days ago








2




2




You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
– darij grinberg
2 days ago




You don't choose the last $n-k$ numbers freely. You have to make sure that the first of them violates the distinctness condition, i.e., equals one of the preceding $k$ numbers. That's where the $k$ factor will come from.
– darij grinberg
2 days ago












@darijgrinberg thanks: i was already suspecting that. See my edit!
– tired
2 days ago




@darijgrinberg thanks: i was already suspecting that. See my edit!
– tired
2 days ago












@darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
– tired
2 days ago




@darijgrinberg do you have any idea how to see the last Formula (after edit) directly without resorting to annoying Algebra? Thx!
– tired
2 days ago




1




1




You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
– darij grinberg
2 days ago




You don't have to subtract anything. Just fix your argument as I suggested in the first comment.
– darij grinberg
2 days ago












apart from the sign, edit 2 is correct.
– G Cab
2 days ago




apart from the sign, edit 2 is correct.
– G Cab
2 days ago










1 Answer
1






active

oldest

votes


















2














I cannot tell if you already figured it out, but in case you haven't:



$$
a_k = underbrace{ncdot (n-1)cdotldotscdot (n-k+1)}_text{choose first $k$ numbers distinct}timesunderbrace{k}_{begin{array}{c}text{choose $(k+1)^{st}$ number equal to }\text{one of the first $k$ numbers}end{array}}times underbrace{n^{n-k-1}}_text{choose remaining numbers freely}
$$

The middle term must be $k$ because you need the "freshness" to be exactly $k$, meaning the first $k$ numbers are distinct, but the first $k+1$ numbers are not. Therefore, the $(k+1)^{st}$ number needs to be equal to one of the previous $k$.






share|cite|improve this answer





















  • Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
    – tired
    2 days ago






  • 1




    @tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
    – Mike Earnest
    2 days ago












  • this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
    – tired
    2 days ago








  • 1




    @tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
    – Mike Earnest
    2 days ago











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%2f3062745%2fwhere-does-my-counting-argument-fails-counting-of-numbers-with-freshness-k%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









2














I cannot tell if you already figured it out, but in case you haven't:



$$
a_k = underbrace{ncdot (n-1)cdotldotscdot (n-k+1)}_text{choose first $k$ numbers distinct}timesunderbrace{k}_{begin{array}{c}text{choose $(k+1)^{st}$ number equal to }\text{one of the first $k$ numbers}end{array}}times underbrace{n^{n-k-1}}_text{choose remaining numbers freely}
$$

The middle term must be $k$ because you need the "freshness" to be exactly $k$, meaning the first $k$ numbers are distinct, but the first $k+1$ numbers are not. Therefore, the $(k+1)^{st}$ number needs to be equal to one of the previous $k$.






share|cite|improve this answer





















  • Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
    – tired
    2 days ago






  • 1




    @tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
    – Mike Earnest
    2 days ago












  • this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
    – tired
    2 days ago








  • 1




    @tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
    – Mike Earnest
    2 days ago
















2














I cannot tell if you already figured it out, but in case you haven't:



$$
a_k = underbrace{ncdot (n-1)cdotldotscdot (n-k+1)}_text{choose first $k$ numbers distinct}timesunderbrace{k}_{begin{array}{c}text{choose $(k+1)^{st}$ number equal to }\text{one of the first $k$ numbers}end{array}}times underbrace{n^{n-k-1}}_text{choose remaining numbers freely}
$$

The middle term must be $k$ because you need the "freshness" to be exactly $k$, meaning the first $k$ numbers are distinct, but the first $k+1$ numbers are not. Therefore, the $(k+1)^{st}$ number needs to be equal to one of the previous $k$.






share|cite|improve this answer





















  • Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
    – tired
    2 days ago






  • 1




    @tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
    – Mike Earnest
    2 days ago












  • this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
    – tired
    2 days ago








  • 1




    @tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
    – Mike Earnest
    2 days ago














2












2








2






I cannot tell if you already figured it out, but in case you haven't:



$$
a_k = underbrace{ncdot (n-1)cdotldotscdot (n-k+1)}_text{choose first $k$ numbers distinct}timesunderbrace{k}_{begin{array}{c}text{choose $(k+1)^{st}$ number equal to }\text{one of the first $k$ numbers}end{array}}times underbrace{n^{n-k-1}}_text{choose remaining numbers freely}
$$

The middle term must be $k$ because you need the "freshness" to be exactly $k$, meaning the first $k$ numbers are distinct, but the first $k+1$ numbers are not. Therefore, the $(k+1)^{st}$ number needs to be equal to one of the previous $k$.






share|cite|improve this answer












I cannot tell if you already figured it out, but in case you haven't:



$$
a_k = underbrace{ncdot (n-1)cdotldotscdot (n-k+1)}_text{choose first $k$ numbers distinct}timesunderbrace{k}_{begin{array}{c}text{choose $(k+1)^{st}$ number equal to }\text{one of the first $k$ numbers}end{array}}times underbrace{n^{n-k-1}}_text{choose remaining numbers freely}
$$

The middle term must be $k$ because you need the "freshness" to be exactly $k$, meaning the first $k$ numbers are distinct, but the first $k+1$ numbers are not. Therefore, the $(k+1)^{st}$ number needs to be equal to one of the previous $k$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 2 days ago









Mike EarnestMike Earnest

20.6k11950




20.6k11950












  • Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
    – tired
    2 days ago






  • 1




    @tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
    – Mike Earnest
    2 days ago












  • this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
    – tired
    2 days ago








  • 1




    @tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
    – Mike Earnest
    2 days ago


















  • Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
    – tired
    2 days ago






  • 1




    @tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
    – Mike Earnest
    2 days ago












  • this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
    – tired
    2 days ago








  • 1




    @tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
    – Mike Earnest
    2 days ago
















Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
– tired
2 days ago




Thanks, this is exactely what i added to my Question a few seconds ago. So now i have two different Proofs relying purely on combinatorics, cool!!! :)
– tired
2 days ago




1




1




@tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
– Mike Earnest
2 days ago






@tired Indeed! Since you are doing this for recreation, let me mention one other connection. Let $f_{n,k}=binom{n}k kn^{n-k-1}$, then the formula can be written $$n^n=sum_{k=1}^n k! f_{n,k}.$$ This is interesting because $f_{n,k}$ has a combinatorial interpretation; it is the number of "rooted forests" (forest with a root in each component) on a set of size $n$ with $k$ components. This shows that a function can be described as rooted forest together with a permutation $pi$ of the roots. The correspondence is: if $v$ is a not a root, $f(v)$ is its parent; if $v$ is a root, $f(v)=pi(v)$.
– Mike Earnest
2 days ago














this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
– tired
2 days ago






this is cool indeed. I wish i would have done more of this stuff back at University. Another Thing that i found nice is to divide everything by $n^n$ and use Stirling. We then see that the probability to get sequences with freshness $k$ is given by $k/n$ for sufficently small $k/n$ ...
– tired
2 days ago






1




1




@tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
– Mike Earnest
2 days ago




@tired That probability distribution is cool, too! Letting $X_n$ be the freshness, then $P(X_n/sqrt{n}>t)to e^{-t^2/2}$ as $ntoinfty$, so $X_n$ has an asymptotically Weibull distribution. Then $E[X_n]sim sqrt{npi/2}$, so in a random function, around $sqrt{npi/2}$ elements will be contained in a cycle, meaning $f^m(x)=x$ for some $m$.
– Mike Earnest
2 days ago


















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.


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%2f3062745%2fwhere-does-my-counting-argument-fails-counting-of-numbers-with-freshness-k%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

Mario Kart Wii

The Binding of Isaac: Rebirth/Afterbirth

What does “Dominus providebit” mean?