Is this correct : whether or not a type 3 grammar generates $\Sigma^*$ is not c.e

An example from Sipser’s book, Introduction to the Theory of Computation, shows that it is not decidable for a $ TM$ to recognize whether a $ CFG$ (or a type 2 grammar) generates $ \Sigma^*$ , where $ \Sigma$ is the alphabet. Call this language $ CFG_{all}$

But the above language is also not computably enumerable. There can be a reduction from $ CFG_{all}$ to $ \bar{A_{TM}}$ , where $ \bar{A_{TM}}$ is the language s.t. the input $ TM$ does not accept any input. $ \bar{A_{TM}}$ is not computably enumerable.

But could we say that whether or not a type 3 grammar generates $ \Sigma^*$ is also not c.e. ? (since type 3 grammars are a subset of context-free grammars). While it is true that a finite automaton can recognize $ \Sigma^*$ , this language is different right from whether a type 3 grammar generates $ \Sigma^*$ ?

Just to clarify the source of my confusion, in summary, it is decidable for a $ TM$ to decide whether a pushdown automaton recognizes $ \Sigma^*$ or accepts any input, but it is not decidable or even computably enumerable for a $ TM$ to recognize that a CFG generates $ \Sigma^*$ . Similarly, it is decidable for a $ TM$ to check if a finite automaton accepts $ \Sigma^*$ , but it may not be decidable for a $ TM$ to check if a type 3 grammar generates $ \Sigma^*$ . It’s somehow the difference between recognizing and generating.

Is testing for all executables without considering any files in the system is enough for deducing whether the system is infected with malware?

I came to know that the malicious activities will be carried out only by a software(program) whereas the malicious files(data to the softwares installed in the system) can’t perform the malicious activities directly by themselves but they can responsible for bringing those malicious softwares to the system( say like steganography).Hence those softwares also must be installed ( automatically or manually) before performing their activity.

If this is true scanning for malware in softwares before they get installed( triggered manually or automatically) is enough to say that the system is 100% secure(considering that our detector is ideally 100%accurate)?

Since the caster of the Zone of Truth of spell knows whether a creature failed the save, can they use it to detect hidden/invisible creatures?

I’m DMing for a 5e party that includes a cleric, as many parties do. This cleric has found (what appears to be) an interpretation of the wording of the “Zone of Truth” spell that makes it even more powerful than it seems to be intended to be.

His idea is that since Zone of Truth tells you when a creature succeeds or fails the save, he could use it to detect if a hidden or invisible person enters the radius, as it would tell him that someone succeeded or failed the save.

Is this true? if not, is there any official example that specifically says it’s not true?

(And, if Zone of Truth WOULD do this, is there any way to prevent such a detection, as I know the party will do this a ton, and if it’s something they can do, I don’t want to deny it outright, but some villains may have countermeasures)

First time DM, how do I decide whether PC’s can tie up an enemy and other creative ideas

I know these are subjective questions, I just want advice from more experienced player.

For example: My PC tried to trip up a zombie which ran past him while in stealth as an opportunity attack. He rolled a high d20 but 0 for damage (-1 STR) so I decided this would be fair. He trips the zombie up but it takes no damage.

More complex one: He tries to tie up a prone but otherwise perfectly healthy zombie. I thought a die roll isn’t even worth it, because his strength is 9 but the zombie is 16 so following logic he wouldn’t have the strength to grapple the zombie into place in order to tie him up. Should I make it a hard strength check (20) or just narrate it as “You try but the zombies greater strength pushes you back”.

I’ve never DM’d before so I had a quick practice session with one PCs and I’m glad I did, there is a lot to consider!

Determine whether there exists a path in a directed acyclical graph that reaches all nodes without revisiting a node

For this I came up with a DFS recursion.

Do DFS from any node and keep doing it until all nodes are Exhausted. I.E. pick the next unvisited node once you cant keep recursing.

The element with the highest post number or the last element you visit should be the first element in your topological ordering.

Now do another DFS recursion that executes on every node called DFS_find:

DFS_find(Node): if (node has no neighbors): return 1; otherwise: return 1 + the maximum of DFS_find(Node) for all neighboring nodes

Execute DFS_find(Node) on the first node in your topological ordering. If it returns a number equal to the number of vertices, then a directed path that crosses every node once, exists. Otherwise it does not.

How can I prove whether or not this algorithm is correct?

I think this may be a little less time efficient than the classical way to just do a topological sort and then check if each consecutive pair has an edge between them.

Algorithm for determining whether 2 entities of some feature are the same?

I’m trying to think of a way to do approximate joins between 2 rows in a data table. Like for example lets say I have a row where the person name is “John Doe” but then another data table uses a different person format like “Doe, John.” Now suppose I can put them both to a standard format say “John Doe.” Sweet so I have a way to reference them and let’s say there’s other data correlated with “John Doe” is there any algorithms out there to infer whether these 2 John Does are the same given the other data columns? You can see the other data columns as features as well, because I know FB has an algorithm to stop duplicates for the same person and StackOverflow will merge accounts if it thinks they’re being used by the same person. Any suggestions?

Testing whether polynomial is in algebra of other polynomials

A collection $ \Sigma$ of polynomials is an algebra if: (1) $ \lambda f + \eta g \in \Sigma$ for any $ f,g \in \Sigma, \lambda,\eta \in \mathbb{R}$ and (2) $ f,g \in \Sigma$ implies $ fg \in \Sigma$ . We say that $ P$ is in the algebra of $ \{P_1,\dots,P_n\}$ if $ P$ is in the smallest algebra containing $ P_1,\dots,P_n$ .

I was wondering if there was a way, on any computer math software, to check whether a given $ P$ as in the algebra of a given collection $ P_1,\dots,P_n$ .

Example: take $ n \ge 1$ and let $ P_1 = x_1+\dots+x_n, P_2 = x_1^2+\dots+x_n^2,\dots P_n = x_1^n+\dots+x_n^n$ . Then all $ n$ of the following symmetric functions are in the algebra generated by $ P_1,\dots,P_n$ : $ $ x_1+\dots+x_n$ $ $ $ x_1x_2+\dots+x_{n-1}x_n$ $ $ $ x_1x_2x_3+\dots+x_{n-2}x_{n-1}x_n$ $ $ $ \dots$ $ $ $ x_1\dots x_n$ $

I’d appreciate any help.

Is it decidable whether Turing Machine never scans any tape cell more than once when started with given string

The problem:

Is it decidable that the set of pairs $ (M,w)$ such that TM $ M$ , started with input $ w$ , never scans any tape cell more than once.

How can I easily prove above to be decidable. I found following proof confusing:

enter image description here

How is $ l+m$ is upper bound on number of steps? I feel we should be doing at least $ l\times 𝑄\times \Gamma\times\{𝐿,𝑅\}+1$ steps ($ Q$ being number of states,$ \Gamma$ being set of tape alphabet, $ l$ is string length, $ L$ and $ R$ are head movement directions).