Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:03:17+00:00 2026-06-14T12:03:17+00:00

How many trees do exist with N nodes and depth M? I would like

  • 0

How many trees do exist with N nodes and depth M?
I would like to know the number of any kind of trees (simple, binary, etc.) that can be made with N nodes and depth M.

I’ve been trying to find a formula for it, but I had not succeeded so far.
Any suggestions? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:03:19+00:00Added an answer on June 14, 2026 at 12:03 pm

    Varying the number of nodes from the root to the depth “m”, considering only one path, you can have “m” nodes, and thus “m” different trees — if you exclude any i-th node from the root level to the level “m”. you’ll be excluding the entire path from i to m.

    Now, considering you can have “n” nodes inserted in breadth-first fashion, you would have the combination of the “n” nodes, since each node may differ from one another. This gives you all the combinations, of “n” nodes, “k” by “k”, for every possible “k”, whick is the same of 2^n.

    Mixing the combinations with the different number of levels, you would have various combinations for each level, since each tree structure may represent a different tree.
    All the combinations would involve the number of combinations of “n” nodes for each of the “m” levels.

    I really don’t know how to reach the final formula from this, but I would say the value you want is something close to (2^n . m!), considering that, for each possible combination of “n” nodes in a given level, there are also a set of combinations of these nodes in the m different levels.

    Just to state clear, I’m not sure of how to calculate this pricisely, this is the farthest I can reach intuitively.

    Reference to affirm k-combinations summed for all k’s.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that there are many different architectures exist. In this question I consider
I would like a has_many association that works like so: class Hood acts_as_tree has_many
I have a program that can accept a large number of valid arguments. Many
Many methods in the BCL are marked with the [MethodImpl(MethodImplOptions.InternalCall)] attribute. This indicates that
In one of my classes I have a number of methods that all draw
I have an application that stores large amount of files (XML and binary) in
say your given an instance of List[Class[_ <: Base]] , and say that many
I wonder how many ways exist to interact with the Scala compiler outside of
I know tree is a well studied structure. I'm writing a program that randomly
I have many files in a directory A . Some of those files exist

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.