4 2 1 2 2 3 2 4
249561090
For example, if the first operation chooses vertex $2$, it deletes all edges, after which each connected component has not more than two vertices, so we finish performing the operation. On the other hand, if the first operation chooses vertex $1$, there will still be a connected component with vertices $2$, $3$, and $4$, so we perform the second operation.
The expected value of the number of operations is $\frac{7}{4}$.20 10 16 8 6 2 18 3 3 12 5 1 13 9 13 19 3 11 5 13 17 6 8 14 1 16 16 20 11 15 3 10 15 4 5 18 1 7 1 17
181196154
{
"problem": {
"name": "Random Isolation",
"description": {
"content": "There is a tree with $N$ vertices numbered $1$ to $N$. The $i$\\-th edge connects vertices $A_i$ and $B_i$. Let us keep performing the following operation until each connected component of the graph ha",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc165_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a tree with $N$ vertices numbered $1$ to $N$. The $i$\\-th edge connects vertices $A_i$ and $B_i$.\nLet us keep performing the following operation until each connected component of the graph ha...",
"is_translate": false,
"language": "English"
}
]
}