# Number of weight-balanced nodes in binary tree

I have to show that a binary tree with $$n$$ nodes has at least $$(n-1)/2$$ weight-balanced nodes and at most $$n-1$$ weight-balanced nodes. Here a node is weight-balanced if its siblings satisfy $$\operatorname{weight}(u) \leq 2\operatorname{weight}(v)$$.

So we get at least $$(n-1)/2$$ (where $$n$$ is positive and odd) if the one sibling satisfies $$\operatorname{weight}(u)≤2\operatorname{weight}(v)$$ and the other one doesn't (i.e. half of them when we disregard the root node).

And we get at most $$n-1$$ if both siblings satisfy $$\operatorname{weight}(u)≤2\operatorname{weight}(v)$$, so all nodes are weight-balanced except for the root node.

But how can I formally show that?

New contributor
parama is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• a node is weight balanced if for siblings $u$ and $v$ $weight(v) \le 2 weight(u) \le 4 weight(v)$ depends on definition: make it one. – greybeard Nov 21 at 14:13
• I don't understand the definition of weight-balanced. I'm afraid it might be a linguistic issue. – Yuval Filmus Nov 21 at 22:57
{"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": 1, "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, "katex": 0, "math-container": 9, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7294290661811829, "perplexity": 783.505839787624}, "config": {"markdown_headings": true, "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}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141186414.7/warc/CC-MAIN-20201126030729-20201126060729-00186.warc.gz"}