## What constitutes one operation/cycle/move in the RAM model?

I saw a RAM model diagram that displayed an input tape, output tape, the program (read-only), the instruction pointer, and the memory registers. However, when I look at questions of time complexity, it is relevant how much time the program needs to spend on one action. Say you want to read one integer symbol from … Read more

## How can one simulate a PDA with a FIFO queue PDA?

I’m trying to figure out how a pushdown automata (PDA), which we know uses a stack (LIFO) can be simulated by a queue (FIFO). I understand that in a regular PDA, we only have access to the top most element which can be popped. When we push something, it goes to the top of the … Read more

## Robustness of Turing Machines – 3 dimensional case

How can one show that a machine with a three dimensional memory arranged in an infinite grid can be simulated by a single-tape Turing machine? I’d imagine there’s some sort of mapping possible from three dimensional coordinates to single coordinates (eg. (0,0,0) -> 0, (1,0,0) -> 1, (-1,0,0) -> 2, …) but I can’t figure … Read more

## Matching Lemma with infinitely many symbols

I was reading about Universal Turing Machines. I see that the matching lemma states, that between two symbols X and Y, if there are only 1-s and blanks, then a TM exists, which can count the number of ones. This is used to match strings of ones between two tapes. Now I wonder, would there … Read more

## On-line simulation of a two-head tape Turing machine using single-head tape(s)

I have a question and I haven’t been able to figure out the answer yet. I need to do the on-line simulation of a two-head tape Turing machine using single-head tape(s). I’ve found some online articles for the fact that one single-head tape doesn’t suffice for this problem and the simulation should be done using … Read more

## Is a Turing Machine that only takes strings of the form 0∗0^* Turing Complete?

You have a Turing machine that only processes input on the form 0∗. If it is given an input without 0’s, it will simply halt without accepting or do anything else. Is it Turing Complete? The set 0∗ is countably infinite, since you can make the bijective function f(x):0∗→N: f(x)=length(x) Where length(x) is the length … Read more

## Coq — non-terminating programs [duplicate]

This question already exists: Are there programming languages that allow the expression of exactly all terminating algorithms? [duplicate] Closed 7 years ago. People usually say Coq does not allow writing non-terminating functions. I have a question regarding that. Does Coq allow writing exactly all terminating functions? In other words, what are the completeness and soundness … Read more

## Can a two-stack PDA accept language anbmcndma^nb^mc^nd^m which is not context-free?

Can a two-stack PDA accept language L={anbmcndm∣n≥m}, which has no context-free grammar? I don’t believe this has a context-free grammar, but please correct me if I’m wrong. Answer A two-stack PDA is equivalent in computing power to a Turing machine. Since a Turing machine can accept that language (stated without proof), a two-stack PDA can … Read more

## Parallel merge sort using hypercube connection template

I’ve been reading about hypercube connection template for parallel algorithms. The general scheme is explained in Designing and Building Parallel Programs by Ian Foster and it’s pretty clear. What I don’t understand is how it’s applied on the merge sort in §11.4 The point I’m most interested is the parallel_merge function in the pseudocode, i.e. … Read more

## Can a Multi-Tape Turing Machine have an infinite number of tapes?

So if k is the number of tapes, is a multi-tape Turing machine allowed to have k = ∞ tapes. I’d assume not since this would give an infinite transition function? Answer You need a finite number of tapes. The proofs that show the equivalence between multi-tape TM and one-band TM rely on the fact … Read more