For questions about trees in graph theory, which are connected graphs with no cycles. Also can be used for questions about forests, which are graphs that are disjoint unions of trees.

learn more… | top users | synonyms

0
votes
0answers
6 views

What is the maximum number of “root subtrees” that a tree can have?

Let $T=(V,E)$ be a directed rooted tree with root $r \in V$. A root subtree$^1$ of $T$ is a directed rooted tree $T'=(V',E')$ that fulfills the following conditions: $T'$ is a subgraph of $T$, $r ...
1
vote
1answer
18 views

How to generate (recursively?) all non-isomorphic trees with 2 types of vertex labels with degree restrictions?

I am not sure if the title makes a whole lot of sense, but what I am trying to do is generate all non-isomorphic trees that obey the following: 1) Each vertex (including leaves) has one of two labels ...
3
votes
1answer
29 views

Best way to find if a subgraph has a cycle

I am implementing Kruskal's algorithm to find a minimal spanning tree of a connected graph $G$. If $H$ is a subtree of $G$, does anyone know a smart way of checking if $H+e$, where $e$ is an edge of ...
0
votes
1answer
387 views

Min and max height of a binary tree

Suppose I have n nodes, how can I find the max and min height of a tree? I've seen varying statements for the min height such as log2 (n) and log2 (n+1) but I wasn't sure which was correct and I am ...
0
votes
0answers
8 views

Minimum spanning trees

Let $G = (V,E)$ be an directed connected graph with $|E|>1$, $w:E→R$ be an edge-weight function and $k∈{1,2,...,|E|-1}$. Sort the edge in E as $e_1,e_2,...,e_|E|$, such that $w(e_1) \leq w(e_2) ...
0
votes
1answer
21 views

In Graph to tree: name of operation where edges removed and vertex/edge additions?

The graph has tree paths IN-1-OUT, IN-2-OUT and IN-3&4-OUT between IN and OUT in the left. I want to make each path to a branch like the right. What is the name of this operation or the name ...
0
votes
5answers
44 views

Prove by induction: A tree on n≥2 vertices has ≥2 leaves

This is what I have. I'm pretty sure this is quite incorrect, but am I at least headed in the right direction? Base Case: $P(2)$: Tree on 2 vertices can only have one edge, the edge connecting the ...
0
votes
2answers
23 views

How to efficiently create balanced KD-Trees from a static set of points

From Wikipedia, KD-Trees: Alternative algorithms for building a balanced k-d tree presort the data prior to building the tree. They then maintain the order of the presort during tree construction ...
2
votes
1answer
394 views

What is the difference between a forest and a spanning forest?

If a graph is labelled as a forest it does not contain any cycles, meaning it consists of all trees, which I realize can even be a single node (since that is technically a tree). If a graph is ...
5
votes
2answers
135 views

Maps of primitive vectors and Conway's river, has anyone built this in SAGE?

I am attempting to teach number theory from John Stillwell's Elements of Number Theory in the upcoming semester. There are two sections (5.7 and 5.8) which describe the diagrammatic method for the ...
0
votes
0answers
21 views

Is the path from u to v is diameter of the tree?

The diameter of a tree is the longest (simple) path in the tree. Let u be a vertex in a tree and let v be the farthest from u vertex in T. Show that the path from u to v may not be a diameter I am ...
0
votes
0answers
15 views

Minimal spanning trees in multigraphs with constraints

I have a multigraph G whose edges have three identities. Let's say I have three colors of the edges red, blue and green and each two nodes may be connected by a red, blue and/or green edges. The graph ...
0
votes
1answer
29 views

Is there an efficient algorithm to find all the maximum matching in any tree?

A matching in a graph (G) is a set of mutually non-adjacent edges of (G). A maximum matching is a matching maxima cardinallity. A tree is an acyclic connected graph. Is there an efficient algorithm ...
1
vote
3answers
279 views

Rooted Tree and Greedy Algorithms

In a Rooted Tree, we have a message on Root. in each step, each node that has a one copy of message, can transfer this message to at most one of it's childeren. we want to use minimum step and send ...
0
votes
0answers
12 views

Minimum number of pages in a B-Tree of order n?

How can I calculate the minimum number of pages in a B tree of order n and height 3? 1st level = 1 page 2nd level = 2n+1 pages 3rd level = ? 3rd level is 1? Or how many pages?
0
votes
1answer
12 views

Completion of acyclic sub graph

Statement: Given an acyclic subgraph of a connected graph, show that this subgraph can be completed into a spanning tree of the graph. I know that there is a theorem that states that any connected ...
0
votes
2answers
25 views

Difference between Depth first search and Breadth first search algorithm

Currently I am studying Depth first search algorithm and Breadth first search algorithm. Both these algorithms are looking quite similar to me except for some differences. In BFS, we start with a ...
0
votes
0answers
11 views

Minimum Path Cover in Trees

We have a Tree with $m$ nodes and $m-1$ edges. We are given $Q$ queries. Each query consists of a list of nodes of size $k$, $[n_1, n_2, ..., n_k]$. I need to answer the minimum number of paths that ...
0
votes
0answers
17 views

Nodes lying on Same Path in Trees

Given a Treen with $n$ nodes and $n-1$ edges, I have to answer $Q$ queries. In every query, I get a list of nodes of size $k$, $n_1, n_2, ..., n_k$. I need to answer the minimum number of paths that ...
7
votes
2answers
881 views

Is the graceful labeling conjecture still unsolved?

From the Wikipedia article on graceful labeling: ... A major unproven conjecture in graph theory is the Ringel–Kotzig conjecture, named after Gerhard Ringel and Anton Kotzig, which hypothesizes that ...
1
vote
2answers
596 views

Prove through structural induction that a binary tree has an odd number of nodes

A full binary tree is a binary tree where every node has either 0 or 2 children. Prove that every non-empty full binary tree has an odd number of nodes. I dont know how to get started with this ...
0
votes
1answer
17 views

Binary Decision Trees

I know the basics to a binary decision tree, but this problem has me a little stumped, and I'm looking for some verification on my ideas. The problem is: "Create a binary decision tree that reflects ...
0
votes
1answer
24 views

Constructing a computably infinite tree with no computable infinite branches using PA

Define an infinite tree as any set of sequences closed under prefix restriction, i.e. any prefix restriction of a sequence in the set is also in the set, where a prefix restriction is a restritcion of ...
0
votes
1answer
26 views

Show that in a binary tree, if B is the number of branch points (including the root) and L is the number of leaves, then one has the relation L = 1+B

We have been discussing trees lately, but have yet to even touch on the topic of a binary tree. I understand what a leaf is, but we didn't have one for the term "branch points" Without being 100% sure ...
-1
votes
1answer
43 views

How to prove that each edge of tree is a bridge?

How to prove that each edge of tree is a bridge? My attempt: Tree is a connected graph which has no cycle, and in a connected graph, bridge is a edge whose removal disconnects the graph. Let ...
2
votes
1answer
24 views

Question about theorem with trees

I know the theorem: for an undirected graph on $n$ nodes, any of the following two imply the third: $G$ is connected $G$ does not contain a cycle $G$ has $n-1$ edges (source) ...
0
votes
0answers
15 views

Minimum biconnected graph from spanning tree algorithm

I'm thinking about if there exist an algorithm, which can build a biconnected graph from spanning tree? The problem is that it should be minimal-weight (each edge between every pair of nodes has it ...
1
vote
1answer
27 views

Minimum spanning tree of graph? proof by contradiction?

this is not a homework but I need to understand it before my exam tomorrow. How to prove by contradiction that a minimum spanning tree of a graph G is unique if all the edge weights in G are ...
1
vote
1answer
44 views

Finding the probability using a tree.

Let's say a specific exam has 3 levels (I, II, III). The candidates who pass the first exam are then eligible to take the next level of the exam. Let's say the pass rates for levels I, II, and III are ...
0
votes
1answer
12 views

Treewidth Of Graphs And Chordal Completion

https://en.wikipedia.org/wiki/Treewidth The above page explains what a tree decomposition is, and states that treewidth of G is equal to the minimum clique number, minus one, of a chordal ...
3
votes
2answers
30 views

You can always delete a vertex from a tree $G$ such that the remaining connected components have size at most $|V(G)|/2$.

I want to prove the statement in the title: for any tree on $n$ vertices, it is possible to delete a vertex such that the deletion leaves connected components with at most $n/2$ vertices each. I drew ...
1
vote
2answers
503 views

Number of binary search trees on $n$ nodes of height up to $h$

How can I find the number of binary search trees up to a given height $h$, not including BSTs with height greater than $h$ for a given set of unique numbers $\{1, 2, 3, \ldots, n\}$? For example, if ...
0
votes
0answers
9 views

Finding Height, Number of Leaves, and Value at of Each Node on Recursive Trees

I have an exam tomorrow and am struggling to understand how to get the height of a tree, the number of leaves, and the value of each node. The image is a practice exam. Any tips and help on the first ...
0
votes
0answers
18 views

Domain of Injectivity of Analytic Map

Suppose we have an analytic map $f: \mathbb{D} \to \mathbb{C}$. Then the set of points where the function is not locally injective is a discrete set. Suppose first for simplicity that the points ...
0
votes
2answers
38 views

Proving the number of leaves of a tree. (Graph Theory)

Prove that if a tree has $n$ vertices (Where $n\geq 2$)and no vertices has degree of $2$, then $T$ has at least $\frac{n+2}{2}$ leaves. Prove by contradiction Suppose that $T$ has less than ...
1
vote
1answer
540 views

Binary Tree and Overhead fraction Caluculation

Find the overhead fraction (the ratio of data space over total space) for each of the following binary tree implementations on n nodes: 2) Only leaf nodes store data; internal nodes store two child ...
1
vote
1answer
2k views

Induction Proof Check: For a binary tree T, Prove that the number of full nodes in T is always one less than the number of leaves in T.

This is a slight variant on a very common beginner's problem. I think I've got it figured out, but I wanted to make sure I actually proved what's being asked. We define a binary tree $T$: (a) A tree ...
0
votes
0answers
35 views

Diameter of subtrees

Can some one explain how this guy is calculating the centers of all subtrees in $O(n)$. I couldn't understand it. Here is the Quora link A part of his answer claims the following: 4) Find centre of ...
3
votes
1answer
43 views

Infinite graph theory: What's a tree?

Consider a finite graph $G$: $G$ is a tree if it satisfies any of the following equivalent conditions: (1) $G$ is connected and no cycle can be a subgraph of $G$. (2) $G$ is connected and no cycle ...
0
votes
0answers
10 views

number of nodes in Balance binary tree, Full binary tree Complete binary tree

How can I calculate the number the number of nodes in Balance binary tree, Full binary tree Complete binary tree? For the perfect binary Tree, I found the formula $2^{h+1}-1$.
0
votes
1answer
30 views

Verify directly that are exactly 125 labelled trees on 5 vertices.

I know Cayley's formula. However, I need to count them without using the formula. Such a tree has $5-1=4$ edges. Let the degrees of vertices be $d_1,d_2,d_3,d_4,d_5$. By handshaking lemma ...
-1
votes
1answer
18 views

Maximum number of strict binary trees that can be made, each having exactly n leaf nodes.

I am trying to evaluate(Mathematical expression) the number of strict binary trees that can be made with n leaf nodes. I already know that a strict binary tree with n leaf nodes would have exactly ...
0
votes
0answers
19 views

Uniqueness of spanning trees made using search algorithms?

For undirected graphs, the corresponding spanning trees can be obtained using various search algorithms like Depth-first search algorithm , Bredth-first algorithm, etc. I am not sure whether the ...
0
votes
1answer
56 views

Is this a Red-Black Tree?

I tried to build RBT (Red-Black Tree) via this way: I build a balanced binary search tree (much as I can) and then colored it... Now the Q is: if this is a legal RBT? At my opinion is yes, because ...
0
votes
1answer
33 views

How to define a set of trees recursively?

In particular, consider the set of integer-labelled binary trees (T). How could this set be defined in a recursive way from $\mathbb Z$ and T itself? Examples: $(-2, 1, (3, 1, 0)) \in T$ $(-1, (7, 2, ...
2
votes
1answer
44 views

How do I know when to use a Venn diagram or a probability tree? Also, when can I assume that the events are independent?

I have 2 specific problems, one 'requiring' me to use a probability tree, and the other a Venn diagram. I know that apparently the Venn diagrams can be converted into probability trees and vice versa, ...
2
votes
1answer
162 views

Find tree diameter or center

I want to find center in a graph that doesn't have cycles. I heard, that this is how I find a diameter: Take random vertex A Find such vertex B, that distance to it is maximal Find such vertex C, ...
1
vote
1answer
30 views

What function describes this problem of every possible breeding of a set of dogs?

If I have n dogs [a, b, c, ...], and I want to breed them in every possible combination (every possible binary tree made of ...
1
vote
1answer
22 views

Bounding the probability of landing at any point for a random walk on a tree

Fix $m\geq 2$ and a vertex $v_0$ in an infinite connected $2m$-regular tree, (in other words, the Cayley graph for the free group on $m$ generators) and consider the random walk on the tree starting ...
4
votes
2answers
5k views

Finding number of homeomorphically irreducible trees of degree N

There is a scene in Goodwill Hunting where professor challenges students with task of finding all homeomorphically irreducible trees of degree 10. This is discussed in many places, such as here and is ...