Questions tagged [computation-theory]

The theory of computation is the branch that deals with whether and how efficiently problems can be solved on a model of computation, using an algorithm. The field is divided into three major branches: automata theory, computability theory and computational complexity theory. [wikipedia]

The theory of computation is the branch that deals with whether and how efficiently problems can be solved on a model of computation, using an algorithm. The field is divided into three major branches: automata theory, computability theory and computational complexity theory. [wikipedia]

Note that research level questions for this tag should be asked on cstheory.SE.

626 questions
45
votes
3 answers

Is constexpr-based computation Turing complete?

We know that C++ template metaprogramming is Turing complete, but preprocessor metaprogramming is not. C++11 gives us a new form of metaprogramming: computation of constexpr functions. Is this form of computation Turing-complete? I am thinking that…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
31
votes
5 answers

Is there a difference between a "finite state machine" and a "state machine"?

I'm not sure I understand if there is a difference between a finite state machine and a state machine? Am I thinking about this too hard?
Carson
  • 17,073
  • 19
  • 66
  • 87
22
votes
2 answers

Left-Linear and Right-Linear Grammars

I need help with constructing a left-linear and right-linear grammar for the languages below? a) (0+1)*00(0+1)* b) 0*(1(0+1))* c) (((01+10)*11)*00)* For a) I have the following: Left-linear S --> B00 | S11 B --> B0|B1|011 Right-linear S --> 00B…
21
votes
4 answers

Example problems not in P nor in NP-complete but in NP

I have a course called Algorithm Analysis at college, where we're currently studying the different complexity classes -- P, NP, NP-hard etc. We've already discussed NP-complete problems as the intersection between NP and NP-hard, and P problems,…
19
votes
3 answers

Difference between Turing-Decidable and Co-Turing-Decidable

I am really struggling with understanding the difference between these two. From my textbook, it essentially describes the difference by saying a language is co-turing recognizable if it is complement of a turing-recognizable language. I guess…
Jason M.
  • 692
  • 2
  • 8
  • 24
17
votes
2 answers

Confusion about NP-hard and NP-Complete in Traveling Salesman problems

Traveling Salesman Optimization(TSP-OPT) is a NP-hard problem and Traveling Salesman Search(TSP) is NP-complete. However, TSP-OPT can be reduced to TSP since if TSP can be solved in polynomial time, then so can TSP-OPT(1). I thought for A to be…
14
votes
4 answers

Is it possible to create an HTML quine?

Per the title, is it possible to create a (non-trivial) quine in HTML? My definition of an HTML quine: A non-trivial HTML quine is one that is not null and uses at least one HTML tag, under the assumption that some string in an HTML file is…
Yuval Adam
  • 161,610
  • 92
  • 305
  • 395
14
votes
2 answers

What it means lambda calculus is equivalent to turing machine

I'm trying to wrap my head around lambda calculus, and how it relates to language, compiler and binary code. What it actually means that lambda calculus is equivalent to turing machine, and where it actually manifest itself? I don't understand how…
14
votes
3 answers

What is the difference between recursive and recursively enumerable languages

I was wondering what the difference between recursive and recursively enumerable languages is in terms of halting and Turing Machines. I know that recursively enumerable languages are a subset of recursive languages but I'm not sure about the…
13
votes
2 answers

Is { w | w <> w^R } over the alphabet {0,1} a context-free language?

I'd really love your help with this deciding whether the language of all words over the alphabet {0,1} that can't be read from both sides the same way, { w | w <> wR }, is a context-free language (that is, it can be transformed into specific grammar…
Numerator
  • 1,389
  • 3
  • 21
  • 40
13
votes
2 answers

Minimum pumping length for the following regular languages

What are the minimum pumping length for the following languages ? The empty language (01)* 10(11*0)*0 1011 011 U 0*1* Here are my solutions. Please correct me if I'm wrong. p = 0 because the language has no pumpable strings p = 2 because 01 is…
13
votes
1 answer

Are GPU shaders Turing complete

I understand that complete GPUs are behemoths of computing - including every step of calculation, and memory. So obviously a GPU can compute whatever we want - it's Turing complete. My question is in regard to a single shader on various GPUs…
Trevor
  • 1,858
  • 4
  • 21
  • 28
13
votes
2 answers

How waterproof is a Swiss cheese?

Imagine a cube-shaped piece of Swiss cheese. We model the cheese through a 20x20x20 grid. For simplicity, we assume that each grid cube consists entirely of cheese or entirely of air. On the upper side of our cube of Swiss cheese we then pour water,…
borisdiakur
  • 10,387
  • 7
  • 68
  • 100
11
votes
2 answers

what are these arrow operators in context free grammar?

I'm studying context free grammar and I'm curious what the arrow with the star and the arrow without the star mean in parts f and g where: f is false. g is true.
jfisk
  • 6,125
  • 20
  • 77
  • 113
11
votes
1 answer

How to calculate function points

This is a question about theoretical computing. I have came through a question like below; Consider a project with the following functional units : Number of user inputs = 50 Number of user outputs = 40 Number of user enquiries = 35 Number of user…
Alfred
  • 21,058
  • 61
  • 167
  • 249
1
2 3
41 42