17

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.

Salil
  • 9,534
  • 9
  • 42
  • 56
  • I feel like SQL / Relational Algebra makes great use of set theory. You should look at it -- it's pretty cool when you don't have to think about performance, because you can use it to find all sorts of cool relations, and when that doesn't work, you could move to Datalog/Prolog. – Ehtesh Choudhury May 21 '11 at 10:02

1 Answers1

5

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.

Trasplazio Garzuglio
  • 3,535
  • 2
  • 25
  • 25
  • thanks. What you say makes sense. But I imagine there are plenty of people like you and me who would want to see discrete math "in action" during day-to-day programming and some authors must have addressed this need in the form of a book. Actually, some professors have written books to teach 'discrete mathematics for computer science'. I am just hoping to find one that is easily digestible and close to my daily programming tasks. – Salil May 24 '11 at 07:30