checking whether turing machine passes at least k>2 states before accepting a word

$ L=\{<M,k>|\exists\,\,w\in L(M)\,\,such\,\,that\,\,M\,\,passes\,\,at\,\,least\,\,k>2\,\,distinct\,\,states\,\,before\,\,accepting\,\,w\}$

I try to think of reduction to prove that this language is neither RE nor coRE. How to approach this problem? Is there a hint, or intuition?

I usually check whether Rice can be used, but the question here is not about the language itself

In Waterdeep, is magistrate another word for magister?

In Waterdeep: Dragon Heist, both magistrates and magisters are mentioned throughout. The lore chapter, ch. 9, "Volo’s Waterdeep Enchiridion," discusses the role of magister in depth, but does not mention magistrates.

Is magistrate another word for magister, or is it a separate office?

Note: I know that the term "Magister" has another meaning in the Forgotten Realms. I am not looking for information about this type of Magister.

Does Word of Recall work with Temple of the Gods?

The word of recall spell (PHB, p. 289) says:

You must designate a sanctuary by casting this spell within a location, such as a temple, dedicated to or strongly linked to your deity. If you attempt to cast the spell in this manner in an area that isn’t dedicated to your deity, the spell has no effect.

The temple of the gods spell (XGtE, p. 167) says:

You cause a temple to shimmer into existence on ground you can see within range. […] The temple remains until the spell ends [which is 24 hours]. It is dedicated to whatever god, pantheon or philosophy is represented by the holy symbol used in the casting.


Casting this spell on the same spot every day for a year makes this effect permanent.

My plan is, cast temple of the gods (it takes one hour to cast, but it’s 24 hour countdown won’t come into effect until after I’ve finished casting the spell), then cast word of recall (takes only one action) within the temple. That’s my 6th and 7th level spell slots gone (I’m currently 14th level, so that’s all I’ve got above 5th).

Then long rest, probably within the temple (so that’s 8 hours of the 24 hours that the temple will exist for), then go on a dangerous mission. So long as the mission doesn’t take more than ~16 hours (or it becomes clear after 16 hours that it’s no longer dangerous), then I should be able to cast word of recall (assuming I reserve either my 6th or 7th level slot for it) to get my and my party out of there if anything goes horribly wrong.

Is there a flaw in my plan? Is there something about temple of the gods that means it wouldn’t be a valid target for word of recall?

I included the part of the temples of the gods quote about casting it every day for a year to make the temple permanent, since I wondered if the temporary nature of a temple I just conjured into existence that will only remain there for 24 hours would somehow interfere with word of recall, but I’m hoping that a temple, no matter how temporary or how it came into being, is still a temple as far as word of recall is concerned…

Client side password hashing with exposed salt word – did I find a breach?

I downloaded a software that has a login interface. It’s a $ 100 a month subscription software.

I disassembled the software and found that passwords are being sent by combining them with a hard coded “salt” that everyone can see in the source code (is it really “salt” if it’s the same for everyone?), encrypting them with MD5 and sending the hash to the server.

I hope that the passwords are encrypted again on the server side with unique salts to every user, but even if they do, isn’t this a breach? Can’t an attacker sniff the passwords easily, or do a send-the-hash attack?

Decide if a language has a word of a given size

Suppose that $ L$ is some language over the alphabet $ \Sigma$ . I was asked to show that the following languages is decidable:

$ $ L’ = \{w \in \Sigma^* | \text{ there exists a word } w’\in L \text{ such that } |w’| \leq |w| \}$ $

I.e., $ w \in L’$ if $ L$ has some word with length smaller than $ |w|$ .

The way I was thinking to show that is observing that $ L \cap\Sigma^{|w|}$ is finite, and $ (L \cap \Sigma) \cup (L \cap \Sigma^2) \cup \ldots\cup (L\cap \Sigma^{|w|})$ is finite too, hence decidable. But the main thing I am struggling with is how can any algorithm for $ L’$ know if some $ u \in L$ ? this is undecidable, so it’s unclear to me how any algorithm for $ L’$ can verify that indeed some word is in $ L$

Counting occurrences of word in a text

Let’s say I have a long text of 1M words and I would like to create a table of all the words ordered by the number of occurrences in the text.

One approach would be populating a dynamic array with each word and linear search them to count the occurrences in $ O(n^2)$ then sort the array by occurrences in $ O(n\cdot log~n)$ .

Another approach would be to use y priority queue and a trie. The insertion in the priority queue is $ O(log n)$ and the build of the trie is $ O(n)$ . But traversing the trie to build the priority queue is somehow difficult to evaluate.

Eventually using a hash map seems to be the best solution, but computing the hash could cost a little bit of time even though it is just a constant. In this you have $ n$ insertion/lookup in $ O(1)$ then a final sort of the hashmap by occurrences in $ O(n\cdot log~n)$ .

So it is clear that the former approach is the worse and the latter the best. But how can I evaluate the complexity of the second one?

Can I have multiple sanctuaries with Word of Recall?

I read the spell and it doesn’t seem to be limited by number of sanctuaries — rather only that it is a place dedicated to my chosen deity.

You and up to five willing creatures within 5 feet of you instantly teleport to a previously designated sanctuary.

It doesn’t state ‘the previously’ dedicated sanctuary, only ‘a’ previously designated sanctuary. Also later it does not state that the number of sanctuaries is limited.

Is this correct? I intend to use it to traverse continents in our current campaign if multiple sanctuaries is allowed.

Are the Power Word spells especially easy to identify?

There are various high level spells named “Power Word: X”. They are all verbal-only spells (except Power Word: Heal), and tend to have the following text in them(…except Power Word: Heal):

You speak a word of power that [has the effect of the spell’s name]

Assume for the purpose of the question that the rules from Xanathar’s Guide on spell identification are in use.

Do these properties (verbal only, verbal component is a single word rather than multiple) make these spells unusually easy to identify – not as a specific spell, but as “one of the Power Word spells”?

In other words, consider the following scenario:

Spellcaster A is facing off against spellcaster B. On B’s turn, B utters a single arcane word, and seems to not be using any somatic or material components for their spell.

Is it reasonable for A to deduce, without the use of a reaction, “ah, I reckon the single word and nothing else means it’s one of the Power Word spells. I had better Counterspell using a high level slot”?