Skip to main content

All Questions

9 votes
1 answer
762 views

Maximal Zero Sums Partition

You are given $n$ numbers between $-n$ and $n$, the sum of numbers is $0$. Divide the given sequence on disjoint subsequences in such a way that each subsequence has zero sum. Each element should ...
user68190's user avatar
4 votes
4 answers
1k views

Algorithm to partition sum between buckets in all unique ways

The Problem I need an algorithm that does this: Find all the unique ways to partition a given sum across 'buckets' not caring about order I hope I was clear reasonably coherent in expressing ...
Yatharth Agarwal's user avatar
4 votes
2 answers
11k views

Median of medians algorithm

I am referring to the algorithm presented here used to find a good pivot: http://en.wikipedia.org/wiki/Selection_algorithm#Linear_general_selection_algorithm_-_Median_of_Medians_algorithm My ...
user1782677's user avatar
14 votes
2 answers
5k views

For what coinage systems does a greedy algorithm not work in providing change?

For the United States coinage system, a greedy algorithm nicely allows for an algorithm that provides change in the least amount of coins. However, for a coinage system with 12 cent coins, a greedy ...
David Faux's user avatar
  • 3,445
6 votes
2 answers
2k views

How can I reduce a number?

I'm trying to work on a program and I think I've hit a math problem (if it's not, please let me know, sorry). Basically what I'm doing is taking a number and using a universe of numbers and I'm ...
Lostsoul's user avatar
  • 419
9 votes
1 answer
5k views

On problems of coins totaling to a given amount

I don't know the proper terms to type into Google, so please pardon me for asking here first. While jingling around a few coins, I realized that one nice puzzle might be to figure out which $n$ or so ...
user avatar
15 votes
5 answers
14k views

Algorithm for generating integer partitions up to a certain maximum length

I'm looking for a fast algorithm for generating all the partitions of an integer up to a certain maximum length; ideally, I don't want to have to generate all of them and then discard the ones that ...
Will Vousden's user avatar

15 30 50 per page
1 2
3