## Find CSG for $L = \{a^ib^jc^k \mid 0 \leq i \leq j \leq k\}$

I am trying to find a context sensitive grammar for the type-1 language

$$L = \{a^ib^jc^k \mid 0 \leq i \leq j \leq k\}$$

I can construct the first part with

\begin{align*} S &\to aSbB \mid B \mid \epsilon\ B &\to bB \mid \epsilon\ \end{align*}

but how do I continue from there? I tried

\begin{align*} S &\to aSbBcC \mid B \mid \epsilon\ B &\to bBcC \mid \epsilon\ CB &\to BC \ C &\to cC \end{align*} but this does not seem to work e.g. $$S \to aSbBC \to aaSbBCbBC \to aabBCbBC$$

## $L = \{ \langle M \rangle \mid M$ is a turing machine and $L(M)$ is decidable $\}$

$$L = \langle M \rangle \mid M$$ is a turing machine and $$L(M)$$ is decidable $$\}$$. How could I show this language is undecidable using the HALTing method?

A language L is undecidable if its not corecognizable and recognizable.

So I wish to show $$HALT \leq_m \overline{L}$$ for not recognizable and

$$HALT \leq_m L$$

Not corecognizable

SHOWING Not recognizable attempt:

R = "On input <M, w>     Construct M1     M1 = "On input x          run M on w          accept     return <M1> 

If $$\langle M, w \rangle \in HALT$$, then M1 accepts all input $$L(M_1) = \Sigma^*$$ which is undecidable $$\langle M_1 \rangle \notin L$$ as we would want

If $$\langle M, w \rangle \notin HALT$$, then M1 loops on all input $$L(M_1) = \emptyset$$, which is decidable $$\langle M_1 \rangle \in L$$ as we would want

After further look into this $$L(M_1) = \Sigma^*$$ is actually decidable? How would I do this then. What can I do to M1 to make it return an undecidable TM if M halts on w?

## $L = \{ a^{j!} \mid j \geq1\}$ is not context free by pumping lemma

How I use the pumping lemma to prove that the language $$L = \{ a^{j!} \mid j \geq1\}$$ is not context-free?

## Uncertainty whether $\{a^i b^j c^k \mid i+j \le k\}$ is context-free or not

I’m having trouble with this particular language:  \{a^i b^j c^k \mid i+j \le k\}

If it’s not context-free, I don’t know how to correctly apply the Pumping Lemma for CFLs; if it is context-free, I don’t know how to create a context-free grammar that generates this language.

Which one applies? Can you help me out?

## L: $\{\langle M \rangle \mid M$ is a TM and $\{111\} \subseteq L(M)\}$ basically 111 can get accepted by $L(M)$

L: $$\{\langle M \rangle \mid M$$ is a TM and $$\{111\} \subseteq L(M)\}$$ basically 111 can get accepted by $$L(M)$$

Proof that this is recognizable:

Here is a recognizer $$M1$$ for L:

Let M1 = "On input ⟨M⟩: 1. Run M on 111 2. if M accepts then accept else loop" 

Is this right? if $$\langle M \rangle \in L$$ then it will accept $$\langle M \rangle \notin L$$ then it will loop. I’m attempting to do this without dove tailing but cant find a lot of resources for this

## Reducing of $\{w \mid |T(w)| \geq 42\}$ to the halting problem

I want to reduce the language $$L=\{w \mid |T(M_w)| \geq 42\}$$ to $$H_0 = \{w \mid M_w \text{ halts on } \epsilon\}$$, but I can’t find a way to define an algorithm that halts only if $$w \in L$$. Either way:

• if $$w \in L$$ I would have to find at least 42 words that are in $$T(M_w)$$, which might be undecidable for certain languages.
• if $$w \notin L$$ then $$M_w$$ would accept only 41 or less words. Then we do know, that the language $$T(M_w)$$ is regular, but still we can’t test if the language is regular or not.

Simply trying random words until we have at least 42 doesn’t work as for some words the TM will not halt.

Is there any idea I could try? Or in other words: how would one prove $$L \leq H_0$$?

## Computing $E(X \mid \sigma(min\{x, k\}))$

Consider $$\Omega = (0,\infty)$$, $$\mathcal F = B(\Omega)$$, and $$\lambda > 0$$. Let $$P$$ be the probability measure on $$(\Omega, \mathcal F)$$ satisfying $$P((a,b]) = e^{-\lambda a} – e^{-\lambda b}$$. Also set $$X(\omega) = \omega$$ and $$Y(\omega) = \min \{ \omega, \kappa \}$$ for $$\kappa > 0$$. Compute

• $$E(X \mid \sigma (Y))$$
• $$E(e^{-\alpha X} \mid \sigma (Y)), \quad \alpha >0$$

I have no idea how to start here. I realise that the function $$Y(\omega)$$ is a piecewise linear function on $$(0,\kappa)$$ and $$[\kappa, \infty)$$. Hence the $$\sigma$$-algebra $$\sigma (Y)$$ is given by the collection of sets

$$\varnothing, \Omega$$, $$\{ B : B \subseteq (0,\kappa)\}$$, $$\{B : B \subseteq [\kappa, \infty)\}$$,

but apart from that I have no clue… Any one that can provide me with a hint?

## Unrestricted grammar which generates $\{ a^1\#a^2\#a^3\#\dots \#a^k \mid k >0 \}$

I am looking for an unrestricted grammar which generates the following language:

$$\{ a^1\#a^2\#a^3\# \dots \#a^k \mid k >0 \}$$

That is, words like $$a\#aa\#aaa\#aaaa\# \dots \# \text{ k times ‘ a ‘}$$.

## Two integers $a$ and $b$ are coprime, is it possible that $a \mid b$?

Let $$a$$ and $$b$$ be coprime integers. Is it possible that $$a \mid b$$?

My thinking is that if $$a \mid b$$ then $$a$$ and $$b$$ share a factor besides $$\pm 1$$ ($$a$$ itself) and so are not coprime. Thus, $$a \nmid b$$.

This is probably very simple, but I’m still unsure.

## Find the CFG of $\{a^ib^jc^k \mid i,j,k>=0 , \text{if} \quad j=1 \quad \text{then} \quad i=k\}$

`I’ve tried but I can’t figure out any solution. Is there any hint for me to solve the question?