Do we know any problem that satisfies the following criteria?
- It is polynomial-time solvable on trees.
- It is NP-complete when restricted to graphs of treewidth 2.
- The problem can be encoded only using a graph, i.e., it does not have additional structures like weights on vertices or edges, lists associated with each vertex, a collection of terminals, etc.
I am also interested in the problems that partially satisfy these criteria. For example, some of the problems here do not satisfy the first criterium but satisfy the other two. Metric Dimension satisfies 1 and 3 and is known to be NP-complete for graphs of treewidth 24. Steiner Forest satisfies the first two conditions but not the third one as the input contains an additional structure viz list of terminal pairs.