All Questions
10 questions
2
votes
1
answer
50
views
Is this a valid encoding of a tree structure using set theory and a valid way to extract the leaves from it?
I'm looking to formally define a tree and then extract the leaves from it in a concise way.
Does this look ok?
What is the best way of doing this?
$
Y = \{a,b,c,d,e,f,g\} \\
R = \{a \mapsto b, a \...
3
votes
1
answer
130
views
How to detect "tree-able" set-families?
A set-family (a set of sets of elements) is called tree-able if the elements can be arranged on a directed tree such that each element appears in exactly one node, and each set in the family ...
0
votes
1
answer
174
views
Disjoint Set Connected Components With Weighted Graph
I have been trying to solve this HackerRank problem (link).
The basic premise of this problem is that there is a tree with undirected, but weighted, edges. The cost of a path in this tree is taken ...
2
votes
1
answer
132
views
Suggest a Data Structure To Manage 2 Sets
I was given the following problem which really baffled me, and I would like some guidance in solving it.
I want to make a data-structure which represents two sets $A,B\subseteq \mathbb{R}$, so that I ...
3
votes
1
answer
950
views
How to read off the set represented by a van-Emde-Boas tree?
I'm reviewing my background in Algorithms and DS design. Specifically I never went through the van Emde Boas Tree. Though I can undestand the proto-vEB with related picture. I'm struggling to ...
0
votes
1
answer
196
views
Total number of calls during insertion into binary tree
The problem:
Find a formula for the total number of calls occurring during the insertion of n elements into an initially empty set. Assume that the insertion process fills up the binary search tree ...
0
votes
2
answers
1k
views
Countability of a binary tree
Problem:
We'll define a binary tree as a tree where the degree of every internal node is exactly 3. Show that the set of all binary trees is countable.
My attempt:
A set is countable if it is ...
0
votes
2
answers
35
views
Assistance with Notation in the Paper Entitled: "Search Through Systematic Set Enumeration"
So I'm reading "Search Through Systematic Set Enumeration" by Ron Rymon (currently available online for free. I'm having a problem with the notation in the following definition presented ...
-1
votes
1
answer
1k
views
Finding number of maximum independent sets in tree, using dynamic programming
I'm quite stuck trying to answer this. The problem of finding the size of the maximum independent set in a tree using dynamic programming is well documented and many solutions are around.
I've been ...
4
votes
1
answer
770
views
Algorithm for determining minimal set of covering prefixes
I have a set of strings. My goal is to find a minimal set of longest prefixes which will match most of that set.
For instance, if my set is:
...