ISourceCode

Make the frequent cases fast and the rare case correct

Problem 76 – Project Euler – How many different ways can one hundred be written as a sum of at least two positive integers?

How many different ways can one hundred be written as a sum of at least two positive integers? – Project Euler

It is possible to write five as a sum in exactly six different ways:

4 + 1
3 + 2
3 + 1 + 1
2 + 2 + 1
2 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1

How many different ways can one hundred be written as a sum of at least two positive integers?

I am guilty of writing this article as i have already written an article addressing this problem. But i made this seperate as these are problem listed on project Euler

Please Read my article on Integer Partition and Ferrers diagram

It should be noted that in Ferrers diagram the number itself is considered as one partition. But this specific problem asks for atleast 2 partitions.

One response to “Problem 76 – Project Euler – How many different ways can one hundred be written as a sum of at least two positive integers?

  1. Pingback: Readings on integer partitioning

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: