## 53 Replies - 3420 Views - Last Post: 10 July 2013 - 02:24 PM

### #1

# Discrete Math and Programming

Posted 07 July 2013 - 11:27 PM

##
**Replies To:** Discrete Math and Programming

### #2

## Re: Discrete Math and Programming

Posted 07 July 2013 - 11:45 PM

### #3

## Re: Discrete Math and Programming

Posted 08 July 2013 - 12:30 AM

Flukeshot, on 07 July 2013 - 11:45 PM, said:

I'm not studying a programming language. The Discrete Math book I'm talking about is like any other math book. It has content and then practice problems to solve at the end of each section.

### #4

## Re: Discrete Math and Programming

Posted 08 July 2013 - 04:30 AM

Flukeshot, on 08 July 2013 - 12:45 AM, said:

Maybe I should try this. I keep going for big project after big project. Got several done but I feel like I still haven't done a lot because I've only got like 5 things to show for years of work.

### #5

## Re: Discrete Math and Programming

Posted 08 July 2013 - 05:14 AM

There is theory and there is practice. You can study all the theory in the world and still have no ability to practically apply it. You will learn more from trying, and failing, than from passively observing someone else's success.

USC2587, on 08 July 2013 - 02:27 AM, said:

This sounds like something a math major might read. It may even have had some validity: 50 years ago. Today, well, math likes to claim all the sciences, doesn't it? Reality tends to be more messy.

Programming is doing. Reading it not doing. You can read all the books written buy all the best chess players and still suck at chess. The kid who never read any of those books but plays games in the park everyday will kick your ass.

### #6

## Re: Discrete Math and Programming

Posted 08 July 2013 - 05:40 AM

### #7

## Re: Discrete Math and Programming

Posted 08 July 2013 - 07:21 AM

So we can say that there are important areas of CS that take their basis straight from discrete math, true enough. Computer science is a big of a magpie discipline, though. There are areas that are more like engineering lore and wise-men-talking, such as design patterns and "how one should refactor", which I suppose are part of computer science. Some things that come up in a software engineering course come straight out of an MBA program (scheduling and management issues) and other things come out of psychology (UI design, more management tricks). I recognize elements from my linguistics training, and the list goes on and on.

And you also have areas where the discipline has developed its own intellectual infrastructure, which you'll see in arguments about type and scope - I think it would be hard to isolate one or several antecedent disciplines for discussions about lexical versus dynamic scoping, for example.

All that being said, it's still and always true that while theory can be very useful, what makes a programmer is writing lots and lots of programs. If your sink backs up, and you have a choice between two plumbers, do you want the guy who's read every volume ever written on Plumbing Theory, or the guy who's spent twenty years clearing stuck drains?

### #8

## Re: Discrete Math and Programming

Posted 08 July 2013 - 07:46 AM

Quote

I'm not sure that's a fair claim. Calculus was developed to deal with Physics problems. It makes sense that a class on differential equations will prepare one for physics. Certainly it's not a perfect substitute, but I found my diff eqs work to be better preparation for physics concepts than my physics classes. Mathematics also evolved to help solve economics problems. Really, the attitude in economics is if you want to do graduate level work (ie., actually be an economist for a living), go get a math degree. Sure Chemistry uses a lot of math, but I wouldn't say that math claims Chemistry.

Regarding CS, I think jon.kiparsky pretty much hit the nail on the head. The origins of CS are rooted in math, and really to a large extent EE. If one studies Theory of Computation, the circuitry crosses over with Linear Algebra, Boolean Algebras, and EE. Linguistics plays a huge role, as Jon pointed out. AI is all Graph Theory, Statistics, and Game Theory. Software Engineering is probably the only major field in CS not dominated by math at some level.

The important thing to remember about a Discrete Math textbook is that it is designed to survey Discrete Mathematics. Being well rounded is great, but you'll be missing out on a fair amount of depth. As you go along, the graph problems will really help a ton. Implement things like Dijkstra's algorithm, Prim's and Kruskal's MST algorithms, Ford-Fulkerson, etc. Write a program to bit-sieve primes, compute partitions, etc. I'm a big fan of math and theory, but make sure you use the theory to generate better solutions rather than just taking the BFI approach.

### #9

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:00 AM

USC2587, on 08 July 2013 - 01:27 AM, said:

With everything that has been said on this, I think you deserve a clear and concise answer to this:

Yes, it's a good investment provided it doesn't preclude writing programs. If you have to choose, write programs. If you can do both, do both.

### #10

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:19 AM

macosxnerd101, on 08 July 2013 - 10:46 AM, said:

Not quite. Calculus was developed. It happens to be eminently applicable to physics problems and Newton offered good examples of this.

Interestingly, the other calc guy, Leibniz, defined the modern binary number system. Oddly, he did not develop it to deal with computers.

Will a deep understanding of mathematics help you understand aspects computer science? Absolutely! Is the study of mathematics the most efficient route if your goal is to improve programming skills? No.

### #11

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:29 AM

Studying math as well as many other subjects can help you be a better programmer since the more you know the more you can write (literature or code) about. Steve Jobs credited liberal arts people with much of the important parts of the original Macintosh user interface design. Techies at the time for instance, couldn't even see a use for proportionally spaced fonts. Now they're almost everywhere.

### #12

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:31 AM

Quote

I read about that! It reminds me of Number Theory to a certain extent, which was largely thought of as useless until the development of public-key cryptography.

Quote

I would absolutely agree.

### #13

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:35 AM

baavgai, on 08 July 2013 - 10:19 AM, said:

If you really want to get pedantic, Mac's statement is not false. Newton invented calculus to model problems in physics. Leibniz invented calculus, but not to model problems in physics. Since one of the inventions of calculus was for modeling physics, it's true that "calculus was developed to deal with physics problems".

### #14

## Re: Discrete Math and Programming

Posted 08 July 2013 - 08:43 AM

CTphpnwb, on 08 July 2013 - 10:29 AM, said:

DEK released TeX in 1978, and a complete revision appeared in 1982. The Macintosh was released in 1984.

### #15

## Re: Discrete Math and Programming

Posted 08 July 2013 - 09:02 AM

jon.kiparsky, on 08 July 2013 - 11:43 AM, said:

CTphpnwb, on 08 July 2013 - 10:29 AM, said:

DEK released TeX in 1978, and a complete revision appeared in 1982. The Macintosh was released in 1984.

I wasn't saying that proportional fonts didn't exist. I was saying they didn't exist in the computers of the day and that most (nearly all) computer people couldn't see the need for them. The point being that if all you focus on is writing code then your vision will be too narrow to be useful to you or your employer.