## Randomly selected words converted into sentence. Did I lose passphrase strength or gain it?

I got 5 dice and opened EFF’s wordlist, and generated a random five-word passphrase (all letters small with spaces, no punctuation) for my PC.

The words were making up a meaningful scene in my mind, so I made a complete sentence out of the words by adding some more words (like of, from, a, etc.) and punctuation.

I am not able to decide which of the following thoughts is more dominant:

Benefit: I got some punctuation, a single capital letter and more words. So the "strength" of passphrase should increase.

Drawback: The virgin passphrase was quite random (nonsense), but the new sentence has got appreciable "real-world" meaning (sense) to it. It looks like a spam message generated by the method mentioned in this answer.

## Can others understand the content of the words embedded in the Message spell by the spellcaster, as well as those who respond to him?

Can others understand the content of the words embedded in the Message spell by the spellcaster, as well as those who respond to him?

Am I right that the meaning of the Message spell is transmitted through the verbal component, and for the answer the target must move its lips? (Can someone in this case understand the content transmitted by the spellcaster, by listening to sound or by reading lips, and the contents of the answer of the target, reading by its lips?)

## What is the time complexity of sorting n words length wise and then alphabetically? Should we consider the length of the strings in the complexity?

Let’s assume I have a list of some words found in the English dictionary: ["hat", "assume", "prepare", "cat", "ball", "brave", "help" …. ]

I want to sort these words (which are n in number) in a way, such that they are ordered based on their length, but if 2 words have the same length, they are ordered alphabetically.

What is the time complexity of this sorting operation?

Would it be fair to say that the complexity is just O(nlogn) and not take into consideration the length of the strings? If the largest length is S, can the complexity also involve a factor of S?

## Can you verify a word’s position in an enumeration faster than performing the enumeration?

Pt 1. Given as input the tuple: (word, natural number)–does there exist a verifier, that runs faster than a fixed enumerator, that can accept if the word is in the position of the natural number in the enumeration by the fixed enumerator, and reject if it is not?

I suspect the answer is no. In that case…

Pt 2. Is there a way to get around this by adding a “tagging” function to the enumerator so that a verifier can be given something like (word#tag, natural number) so that it almost immediately knows, from the tag, if the word is in the position of the natural number (do there exist such ‘modified languages’) AND IT CAN’T BE FOOLED! Of course you can stick a natural number onto a word, but how can you do this so the verifier can BE SURE you aren’t lying…? Trying to figure out a way to tag the words (or generate a description for the words in a language (modify the language being enumerated/the enumerator)) so that stuck on to the words enumerated is the positions their the enumeration, and this information is reliable and can be verified quickly.

Any ideas? 🙂

## Is the empty string and some words of even length are elements of this set?

$$L = \{w \in \{a,b\}^*| \text{the first, the middle, and the last characters of w are identical}\}$$.

I have my answers, but I need confirmation:

Is the empty string $$\epsilon \in L$$? Yes. Reason: there is no first, middle, or last character to break the rule.

Words of even length, assuming the first and last characters of them are identical, again, must be in $$L$$, as there is no middle character to break the rule in such words.

This is in the context of theory of computation by the way.

## Cutting Words timing when playing online

Lore Bard’s Cutting Words feature states the following:

Also at 3rd level, you learn how to use your wit to distract, confuse, and otherwise sap the confidence and competence of others. When a creature that you can see within 60 feet of you makes an attack roll, an ability check, or a damage roll, you can use your reaction to expend one of your uses of Bardic Inspiration, rolling a Bardic Inspiration die and subtracting the number rolled from the creature’s roll. You can choose to use this feature after the creature makes its roll, but before the DM determines whether the attack roll or ability check succeeds or fails, or before the creature deals its damage. The creature is immune if it can’t hear you or if it’s immune to being charmed.

What exactly does that mean. At what time do I have to say my DM I interrupt them?

When playing at a table, my DM usually goes this way: “The goblin attacks [player character] with their bow and [rolls] hits”. I can hear the dice roll and I say I want to know the result in order to decide if I want to use Cutting Words.

Now with the current sanitary situation, we play online, and the DM usually rolls their own physical dice and tells whether it hits or not because they have all our ACs registered. This basically forbids me to use my Cutting Words.

So what is the exact timing where I can interrupt the DM, online, and use my Cutting Words?

# Description

PayPal suggests that generating a PIN by spelling words (on a numeric pad, e.g., [ABC] = 1) is a good method for security and memorability, e.g., B-L-U-E-C-O-W = 2583269.

My knowledge about password security is limited and I have not found any information about this. While these PINs are not completely random it seems to me that they should be (depending on words) quite secure, at least for what PINs usually protect and with other measures such as 4–8 numbers and limited attempts.

# Question

1. Can anything be said directly about the security of PINs that spell out words?

2. Has any research or attacks been made regarding these kinds of PINs?

## A bit of context

I was writing a parser for a grammar, and for testing purposes I come up with idea to generate some random inputs. The grammar I was dealing with was much more complicated, in this question I presented “minimal working example” for simplicity. And of course, I am able to avoid the issue I faced using a bunch of trivial heuristics, but the question really makes me wonder.

## The problem

Suppose we have a typical context-free grammar for arithmetic expressions of $$+,*$$, brackets, and integer literals:

$$E \longrightarrow F(“+”F)^*$$ $$F \longrightarrow T(“*”T)^*$$ $$T \longrightarrow int|“(”E“)”$$

It is easy to implement a staighforward algorithm for generating random words by this grammar: we implement a separate procedure for each nonterminal. If a nonterminal has multiple production rules (as $$T$$ does), we choose a production rule by tossing a coin. If rule contains kleene star (e.g. $$(“+”F)^*$$), we also toss a coin and generate zero or one repetition (sure we could pick any random integer $$k\geq0$$ and generate $$k$$ repetitions, but for simplicity we will focus on the simplest version of this procedure). Here is what we get:

generate_E():     if coin_toss():         return generate_F() + "+" + generate_F()     else:         return generate_F()  generate_F():     if coin_toss():         return generate_T() + "*" + generate_T()     else:         return generate_F()  def generate_T():     if coin_toss():         return "(" + generate_E() + ")"     else:         return random_integer() 

An invocation of generate_E() yields a random expression.

What could go wrong? It turns out that execution of this procedure on the real machine terminates with stack overflow quite often. Of course, technically here we have a possibility of endless recursion, but my intuition was telling me that probability of reaching recursion depth $$k$$ decays exponentially with increasing $$k$$, therefore getting deep levels (let’s say, 1000) is almost impossible. Apparently, a few consecutive runs reveals that procedure can easily reach depth of many thousands (by depth I mean maximum number of procedure calls the stack contains simultaneously).

I am curios how to formalize this empirical fact. I want either a formula for $$P(depth = k)$$, or an asymptotic approximation of it, or an inequality bounding right tail of CDF below (something like $$P(depth > 1000) > 0.05$$)

## My attempt

I tried to come up with a formula for $$P(depth = k)$$:

Let’s denote $$P(depth = k)$$ as $$P_E(k)$$. Also, we define similar values for generate_F() and generate_T()$$P_F(k)$$ and $$P_T(k)$$ respectivetely.

Clearly (else branch of generate_T), $$P_T(1) = \frac{1}{2}$$ and for $$k > 1$$ (then branch)$$P_T(k) = \frac{1}{2}P_E(k – 1)$$

Regarding $$P_F(k)$$, we can either execute else branch, and it gives term $$\frac{1}{2}P_T(k – 1)$$, or then branch, what gives a bit more complicated one $$\frac{1}{2}\sum_{(x, y) | max(x, y) = k – 1}{P_T(x)P_T(y)}$$ i.e. $$P_F(k)= \frac{1}{2}(P_F(k – 1) + \sum_{(x, y) | max(x, y) = k – 1}{P_T(x)P_T(y)})$$

Finally, the formula for $$P_E(k)$$ is almost the same as for $$P_F(f)$$, we only have to replace $$P_T(x)$$ with $$P_F(x)$$.

Now, we can calculate some values of $$P_e(k)$$

$$\begin{array} {|r|r|}\hline k & P_E(k) & P_E(k)\text{ in decimal}& P_E(k)\text{ by Monte-Carlo} \ \hline 3 & \frac{33}{128} & \approx0.257812 & \approx0.2527 \ \hline 6 & \frac{4448787585}{34359738368} & \approx0.129477 & \approx0.1282 \ \hline 9 & \frac{14080391757747154038821618051813151497122305}{178405961588244985132285746181186892047843328} & \approx0.078923 & \approx0.0761 \ \hline 12 & \text{ the fraction is too long} & \approx0.053213 & \approx0.0530 \ \hline \end{array}$$

As we can see, the recurrent formulas seem to be true, but neither they give me an insight on asymptotical behaviour of $$P_E(k)$$, nor the first values give a clue on formula in closed form.

Any help would be appreciated.

## Can a Multiclass Bard/Druid use cutting words while wild-shaped

I’m playing a 6th level bard/2nd level Druid and I was wondering if I could use cutting words while using the feature wild-shape.

My DM wasn’t sure, so I was wondering if you could enlighten me on the subject.

## How to identify measure words in Chinese text?

Measure words (aka classifiers) are used in Chinese to “measure” things, e.g.

Three glasses of milk

That person

One crow

We don’t have an equivalent in English [they’re not collective nouns (e.g. a murder of crows)]. It’d help reading Chinese text to be able to highlight measure words in a distinct color.

Thus, I’m interested in the following problem:

Input: Chinese plaintext.
Output: Identification of which characters are measure words in that plaintext.

It’s a highly restricted version of Chinese text segmentation, and I expect it would be substantially simpler, e.g. there’s only a short list of characters which can be measure words. It may even be considered “solved”.

However, there’s some nuances which make this challenging, e.g., repeated measure words e.g. 个个 and 一根根, and characters in measure words can also belong to Chinese words 个人. Nevertheless, there may only be a small number of exceptions here.

Question: How to identify measure words in Chinese text?

Searching for Chinese measure words in ACM didn’t give anything relevant, but this problem may have arisen as a sideline in other work on Chinese text segmentation.