# Questions tagged [rank]

The tag has no usage guidance.

9 questions
Filter by
Sorted by
Tagged with
39 views

### Binary combinatorics with rank

I am looking at finding acceptable binary values with maximum 2 consecutive 1s and 0s, from a range of maximum 6 bits (2^6 values). Also, I want to rank and unrank these subset of values (in ...
27 views

### DFA for "K" bit value with max "n" consecutive "0"s and "1"s

I had posted earlier a question regarding ranking max "n" consecutive "0"s and "1"s in a "K"-bit string - Order in a subset I got clarification regarding how ...
32 views

### Finding Minimum Elements for Longest Path in Disjoint Set

I want to know the minimum number of elements needed to create a tree with the longest path having n edges. How can I approach this problem using the forest implementation of disjoint sets with union ...
1 vote
41 views

### What is the worst case time complexity of unranking n choose k combinations (combinatorial number system, combinadics)

The combinatorial number system shows that there is a bijection between the natural numbers less than $n \choose k$ and $n\choose k$ combinations. There is a greedy algorithm for unranking ...
78 views

### Find a key in a BBST for which sum of values of keys smaller then it - is maximal

I'm required to describe an implementation of a data structure that holds key,value pairs, which can be signed integers. We need to be able to init() in O(1), insert(x) in O(logn), delete(x) in O(logn)...
1 vote
151 views

### Rank of a graph in matroid theory

I was going through the concept of graphs as matroids and I came upon the rank of a graph. Wikipedia lists it as $n - c$, $n = |V|$, $c =$ # of connected components. I do understand rank and nullity ...
1 vote
84 views

### Why merge into the larger tree in union by rank

When we do union by rank we merge the smaller tree into the larger tree. I dont understand why we do this exactly?