Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Sokoban (Score 1) 322

I think I may have been a bit mistaken then, either that or I was just talking out my ass. I really appreciate the clarification, especially with a good example like that one. So, NP-Complete problems are a subset of NP-Hard which are a subset of NP?

Comment Re:Sokoban (Score 0) 322

Your definition of NP-Complete isn't quite accurate. Np-Complete isn't made by NP and NP-Hard. NP-Hard IS NP-Complete for yes/no type problems. NP-Hard == NP-Complete, and both are a subset of NP.

Think of any NP-Complete problem, such as the famous Travelling Salesman Problem: given a weighted graph G, find a minimum cost Hamiltonian Cycle on it (visit every vertex exactly once, and do it while minimizing the cost of travel). We can convert this from an optimization problem to a yes/no problem. Given a graph G and a value K, is there a Hamiltonian Cycle in G with cost less than or equal to K?

The first problem is NP-Complete, the second is NP-Hard. Essentially they're the same problem, just one outputs a number, and other outputs yes or no.

Comment Re:Depends... (Score 1) 466

If you don't mind me asking: which field do you work in? I.e. do you write mostly "business" apps or do you do any neat stuff? :P
Not meaning to offend, of course. It's just that for me personally, the fun areas of programming have all required a lot more math.

Comment Re:Depends what programming you want to do (Score 1) 466

Interesting thing, since you mentioned the P = NP problem. One area of mathematics that is making heavy progress on that problem is (for some reason) Algebraic Geometry. It seems that Mathematicians are as interested in the P = NP problem as we Computer Scientists are. I wonder who will eventually solve it, and whether they'll get a Field Medal or a Turing Award ;)

Comment Graph Theory (Score 1) 466

If I had to choose one of the two listed, I would go with the first. As a student currently finishing his CS Undergrad I can tell you that discrete maths like Combinatorics and Graph Theory will help you much more than Continuous maths like analysis and calculus. I'm not saying Calculus isn't important -- it is to an extent when you're working with the design and analysis of algorithms, but Graph Theory is something that you should not miss out on.
Graph Theory is used all over CS: it can be used to model network flow, it can be used in AI to represent search spaces, and don't forget that the majority of cool data structures fall directly from Graph Theory. If you're looking for more practical uses, think of the flow of a computer program. You can use vertices to represent states of your program such as assignments, branches, and so on. Connecting these states with edges determines the flow of your program.
Plus, overall Graph Theory is fun to do! The proofs are rigorous, but everything is very easy to visualize. If you're having trouble with a concept, in most cases it's easy to draw up a graph and see for yourself that some theorem holds. All in all, it's quite an experience, and as a Computer guy you'll definitely get more practical uses out of it.

Comment Re:wrong level of complexity (Score 1) 184

Not the grammar you're thinking of. In Computer Science grammars are used to represent languages, and the sentences that can be represented by them. For example, the language that generates all sentences of the form a^n b^n, meaning n a's followed by n b's. Grammars in this sense are a collection of rules, such as: S -> aSb We say that S is a terminal, and a and b are non-terminals. Now there are restrictions on the types of rules we can have, which creates a hierarchy of grammars, where regular grammars are on one side of the spectrum (one terminal S creates one non-terminal a), and unrestricted grammars are on the opposite side (no rules). Unrestricted grammars are obviously much more complicated to deal with, but their power is immense. Hence when the grandparent talked about using an unrestricted grammar, he meant that we don't have the power to deal with it, but if we did, hoooo boy :)

Comment Arch Linux (Score 1) 660

I have been playing around with this very minimalist distro the past few days. I can get it to go from completly shut down to a graphical login in about 35 seconds. This includes grub and everything. Getting it to boot into a text-only login will probably take less time, but I haven't benchmarked it yet.

Slashdot Top Deals

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...