theoretical

In Laymen's terms, what is the pumping lemma

So I saw this question and was curious as to what the Pumping Lemma was (Wikipedia wasn't much help). I understand that its basically a theoretical proof that must be true in order for a language to be in a certain class, but beyond that I don't really get it. Anyone care to try to explain it at a fairly granular level in a way underst...

Constructing regex

Hi, I use regex buddy which takes in a regex and then gives out the meaning of it from which one gets what it could be doing? On similar lines is it possible to have some engine which takes natural language input describing about the pattern one needs to match/replace and gives out the correct(almost correct) regex for that description?...

Finding prime factors to large numbers using specially-crafted CPUs

My understanding is that many public key cryptographic algorithms these days depend on large prime numbers to make up the keys, and it is the difficulty in factoring the product of two primes that makes the encryption hard to break. It is also my understanding that one of the reasons that factoring such large numbers is so difficult, is ...

Why are Redirect Results not allowed in Child Actions in Asp.net MVC 2

I have some partial actions that I render with the Asp.Net Futures RenderAction method. Some of these perform redirects after the forms in them have been processed. Now that I upgraded to Asp.Net MVC 2 RC it gives me an error "Child actions are not allowed to perform redirect actions". I checked out the source code and I found the line...

Can you encode to less bits when you don't need to preserve order?

Say you have a List of 32-bit Integers and the same collection of 32-bit Integers in a Multiset (a set that allows duplicate members) Since Sets don't preserve order but List do, does this mean we can encode a Multiset in less bits than the List? If so how would you encode the Multiset? If this is true what other examples are there wh...

Programming an infinitely fast machine with infinite memory

That is a hypothetical question. If there existed a machine with infinite memory that could execute any set of instructions within the blink of an eye, what would programming that machine be like? I remember the old days, when i wrote x<<8 + x<<6 instead of x*320 because multiplying was a little more expensive than performing two bit sh...

Any task-control algorithms programming practices?

Hi, I was just wondering if there's any field which concerns the task-control programming (or at least that's the way I call it). For a better explanation of task-control consider the following scenario: An application (master-thread) waits for a command - which might be a particular action or a set of actions the application should p...

P=NP?-Problem: What are the most promising methods?

Hello everybody, I know that P=NP has not been solved up to now, but can anybody tell me something about the following: What are currently the most promising mathematical / computer scientific methods that could be helpful to tackle this problem? Or are there even none such methods known to be potentially helpful up to now? Is there any...

Is there any difference between md5 and sha1 in this situation?

It is known that 1. if ( md5(a) == md5(b) ) 2. then ( md5(a.z) == md5(b.z) ) 3. but ( md5(z.a) != md5(z.b) ) where the dots concatenate the strings. EDIT --- Here you can find a and b: http://www.mscs.dal.ca/~selinger/md5collision/ Check these links: hexpaste.com/qzNCBRYb/1 - this is a.md5(a)."kutykurutty" hexpaste....

Why aren't (C++) virtual destructors enforced for a base class

Destructors aren't virtual by default to not hurt when its not needed, which is fine. But in case of a base class derived class scenario, is there any use case for not having a virtual destructor? If not could it be possible (does it make sense) for the compiler to complain if a class derives from a base class which has a public non vir...

Two Different Grammars Over One Set of Outputs

Hello everyone! Can you give me 2 different grammars which outputs the same set of words? Illustration: Given a grammar A and B over the alphabet {0,1}, if grammar A can produce the word 0101001, grammar B could as well. If grammar B can produce 0101111 then grammar A could as well. And if grammar A can't produce 01001 then B can neit...

Do reactive programming and pi-calculus have things in common?

Do reactive programming and pi-calculus have things in common? ...

How can be interpreted code even little efficient? (theoretical)

Hi, OK, first, I dont want any kind of flamewar here or anything like it. My bigger question is more theoretical, and will include few examples. So, as I wrote, I cannot understand how can interpreted language be even little efficient. And since its modern, I will take Java as example. Lets go back to days where there was no JIT compil...