Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some techniques I could use to help gain a better understanding of how the concepts in discrete math are used in programming?

I am trying to gain a better understanding of how discrete math concepts (e.g. set theory) are used in programming.

I am familiar with high-school mathematics and have basic understanding of the terms and concepts used in discrete mathematics

I understand languages like Haskell, Lisp, Ruby, Perl, and all C-based languages.

like image 556
Salil Avatar asked May 16 '11 02:05

Salil


1 Answers

If I were you I wouldn't buy any book.

I would write a small program for each topic in discrete math. For the topic of set theory I would write a program that perform set operations like unions, intersections, difference etc.

A simple example, take a list of customers that have bought product p1, then a list of customers that have bought product p2. Find out which customers have bought both products and which ones have bought only one product, using set theory.

Come up with your own examples, it doesn't matter if they are not real life ones.
Then, in your daily programming, when facing a new problem you will automatically realize whether you can generalize it to one of the topic in discrete (or other) math.

You can start with this page to browse for topics: Discrete math wikibook instead of buying a book.

like image 181
Trasplazio Garzuglio Avatar answered Oct 12 '22 09:10

Trasplazio Garzuglio