How to find the maximum number of vertices in a tree with respect to maximum path length and maximum degree value

Given a tree, find the maximum number of vertices $v$ in that tree using the maximum path length $p$ and a maximum degree that applies to all vertices $d$.

Assuming that I drew my test tree correctly, in the case where the path is no longer than $5$, and the vertex degree can be no higher than $3$, then the maximum number of vertices should be $14$. Is this right? I have tried other values for $p$ and $d$ and drawing the trees for them, but don't see the pattern in the data.

I don't know which formula I can use to derive the maximum number of vertices when $p$ and $d$ are unknown. I would like to know what the formula is, if it exists.

-

1 Answer

The easy case is when $p$ is even. In that case you want $d$ paths coming up from the root (level 0) and each vertex until layer $\frac p2$ has $d-1$ branches upward. This gives $1+d+(d-1)d +(d-1)^2d +\ldots d(d-1)^ {\frac p2-1}=1+d+d\frac{(d-1)^{\frac p2}-1}{d-2}$

If $p$ is odd, you can have one branch of height $\frac {p+1}2$ and all the other branches can have height $\frac {p-1}2$. You should be able to follow the above logic to get the expression in that case.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 18, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9301643967628479, "perplexity_flag": "head"}