Undecidability of language involving two TMs

I am currently browsing the lecture notes on computability/decidability and I have encountered the following exercise I am unable to solve.

Given M1, M2 Turing machines, is it true that for every $ x \in \Sigma^*$ M1 performs at least as many steps while working on input $ x$ as M2 does with input $ x$ ?

There is also an answer to the excercise and a hint, though it didn’t help me that much:

  • Let M1 is a TM which enters an infinite cycle for any input → halting problem (and thus undecidable).

  • Complement of the language is partially decidable, because non-deterministic TM can provide a counter-example.

In particular, I would like to know how can I express these statements formally:

  • How to formally describe the language describing the problem?
  • How to reduce the language to halting problem?
  • How to show that the complement is partially decidable?

The only thing I can decide with a confidence is that the language itself is not even partially decidable, since complement is partially decidable, but the language itself is not decidable, and thus the language is not even partially decidable (Post theorem).

Thanks in advance.

Use the Rice’s theorem to prove that the following property of a Recursive Enumerable language L is undecidable

This exercise was taken from the book “Languages and Machines: An Introduction to the Theory of Computation” by Thomas Sudkamp. It refers to exercise 12 (b) chapter 12. Given a language L which is recursive enumerable, I have to prove that the following property is undecidable:

  • L is finite

The text says that it is sufficient to prove that it is a non trivial property.

I tried to solve the exercise as follow:

Consider the empty language $ \emptyset$ , which contains only the empty string λ, in other words $ \emptyset$ = {$ \lambda$ }. Then $ \emptyset^-$ which is the negation of the empty set, will contains some string which is not $ \lambda$ . By doing this, I’ve found a language which is finite and does satisfy the property, but I’ve also found another language which doesn’t satisfy the property because $ \emptyset^-$ it is not finite. In conclusion the property it is not trivial, and by the Rice’s theorem it is impossible to decide that property.

I’m not sure if I’m doing the right thing here and I haven’t found any solution to this exercise… Can anyone help or at least tell me if I’m doing it right?

Thank you very much.

Does the Jack-Of-All-Trades edge grant basic proficiency in every language?

In Savage Worlds Deluxe, the Jack-Of-All-Trades edge grants the following benefit:

Any time he makes an unskilled roll for a Smarts-based skill, he may do so at d4 instead of the usual d4–2.

Languages fit under the category “Knowledge (Smarts)”, and so are Smarts-based skills. The chart for Languages says:

d4: The character can read, write, and speak common words and phrases

Does this mean Jack-Of-All-Trades edge provide the ability to read/write/speak common words and phrases in any language?

Regular Language – Context Free Language

I know this is not a question answer posting site but for the sake of explaining my doubt I will like to post a question

Let $ A$ be a $ regular$ $ language$ and $ B$ be a $ CFL$ over the alphabet $ \sum^*$ , which of the following about the langauge $ R=\overline{A}-B$   is  $ TRUE?$

a. $ R$ is necessarily $ CFL$ but $ not$ necessarily $ regular$

b. $ R$ is necessarily $ regular$ but $ infinite$

c. $ R$ is necessarily $ non$ $ regular$

d. $ None$

e. $ \phi$

Now I have approached this problem in 2 ways and I am getting 2 different results.

The first way in which I have approached is that, since $ A’-B=A’\cap B’$ , so it is $ Reg$ $ L$ $ \cap$ $ CSL=CSL$ , so answer is $ NONE$

On the other hand I have think of it like this, since $ A$ is $ Regular$ it’s complement is also $ regular$ , Now we know that

enter image description here

So $ regular$ $ language$ being a subset of $ CFL$ must give us $ \phi$ when we are doing $ A’-B$ , so this time I am getting $ \phi$ as answer

My question is which of my approach is correct? Is the first one correct? If so, then why the second one is wrong?

Or is the second one correct? If so then why the first one is wrong?

I believe that the second method shown by me is wrong as say we have a regular language  $ A=\phi$ , so $ \overline{A}=\sum^*$ and say $ B=a^nb^n$

then $ \overline{A}-B=a^xb^y$ , where $ x\neq y$ , so it is a $ CFL$ but not $ \phi$ .

So where did I went wrong in my second proof using $ Chomsky$ $ hierarchy?$

Downvoters(if any) please mention the reason of downvote in comment. Thank you.

Turing machine and Recursively Enumerable Language

Whether a TM accepts Recursively enumerable language. Decidable or not?

And what if the question was whether a TM accepts a RE language. Decidable or not?

According to my understanding the first one should be decidable right, as it is $ TRIVIAL$ property of TM to accept $ REL$

and the second one should be partially decidable right? as $ Membership$ problem for recursively enumerable language is undecidable, so can we conclude from it that our question whether a turing machine accepts $ a$ RE language is also undecidable?

MARS MIPS assembly language help

How can i create a programme that allows a user to input the first two digits of their student registration number then divides that number by 2 and outputs the nearest quotient INTEGER result to screen.

So far all i have is this because i suck at assembly language

.data studentRegistrationNumberPrompt: .asciiz "Please enter your student registration number: " studentRegistrationNumber: .space 40 #allocates 40 bytes for a string studentRegistrationNumberOutput: .asciiz "Your student registration number is: "  .text main: #Start  la $  a0, studentRegistrationNumberPrompt #prompts the user to enter their student registration number li $  v0, 4 syscall li $  v0, 8 la $  a0, studentRegistrationNumber la $  a1, 40 syscall 

Do any programming language function calls internally call Operating system APIs?

To list directory content in Python we use os.listdir(), In Java we use Files.list(new File(dirName).toPath()). Like this we use a lot of functions calls, eg: For Network connectivity, Print in screen, Save to files.

In all operating systems do these all language-specific function calls ultimately call OS APIs (In Windows I think it will be Win32 APIs)?

ANything we can do without call OS APIs?

There exist two language $L_1$ and $L_2$ such that $L_1$ and $L_2$ are recursive, but $L_1L_2$ is non-recursive

Statements True or False.

There exist two language $ L_1$ and $ L_2$ such that $ L_1$ and $ L_2$ are recurvise, but $ L_1L_2$ is non-recursive.

For me the statements is True because I can describe a non-recursive (I have understood recursively enumerable) procedure from two recurvise languages.


Suppose that $ L_1$ and $ L_2$ are recursive languages. Then there is a Turing machine M1 that accepts any input in $ L_1$ and rejects any input not in $ L_1$ . Similarly, there is a Turing machine M2 that accepts any input in $ L_2$ and rejects any input not in $ L_2$ . To determine if $ w ∈ L_1L_2$ , we nondeterministically guess where to break the string into $ w_1w_2$ , and run M1 on $ w_1$ and M2 on $ w_2$ . Then if w is in the language, M1 and M2 will both eventually accept.

Prove that the language of CFGs that is closed under reversal is undecidable


The wording of the title may be a bit vague, but I’m not asking if CFLs are closed under reversal. Please see below.

Problem Description

Given a word $ w$ , define $ w^{r}$ to be its reversal.

Let $ L=\{ G \vert G \text{ is a } CFG \text{ and for every } w \in L(G), w^{r} \in L(G) \}$

Prove that $ L$ is undecidable.

My Attempt

I am aware that I should reduce a known-to-be-undecidable language to L, but by looking at the four undecidable languages here (Equivalence, Disjointness, Containment, Universality), I still failed to determine which language I can use. Please guide me a direction, thank you.