computer-science

Does an algorithm exist which can determine whether one regular language matches any input another regular language matches?

Let's say we have regular expressions: Hello W.*rld Hello World .* World .* W.* I would like to minimize the number of regexes required to match arbitrary input. To do that, I need to find if one regular expression matches any input matched by another expression. Is that possible? Billy3 ...

How do you decide what is worth your time?

I am hoping to get some good advice from the experienced developers of stack overflow on how to best spend my time. I always want to work on interesting things, but now and then the interesting things are not actually worth it... That is, they're trivial and probably not significant to the rest of the world. So I have begun to filter th...

Why are NP problems called that way (and NP-hard and NP-complete)?

Really.. I'm having the last test for graduation this Tuesday, and that's one of the things I just never could understand. I realize that a solution for NP problem can be verfied in polynomial time. But what does determinism has to do with that? And if you could explain me where NP-complete and NP-hard got their names, that would be grea...

What was your favorite programming project at university?

Hi, simply put, what was your favorite academic/hobby project you have written while you were a student? please, Choose one only :) Thanks, ...

What is the most efficient pattern/algorithm to compare two lists and find the delta between those two lists?

We have two lists, let's say students and their scores. I want to compare these two lists and find the delta between the new list and the old list, then find the least intrusive way to Insert or Update into the new list any changes. What is the best algorithm to approach this? Want to focus on minimal amount of changes to new list and...

Recognizing notes within recorded sound - Part 2 - Python

Hi folks, this is a continuation of this question here. This is the code I used in order to get the samples: spf = wave.open(speech,'r') sound_info = spf.readframes(-1) sound_info = fromstring(sound_info, 'Int16') The length of sound_info is 194560, which is 4.4 times the sample rate of 44100. The length of the sound file is 2.2 s...

Shortest path problem dijsktra with arc flags

On large graphs like 2M node road network, dijkstra can not solve shortest path problem in suitable time. We need to shortest path query execution time under 1 second and I am implementing arc flag way to make dijkstra fast. Is there anybody know about how to implement arc flags preprocessing and query. Preprocessing of arc flags has som...

Topic Suggestion for a Computer Science presentation

As a part of my undergraduate studies I have to do a presentation of 20 mins on any interesting and latest computer science topic in front of a technical audience. On searching for the same I found the following topics interesting Swarm Intelligence, Semantic Web, Ant Colony Optimization Algorithm Any suggestions of topics or referen...

What is Big O Notation?

Possible Duplicate: Plain English explanation of Big O I know Big O notation is used to assess how efficient an algorithm is, but I do not understand how you read Big O notation or what exactly how efficient an algorithm is. Can somebody perhaps explain the basics of Big O notation? Thanks. ...

Computer science - self study

Hi, I have a M.Sc. degree in physics and am working on enhancing my computer and programming skills, and I need your help deciding my next steps. As an undergraduate I took one introduction to computer science course (we used Java) and dozen of scientific computing courses (computational physics, numerical analysis, computational flui...

What are examples of Symbolic Programming?

I have to do a term project in my symbolic programming class. But I'm not really sure what a good/legitimate project would be. Can anyone give me examples of symbolic programming? Just any generic ideas because right now I'm leaning towards a turn based fight game (jrpg style basically), but I really don't want to do a game. ...

What are some uses for linked lists?

Do linked lists have any practical uses at all. Many computer science books compare them to arrays and say the main advantage is that they are mutable. However, most languages provide mutable versions of arrays. So do linked lists have any actual uses in the real world, or are they just part of computer science theory? ...

Asymptotic Growths of Functions

How to determine if a given f(n) and g(n) is in theta, omega, big oh, little omega, or little oh? - I think one way of doing it is by plotting graphs of both functions f(n) and g(n). Even by plotting graphs how do we say when a f(n) is in theta, omega, big oh, little omega, or little oh? Am not clear on that. Can someone throw more detai...

How to measure the "understandability" of a language?

Hi! I have often read that some programming languages are clear than others and I asked myself several times if there is an objective way to measure the clarity of a language in order to design, given an abstract syntax, a concrete syntax as clear and human friendly as possible. Perhaps exist some kind of designs patterns for that purpo...

How do I write a hashcode to minimise collisions?

I know the ideal hashcode algorithm is a research area, but what sensible things can I do to minimise collisions and why do they work? For example, I've seen hashcode functions that make use of prime numbers, but I'm not clear on what the benefit is... ...

Big O estimate for summing up an array

If I have an array of 1 million integers. Summing it up is considered O(n) because I have to perfom n-1 add operations. Correct ? ...

Please explain History Monoid in Simpler Terms.

I tried to read the History monoid but couldn't wrap my head around it. Could somebody please explain it in simpler terms? Thank you Reference: http://en.wikipedia.org/wiki/History_monoid ...

NP-hard problems that are not NP-complete are harder?

From my understanding, all NP-complete problems are NP-hard but some NP-hard problems are known not to be NP-complete, and NP-hard problems are at least as hard as NP-complete problems. Is that mean NP-hard problems that are not NP-complete are harder? And how it is harder? ...

Can call-with-current-continuation be implemented only with lambdas and closures?

Does anyone know if call/cc can be implemented with just lambdas and closures? It seems that call/cc interrupts the program's flow (like an exception) but lambdas and closures can't do that. Therefore I think call/cc can't be implemented via lambdas and closures. Any more ideas? ...

Maths in Programming - The Developer's guide

Possible Duplicate: Useful math for programmers I'm a 22 year old ASP.NET/C#/Front-End developer with roughly 5.5 years experience. Unlike some (well probably most) of you, I didn't go to University to do a CS degree (*sigh*). The reasons behind that are, well... complicated, so I ended up teaching myself by reading books, artic...