We need to partition an undirected graph into connected subgraphs of size between $2$ and $k$, where $k$ is an integer.
When $k=2$, the problem is equivalent to the perfect matching problem which is known to be solvable in polynomial time.
When $k=3$, the problem is similar to the partition into triangles problem, which is proved to be NP-complete by reduction from 3-dimensional perfect matching problem. But there are two differences: first, we allow subgraphs of size 2; And second, we allow subgraphs of size 3 that contain only two edges (i.e. paths).
Is there a polynomial-time algorithm for this problem, assuming $k=3$? Assuming $k$ is fixed? Assuming $k$ is part of the input?