theory

What's the difference between incremental software process model, evolutionary model, and the spiral model ?

Hi, I am studying Software Engineering this year and I am little confused about the question in the title. Both of my professor and the reference ("Software Engineering A Practitioner Approach") differentiates the three titles as different models. However, I can't see obvious difference as their methodologies look the same to me but usi...

Object vs. class variable

This is a completely theoretical question. Suppose the following code: >>> class C: ... a = 10 ... def f(self): self.a = 999 ... >>> >>> C.a 10 >>> c = C() >>> c.a 10 >>> c.f() >>> c.a 999 At this point, is class variable C.a still accessible through the object c? ...

Graph theory questions from my Algorithms quiz today that I'd like help understanding

Today I had my algorithms quiz for the semester and I can't figure out these two questions and they've been bugging me all day. I've gone through my notes and the lecture notes and I'm still unsure. I would appreciate it if someone could take a look and provide some insight into these questions. These are not homework and I've already sa...

Trying to find an algorithm which takes 2 regular expressions and tells whether they are equivalent

I'm trying to find out what the algorithm would be by being given two languages L1 and L2 to determine if they are equivalent (L1 = L2). It's surprisingly difficult to come up with one as I've found, although I am pretty sure it needs to be converted to a DFA first and then reduce each of them to a minimal DFA.. Also, I know that if L1...

CSS metaphysics: WHY is page vertical alignment so difficult?

Relative to the page, horizontal alignment in CSS is easy - a margin:0 auto gets you by much of the time, and a text-align:center for some other cases. My question to the gurus is not how to vertically align, but why is it so much more difficult? Why isn't there margin:auto 0? I mean, from a programming perspective. Theoretically, it...

Timer Efficiency

I am planning to develop a system with tens of thousands of objects in it, which will each have up to 42(but more likely down around 4 or 5) separate actions they will potentially be performing at regular intervals. I also plan to write code that will deactivate the timers until the object comes into use. When idle, the objects will on...

Parsing poorly formatted Log files?

I'm working with some log files that are very poorly formatted, the column delimiter is an item that (often) appears within the field and it isn't escaped. For example: sam,male,september,brown,blue,i like cats, and i like dogs Where: name,gender,month,hair,eyes,about So as you can see, the about contains the column delimiter which...

Really simple Programming Languages?

Possible Duplicate: Simplest language to make an interpreter for I'm wondering what the simplest programming languages are, excluding Basic and Brainf**k? With that I mean a simple and easy to parse Syntax and a small standard library. I'm not looking at esoteric stuff, I assume "Turing completeness" is what I want. (I'm ask...

how do you prove that the big theta of a series is its leading term?

if f(x) = (An) x^n + (An-1) x^(n-1) +...+ (A1)x + (A0) how can you prove f(x) is big theta(x^n). I've thought about it and one could do it by proving that f(x) big O(x^n) and x^n big O(f(x)). I've figured out the proof for the former (using triangle inequality) but could not understand how to do the latter. Alternatively one could prov...

Why is it we can create an NPDA for a language like wwR (w of the form (a+b)*) but not ww?

wwR, where R is an exponent standing for the number of w's Is it because for ww there is no way to keep track of the letters in the first w and replicate them in the second w? ...

Is conditional branching a requirement of Turing-completeness?

I've been searching the web and I'm finding somewhat contradictory answers. Some sources assert that a language/machine/what-have-you is Turing complete if and only if it has both conditional and unconditional branching (which I guess is kind of redundant), some say that only unconditional is required, others that only conditional is req...

Help with the theory behind a pixelate algorithm?

So say I have an image that I want to "pixelate". I want this sharp image represented by a grid of, say, 100 x 100 squares. So if the original photo is 500 px X 500 px, each square is 5 px X 5 px. So each square would have a color corresponding to the 5 px X 5 px group of pixels it swaps in for... How do I figure out what this one color...

Translating a right recursive grammar into Chomsky Normal Form

I am trying to do an exercise where I translate a grammar into Chomsky normal form. I understand how to do this in normal circumstances but this time the grammar I am working with is right recursive. (Technically the grammar is the answer to the previous question, so I might just have the wrong gamma.) I think I can do this by using a ...