Problem Detail: I have this java function: public int foo(ArrayList l, int n) { if(n <= 1) return l.get(0); if(l.get(0) < l.get(1)) l.remove(1); else l.remove(0); foo(l, n-1); } So I figure to show that the algorithm is correct I would use Read More …
Category: Uncategorized
[Solved]: Finding maximal factorization of regular languages
Problem Detail: Let language $mathcal{L} subseteq Sigma^*$ be regular. A factorization of $mathcal{L}$ is a maximal pair $(X,Y)$ of sets of words with $X cdot Y subseteq mathcal{L}$ $X neq emptyset neq Y$, where $X cdot Y = {xy$ | $x Read More …
[Solved]: Is lambda calculus suitable for expressing semantics of non-functional languages?
Problem Detail: Would it be convenient to express semantics of imperative languages (e.g. C) and object-oriented languages (e.g. Java) with $lambda$-calculus? Or in the other words: is $lambda$-calculus a suitable candidate for expressing semantics of all context-sensitive languages? Asked By : Petr Read More …
[Solved]: Simulating a TM with a 2-head, right moving TM
Problem Detail: Is it possible to simulate a regular Turing Machine with a TM with the following specs? There are two heads, one of which can read, one of which can write Both heads can only move right When a head Read More …
[Solved]: proving $P subseteq PCP(0,O(log(n))$
Problem Detail: I was working on proving this one and I’ve solve one direction as follows : to prove that $P subseteq PCP(0,logn)$ I said : let $M$ be deterministic polynomial TM that accepts $L in P$ ,we want to show Read More …
[Solved]: How a program is copied to RAM from harddisk
Problem Detail: I know that for executing a program, it should be copied to RAM. But the problem is whole of it may not be copied always. Since the size of the RAM is limited, there is mechanism called virtual memory. Read More …
[Solved]: Which CNF boolean formulas blow up exponentially at conversion to DNF?
Problem Detail: If I’m correct, some boolean formulas in CNF require exponential size when being converted to an equivalent DNF version (and vice versa). But what is an example of such a formula (and is there a general way to capture Read More …
[Solved]: finger search on a red black tree
Problem Detail: I’m having trouble finding materials on what ‘finger search’ is, in the context of a red black tree. Even Wikipedia has a very short page about that, could you refer me or explain what kind of search is that. Read More …
[Solved]: Removing common background in image processing phase for classification
Problem Detail: I’m trying to build a machine learning classifier that can detect which object is in an image. I have a labled training set of images and am currently in the image processing phase. Each of these images has one Read More …
[Solved]: construct a TM from a PDA
Problem Detail: Given a PDA $P=(Q,sum,delta,q_0,F)$ construct formally a TM that accepts $L(P)$. My idea is to construct a Turing machine with 2 tapes, one for the input and the other for the stack. Also to add $q_a$ for accept and Read More …