All Questions
Tagged with combinatorics algorithms
337
questions with no upvoted or accepted answers
0
votes
0
answers
318
views
Searching a Young tableau for a collection of numbers
This question is a follow up on: Searching a Young tableau.
The previous question was "How many comparisons are needed to find an element $x$ in an $n \times n$ Young tableau of distinct elements (...
0
votes
1
answer
79
views
Maximizing sum of metric function on a set (Adaptation of Hungarian Algorithm)
Suppose I have a set of unique elements $A=\{a_1, a_2, ..., a_n\}$. Suppose I also have a metric function $f:A\times A \rightarrow R^+$. I want to choose $k$ elements from $A$ (i.e. $a_{i_1},a_{i_2}, ....
0
votes
1
answer
1k
views
Project Euler Problem 338
I'm stuck on Project Euler problem 338. This is a cross post from StackOverflow where I initially posted, however, it was suggested that I post it here too since the problem mostly relies on math. The ...
-1
votes
1
answer
68
views
Lights on game algorithm
When I was a young child I was on holiday with my mother with a dutch family.
One day Dick, the family man, handed me a wooden box with some switches and lights (maybe eight, but I'm not sure) and ...
-1
votes
1
answer
93
views
Algorithm to order and partition a set of of (n,m) pairs with constraints.
I ran into this problem while looking at Google API distance matrix service.
Say you have a collection of a few million (origins, destinations) unique pairs/2 column table like (address, zip) for ...
-1
votes
1
answer
56
views
Probability of 1 at both end of string
Given a string S having N characters long and consists of only 1s and 0s.
Now given an integer K, let us pick two indexes i and j at random between 1 and N, both inclusive.
What's the probability ...
-1
votes
1
answer
2k
views
Divide N Hot dogs among M persons
There are N hot dogs and M people and we need to divide the hot dogs equally. Now we need to calculate the minimum number of cuts required to distribute the hot dogs equally.
In order to divide the ...