Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions related to combinatorics and discrete mathematical structures
2
votes
Accepted
Conditions for a binary tree being balanced
This is an interesting question. How do we define a family of binary trees is balanced?
A generalized definition of balanced binary trees
One of the most general definitions is that the height of a …
1
vote
Accepted
Produce all unordered unique combinations of N-sized subsets of an m·N-sized set
Here is a program in Java that prints all unordered unique m-combinations of N-sized subsets of numbers from 0 inclusive to m * N exclusive. Click the run button to see some result.
The algorithm use …
6
votes
Accepted
Filling bins with pairs of balls
TL;DR -- No, there is no better strategy than the simple strategy. Here is the main idea of the proof. When there are not enough balls, there will be a "ball path" from a $k$-full bin to a bin wit …
1
vote
Can all teams in a tournament finish with the same points? If yes, how can there also be few...
A simple algorithm that let all teams finish with same points
Let $n$ teams sit around a circle evenly.
If $n$ is odd, let each team win over the next $(n-1)/2$ teams clockwise.
Otherwise $n$ is even …
0
votes
Accepted
Lexicographic permutation
First, there is one special case of $k$, the powers of 10, which are 1, 10, 100, etc. Their positions at a lexicographically ordered sequence of positive integers are fixed.
1 is always at the 1st po …
4
votes
Efficient n-choose-k random sampling
Here is the simplest algorithm, which is efficient when $k$ is much smaller than $n$ relatively.
Input: two positive integers $n$ and $k$ with $k\le n$
Output: a random permutation of $k$ integers …
0
votes
Accepted
Hiring problem from CLRS
In fact, your result is correct and that reference solution is wrong!
Here is where that reference solution goes wrong.
Since we view the candidate ranking as reading an random permutation, this …
3
votes
Accepted
Primary/Secondary On Call Rotations
Given $n$ persons, this question is about a sequence of unordered pair of persons, called a two-person schedule(TPS). A TPS is good if any of its initial contiguous subsequences satisfies the followin …
3
votes
Hard connected instances for Weisfeiler-Lehman test of isomorphism
One epic answer by David, one simplest answer by Yuval. However, there is no graphs. I mean, actual visual graphs.
Here is the famous beautiful negative instances to 1-dimensional Weisfeiler-Lehman …
1
vote
Accepted
Recover boolean vector from dot products
Here is an variant of the idea 1 in the question, where a factor of 2 is used to replace the original factor of 9.
Let $v=[2^0, 2^1, 2^2, 2^3, \cdots, 2^{62}, 2^{63}, 0, 0, 0, \cdots]^T$. Obtain $b^ …
2
votes
Accepted
The smallest periods of the prefixes of the Fibonacci word
What we need to prove are
the smallest period for $s_1$ is 1, which is trivially true.
the smallest period for $s_i$ is $F_{k-1}$ for all $F_k-1\le i\le F_{k+1}-2$, where $k\ge3$.
Let $k\ge3$.
You …
1
vote
Accepted
Why 2 different edge min-cuts in an undirected multigraph must be completely disjoint?
Why 2 different edge min-cuts in an undirected multigraph must be completely disjoint?
There is no "why" here since 2 different edge minimum-cuts in an undirected multigraph can have one edge in …