Discrete Math: Graphs and Trees Basics
Given a non-trivial graph G, identify an edge cut set X such that G-X is disconnected. Additionally, determine if X is a minimal or minimum edge cut, and calculate the edge connectivity of G.
Prove that in every tree, the number of edges is equal to the number of vertices minus one.
Given graphs T_1 and T_2, where the number of edges in T_1 is 17, and the number of vertices in T_2 is 2 times the number of vertices in T_1, find V_1 and E_2.
(Note: E_1 = 17, V_1 = E_1 + 1, V_2 = 2 \times V_1, E_2 = V_2 - 1)
Is it possible to have a graph where the number of vertices is equal to the number of edges plus one, but the graph is not a tree?
A graph T is a tree if and only if between every pair of distinct vertices of T there's a unique path.
A graph F is a forest if and only if between any pair of vertices in F there is at most one path.
Any tree with at least two vertices has at least two vertices of degree one.
Let T be a tree with V vertices and E edges. Then, E (the number of edges) is equal to V (the number of vertices) minus one.
Get the sum of elements of a binary tree using recursion: Calculate root's value, and for each subtree, calculate the sum of its elements until reaching the base case where the node is null.
Get the maximum value in a binary tree using recursion: For each node, determine the maximum value in the left subtree and the right subtree, then return the maximum between root's value, leftMax, and rightMax.
Get the height of a binary tree using recursion: Calculate the height of both subtrees and return 1 plus the maximum between them.
Check if a specific value exists in a binary tree using recursion: Compare with the root's value, check in the left subtree, and in the right subtree.
Reverse a binary tree using recursion: Reverse its left subtree, reverse its right subtree, and swap the left node with the right node.
Give the pre-order, in-order, and post-order traversal of the tree below.