Questions tagged [computability]

83 questions
1
vote
1 answer

Why do we define equivalent turing machines as two turing machines with the same accepted languages?

From many textbooks about computability, I see how we define equivalent turing machines as follows: Two turing machines TM1 and TM2 are equivalent <=> L(TM1) = (TM2) where L(TM1) is the languages accpeted by TM1, i.e. L(TM1) = {w | TM1(w) = accept},…
1
vote
2 answers

Equality between two propositions nat -> nat

I am currently working in a project in coq where I need to work with lists of nat -> nat. So basically I will have a definition that takes a list (nat -> nat) and a proposition f : nat -> nat as parameters and the goal is to retrieve the index of f…
1
vote
1 answer

Inputs to Program to Illustrate Halting Problem

Is this illustration of the haling problem correct? function halts(func) { // Insert code here that returns "true" if "func" halts and "false" otherwise. } function deceiver() { if(halts(deceiver)) while(true) { } } If so, why do so many…
Robin Andrews
  • 3,514
  • 11
  • 43
  • 111
1
vote
1 answer

"Reduction" from the complement of the universal language (L_u) to the language of nonempty-language Turing machines (L_ne)

I have a question from the domain of theoretical computer science. The so-called universal language, L_u, is composed of pairs (M, w) such that w \in L(M). The language L_ne consists of machines M (actually, their descriptions, but let's not be too…
1
vote
1 answer

How to define a function with Church numerals in lambda-terms?

How can I express the following function by a lambda term? f(n) = T if n != 0. F if n = 0. n stands for a Church numeral. I know that 0 := λf.λx.x where λx.x is the identity function and all other natural numbers can be expressed by n := λf.λx.f (f…
1
vote
1 answer

How to define a coding function for all finite subsets of N?

For working with countable sets I have to define a coding function of all finite subsets of N (natural numbers). How can I do this? I started with finding a function for all natural numbers: f(n)=1+2+...+(n-1)+n. But how can I express a coding…
user3351676
  • 91
  • 1
  • 1
  • 5
1
vote
2 answers

Proving the inexpressibility of a function in a given language

I'm currently reading through John C. Mitchell's Foundations for Programming Languages. Exercise 2.2.3, in essence, asks the reader to show that the (natural-number) exponentiation function cannot be implicitly defined via an expression in a small…
Ben
  • 65
  • 1
  • 6
1
vote
0 answers

Multiple questions related to Actor-based model

I have been told to write a paper that works as a review for Hewitt Actor-based model where I have to include: a) Hewwit actor-model definition (done, with explanations about how "actors" work; disallow shared memory, etc). b) Calculus example => I…
1
vote
1 answer

Automata and Computability

How long will it take for a program to print a truth table for n propositional symbols? (Symbols: P1, P2, ..., Pn) Can't seem to crack this question, not quite sure how to calculate this instance.
jimmyb
  • 21
  • 3
1
vote
1 answer

Determining a program's execution time by its length in bits?

This is a question popped into my mind while reading the halting problem, collatz conjecture and Kolmogorov complexity. I have tried to search for something similar but I was unable to find a particular topic maybe because it is not of great value…
user12546101
1
vote
1 answer

Can a grammar ever be parsed by LL(1) but not with LR(1)?

For homework, I was given the following grammar: S: D D: AbBb | BaAb A: ε B: ε I computed it using LL(1) just fine. The first sets were: S: a, b D: a,b A: ε B: ε The follow sets were: S: $ D: $ A: b B: a,b When I made my parsing table, the…
1
vote
1 answer

Something is not computable, can it be co-recursively enumerable?

My understanding is since it is not computable, it may not halt when the answer is 'yes' or 'no'. That's why it cannot be co-recursively enumerable since it can't guarantee it always halts on 'no'.
1
vote
0 answers

Does my solution show that the language is uncomputable by applying rice's theorem?

If p is a Turing machine then L(p) = {x | p(x) = yes}. Let A = {p | p is a Turing machine and L(p) is a finite set}. Is A computable? Justify your answer. So I'm trying to figure out how to solve this question and here is the answer that I've come…
1
vote
1 answer

Show that the language L = {w ∈ {0, 1} ∗ | Mw(x) ↓ for an input x} is partially decidable but not decidable

I am trying to prove that the language L = {w ∈ {0, 1} ∗ | Mw(x) ↓ for an input x} is partially decidable but not decidable. Mw is an encoding of M, thus the language L is such that all encodings of machine M halt on some input x. I have two…
Ponsietta
  • 315
  • 6
  • 17
1
vote
2 answers

Subset sum where the size of the subset is `k` is NPC?

I have a variation of Subset-Sum problem where the size of the subset is k and all the integers are positive (not zero). As can be seen online, this question can be fairly solved using dynamic programming in pseudo-polynomial time. I need to decide…
Mugen
  • 8,301
  • 10
  • 62
  • 140