What is the highest value a condition could reach?

I’m making a Pathfinder 2e character sheet on Google sheet to automate as much number-crunching as possible. Currently, I’m making a dropdown list for conditions, as well as formulas for calculating their penalties.

I find adding conditions with pre-determined values much simpler than conditions with fillable values. For example, instead of clumsy and a blank slot for its value, the dropdown list will have clumsy 1, clumsy 2, clumsy 3, and so on. It’s ugly, but it greatly simplifies the formula. However, if a condition’s value could reach a really high number, then it will be too cumbersome to use.

The highest I have found is stupefied 4 from feeblemind and unfathomable song. I’m also pretty sure I’ve seen an ancestry/heritage/feat which could increase the maximum value of dying to 5.

So what is the highest value/penalty a condition could reach? For the supremely meticulous: what is the highest value each condition could reach?

Longest common sub sequences with a condition

Consider a sequences if called good if it contains at least one pair one adjacent numbers which are equal.A good sub-sequence of a array is a sub sequence of that array which is good and has its length is highest.Now you are given two array $ S$ and $ T$ with integers,you need to find sub sequences with is common to both arrays and has maximum length and is a good sub sequence.

This is a pure dynamic programming problem,in which states are $ dp[i][j]$ is answer for $ S[1:i]$ and $ T[1:j]$ ($ A[1:i]$ means subarray of $ A$ from $ 1$ to $ i$ ). But i could not find transition between states,could anyone help me.

Search for range in continuous function satisfying some condition

I am attempting to define an optimization for the following problem: given two graphs find (the largest possible) areas where some condition holds.

Interesting portions are where the Red graph is above the Green one. All, or part, of such areas may satisfy the condition.

Googling for optimization algorithms, e.g. ones mentioned in Scipy’s optimization tutorial, returns results focusing on finding a single point, usually the min/max of some condition. I am having trouble finding algorithms that search for ranges.

The graphsR and G are KDEs generated with Gaussian functions. I can find the intersections of the graphs (e.g. with brentq and between each pair calculate P and S (the conditions). The blue vertical lines are the intersections; blue horizontal lines with text are shown only when the conditions were met for the whole range.

In many cases a subset of the range satisfies the condition as can be seen in black. Those are results from a ML algorithm which I want to replace with a numerical calculation.

Example 1: ML algo found better solution on the right section, neither found the left one interesting. enter image description here

Example 2: on the right you can see the ML algo suggesting a range not quite between the blue lines. I am OK with the new algo clipping the portion on the left. enter image description here Example 3: showing that there may be more than one interesting range per marked section. enter image description here Example 4: ML algo missed the leftmost range enter image description here

SQL: CASE WHEN having AVG() as condition not giving right output

I have a table of unique users that each has a "rating" column (it’s an average rating they give out of all their ratings given in a different table of reviews). I want to add another column to my table, which specifies either them giving a rating that is above the average of all ratings of all users (hence I use the AVG() function), below or at average (I call it "bias"). In other words, I want to see whether each user gives on average higher or lower ratings than the total average. I understand the limitedness of this query, and ideally I would include an interval (i.e. within 0.5 points below or above average still counts as average) but I can’t seem to make even the simplest query work.

I’ve been using the Yelp dataset from a Coursera course, but I tried to create a sample that produces the same result that I do not want – just one row. I want to have this categorization for each row, hence it should return 3 rows in this example, "below average" in the first two and "above average" in the third. However, the code below produces just one row. I have been working with R and this seems like I am using incorrect syntax, but after 30 minutes of searching the web I cannot find a solution.

I am working in and want to use SQLite syntax as part of the course in Coursera

CREATE TABLE test      (      id integer primary key,       rating integer     );  INSERT INTO test (id, rating) VALUES (1, 1);  INSERT INTO test (id, rating) VALUES (2, 3);  INSERT INTO test (id, rating) VALUES (3, 8);  SELECT id, rating,   CASE     WHEN rating > AVG(rating) THEN "above average"     WHEN rating < AVG(rating) THEN "below average"     ELSE "no bias"    END AS "bias" FROM test 

Gaussian distribution with condition?


What does this expression mean?

Normal distribution with condition

I am reading a research paper and found the following expression (Eq.28 in the paper below).

enter image description here

It means a Gaussian distribution, but the mean component seems conditional probability-like expression $ \it{\bf{s}}_t | \it{\bf{m}}_{b, t, m}^{(j)}$ . I have never seen this expression before and cannot find any info about it.

The variables $ \it{\bf{s}}_t$ and $ \it{\bf{m}}_{b, t, m}^{(j)}$ are both vectors and $ \bf{\Sigma}_{b}$ is a covariance matrix.

Does anybody have an idea of what this expression means?

Original paper where the expression is.

The original paper can be found here: https://eprints.soton.ac.uk/437941/1/08340823.pdf

Thanks in advance.

Does hp fall to 0 if a creature is knocked unconscious from failing a save, and if not, how does the unconscious condition end?

I was looking at the Prismatic Beetle Swarm, and it says that "In bright light, a creature within 30 feet that looks at the prismatic beetle swarm must make a successful DC 13 Wisdom saving throw or be blinded until the end of its next turn. If the saving throw fails by 5 or more, the target is also knocked unconscious."

If a creature in range falls unconscious from the dazzling light of the swarm, do their hitpoints automatically drop to 0? It doesn’t say so specifically, like it does for drowning rules and other things, nor does it say so in the actual unconscious condition. And spells like Catnap and Sleep don’t make hp drop to 0, although I feel like unconsciousness from falling asleep is different from falling unconscious in this manner.

If their hp does not drop to 0, how does the unconscious condition end? Does the unconscious creature still need healing?

What counts as a “debilitating condition”?

In the discern health spell it talks about the ability to identify a debilitating condition.

The name of the creature’s debilitating condition (ability drained, confused, fatigued, etc.).

What would be classified as a debilitating condition? Would any other detrimental effect (eg. Dominate person, charm person, disease, poison) be identifiable by this spell?

Race Condition in Mesa Monitor

global volatile RingBuffer queue;  global Lock queueLock;       global CV queueEmptyCV;      global CV queueFullCV;  public method producer() {     while (true) {         task myTask = ...; // Producer makes some new task to be added.         queueLock.acquire();          while (queue.isFull()) { //####             wait(queueLock, queueFullCV);         }         queue.enqueue(myTask);         signal(queueEmptyCV); -- OR -- notifyAll(queueEmptyCV);                  queueLock.release();      } }  public method consumer() {     while (true) {         queueLock.acquire();          while (queue.isEmpty()) {              wait(queueLock, queueEmptyCV);         }         myTask = queue.dequeue();          signal(queueFullCV); -- OR -- notifyAll(queueFullCV); //###          queueLock.release();          doStuff(myTask); // Go off and do something with the task.     } } 

This is from https://en.wikipedia.org/wiki/Monitor_(synchronization). I have tried a lot but I cannot understand that when notifyAll(queueFullCV) is called at //### why is there not a race condition in while loop of //####. I can easily see many treads taking off and then, since while (queue.isFull()) is false at that instant, go and queue.enqueue(myTask) more than capacity.

//OR//

Can only one tread at a time acquire the queueLock, and after one queue.enqueue(myTask), when the other’s turn comes while (queue.isFull()) is full and then go back to sleep again? In that case, what is the need for notifyAll(queueFullCV) when only one tread would get the queueLock?

Does Aura of Courage end the frightened condition if a frightened ally enters its area of effect?

So I just made level 10 with my paladin and got the added feature “Aura of Courage.” I understand that currently I and anyone within 10 ft of me will be immune to the frightened condition. My question then:
If one of my allies is currently frightened and runs into my Aura, do they lose their frightened condition automatically? Or would they just pass through and keep running around?

I’m interested in RAW and what other DMs have ruled here.

Clarification of the proof involving the regularity condition in Master Theorem

I was going the text Introduction to Algorithms by Cormen Et. al. Where I came across the following statement in the proof of the third case of the Master’s Theorem.

(Master theorem) Let $ a \geqslant 1$ and $ b > 1$ be constants, let $ f(n)$ be a function, and let $ T (n)$ be defined on the nonnegative integers by the recurrence( the recursion divides a problem of size $ n$ into $ a$ problems of size $ n/b$ each and takes $ f(n)$ for the divide and combine)

$ T(n) = aT(n/b)+ f (n)$ ;

where we interpret $ n/b$ to mean either $ \lceil b/n \rceil$ or $ \lfloor b/n \rfloor$ . Then $ T(n)$ has the following asymptotic bounds:

  1. If $ f(n)=O (n^{log_ba – \epsilon})$ for some constant $ \epsilon > 0$ , then $ T(n)=\Theta (n^{log_ba})$ .

  2. If $ f(n)=\Theta (n^{log_ba})$ , then $ T(n)=\Theta (n^{log_ba}lg n)$

  3. If $ f(n)=\Omega (n^{log_ba + \epsilon})$ for some constant $ \epsilon > 0$ , and if $ af(n/b) \leqslant cf(n)$ for some constant $ c < 1$ and all sufficiently large n, then $ T(n)=\Theta (f(n))$ .

Now in the proof of Master’s Theorem with $ n$ as exact power of $ b$ the expression for $ T(n)$ reduces to :

$ $ T(n)=\Theta(n^{log_ba})+\sum_{j=0}^{log_bn -1} a^jf(n/b^j)$ $

Let us assume,

$ $ g(n)=\sum_{j=0}^{log_bn -1} a^jf(n/b^j)$ $

Then for the proof of the 3rd case of the Master’s Theorem the authors prove that,

If $ a.f(n/b)\leqslant c.f(n)$ for some constant $ c<1$ and for all $ n\geqslant b$ then $ g(n)=\Theta(f(n))$

They say that as, $ a.f(n/b)\leqslant c.f(n) \implies f(n/b)\leqslant (c/a).f(n)$ then interating $ j$ times yeilds, $ f(n/b^j)\leqslant (c/a)^j.f(n)$

I could not quite get the mathematics used behind iterating $ j$ times.

Moreover I could not quite get the logic behind the assumption of $ n\geqslant b$ for the situation that $ n$ should be sufficiently large.(As the third case of the Master’s Theorem says).

Moreover in the similar proof for the third case of the general master theorem( not assuming $ n$ as exact powers of $ b$ ) there again the book assumes that $ n\geqslant b+b/(b-1)$ to satisfy the situation of sufficiently large $ n$ .

I do not quite understand what the specific value has to do and why such is assumed as sufficiently large $ n$

(I did not give the details of the second situation as I feel that it shall be something similar to the first situation)