## Throwing dice.

Welcome back my friend! With this post I want to talk about some interesting applications of the theory of generating functions in relation to the enumeration of combinations. For this purpose let’s introduce a very simple problem: “Say we throw three regular dice, in how many ways the sum of the upper faces can be […]

## Summary for the week.

This was a very long week! Most of my free time I was at the gym or on my combinatorics book learning fancy details about the pigeonhole principle, which is very simple but with large implications in problem solving. The pigeonhole principle basically say that if you want to put three pigeon in two holes, […]

## Subsequences and Fenwick tree’s

Let’s say that we have a sequence A of 1<=n<=10^5 elements, and that this sequence may or may not be ordered but all the numbers {1…n} are present exactly once. And now given 1<=k<=10, you’re asked to find all the increasing sub-sequences of A with exactly k+1 elements. This is a problem I get from a competitive programming […]

## Count the regions!

Hi All! There’s always a plenty of things to do in this period, everybody is for some reason excited with the upcoming end of the year as if that date on that particular calendar had any meaning at all. Additionally I’m at work instead of lazing as most of the people. Anyway, I got a […]

## Counting bits! A lot of bits!

Hello! Tomorrow is an important day for me and I promised to myself that I will just chill all the day before, you know in order to keep the mind clean and fresh.. But.. I found this interesting problem and you know what, let’s work it out 🙂 The problem is: You’re given two numbers […]

## Combinatorics masturbation

I dont want to make the impression that today at work I’m bored as hell, but, probably that’s the reason why I’m writing this post instead of working on my task in order to have something to say at the tomorrow daily meeting –yep, we have DAILY meetings twice a week in our personal SCRUM piece […]