How to play the mother roc teaching respect in The Curse of the Statuettes

I’m playing Tails of Equestria with my kids, and we’re just about to start the second adventure, "The Curse of the Statuettes".

During the adventure, the party is going to have to face a mother roc, and impress her with respect.

The text from the book says:

If you don’t think the PCs impress the roc, she will start to treat them like her babies – trying to teach them manners and good behavior, keeping them in the nest until she’s satisfied.

I fully anticipate my kids not quite grasping that they have to demonstrate respect, so I want to be prepared for this eventuality. However, I have no idea how to play this.

I appreciate that I might be teetering on the edge of this being an open ended question, but can anyone give me specific suggestions about what the roc might actually do to try and teach manners to the group?

Bare in mind that the roc cannot speak pony language although she can understand it.

Repeatable read: the transaction may not be serializable with respect to other transactions

The text below is from ‘Database System Concepts, Silberschatz. I can’t understand the bolded part. How the transaction may not be serializable with respect to other transactions? And also how a transaction may find some of the data inserted by a committed transaction, but may not find other data inserted by the same transaction?

Repeatable read allows only committed data to be read and further requires that, between two reads of a data item by a transaction, no other transaction is allowed to update it. However, the transaction may not be serializable with respect to other transactions. For instance, when it is searching for data satisfying some conditions, a transaction may find some of the data inserted by a committed transaction, but may not find other data inserted by the same transaction.

Maximize an expression with respect to a variable and minimize it with respect to other variables

I started to use Mathematica a few time ago. I want to minimize the following expression (function of $ l,p,q,r,c$ ) with respect to variables $ l, p, q, r$ and then maximize the result obtained with respect to variable $ c$ . However, when I try to obtain an expression function of $ c$ to maximize later using Minimize, I do not get any result because it takes too long. How can I solve this issue?

Minimize[{(((l^2/2)*(1-(1/4-c))+(l*p)*(1-1/4)+(l*q)*(1-(1/4+c))+(l*r)*(1-1/2)+(p^2/2)*(1-c)+(p*q)*(1-2*c)+(p*r)*(1-(1/4+c))+(q^2/2)*(1-c)+(q*r)*(1-1/4)+(r^2/2)*(1-(1/4-c)))/((l^2/2)*(1-(1/4-c))+(l*p)*(1-1/4)+(l*q)*(1-(1/4-c))+(l*r)*(1-0)+(p^2/2)*(1-c)+(p*q)*(1-(1/4-c))+(p*r)*(1-0)+(q^2/2)*(1-(1/4-c))+(q*r)*(1-1/4)+(r^2/2)*(1-0))), l >= 1, p >= 0, q >= 0, r >= 0, l + p + q + r == 1000000, 1/7<c<1/5}, {l, p, q, r}] 

With respect to differential privacy what should be the qlobal sensitivity for regression in non interactive mode?

I need to make a dataset differentially private on which regression, which in more general sense could be extended to learning any model, is to be performed. I need to calculate the global sensitivity for adding noise. How do I calculate global sensitivity in such cases.

With respect to differential privacy how to find the global sensitivity of queries like ‘maximum height’ ‘Average height’ etc

As much as I have understood,for any query f(x), we need to take maximum of |f(x)-f(y)| over all neighboring databases.

please explain how to find global sensitivity of queries like average height or maximum height.

Plotting the Eigenvectors with respect to a parameter

I have a matrix of the form given below with a parameter $ \lambda$ . I would like to plot the quantity <$ \phi_{i}|Q|\phi_{i}>$ for the every Eigenvectors corresponding to ascending order in Eigenvalues of this matrix with respect $ \lambda$ . I am bit trouble to sort the eigenvectors and plot it w.r.t $ \lambda$ . Pl somebody help me to get that. Here {$ \lambda$ ,0,1.0,0.01}. Here $ |\phi_{i}>$ are the eigen vector of the matrix M.

M[\[Lambda]_] =  { {1, 1 + \[Lambda], -2, 5, \[Lambda], 0}, {0, Sqrt[\[Lambda]] + 3, 6, 7, 0, -3}, {1, 4, 6, \[Lambda] + 2, 0, 1}, {0.6, \[Lambda], 6, 4, 8, 0.5}, {Sqrt[2], 3, 11, Sqrt[\[Lambda] + 4], 0, 1}, {4, 0, \[Lambda], 6, 5, 2}} 

Is this 9th-level spell Find Greatest Steed balanced with respect to other 9th-level spells?

Since the paladin gets the spells find steed and find greater steed, it only seemed natural to take this theme to its logical end: find greatest steed:

9th-level conjuration

Casting Time: 10 minutes
Range: 30 feet
Components: V, S
Duration: Instantaneous

You summon a spirit that assumes the form of the loyalest, majestic-est mount. Appearing in an unoccupied space within range, the spirit takes on a form you choose: a unicorn, a bulette, a felidar, or a nightmare. The creature has the statistics provided in the appropriate statblock for the chosen form, though it is a celestial, a fey, or a fiend (your choice) instead of its normal creature type. Additionally, if it has an Intelligence score of 7 or lower, its Intelligence becomes 8, and it gains the ability to understand one language of your choice that you speak.

You control the mount in combat. While the mount is within 1 mile of you, you can communicate with it telepathically. While mounted on it, you can make any spell you cast that targets only you also target the mount.

The mount disappears temporarily when it drops to 0 hit points or when you dismiss it as an action. Casting this spell again re-summons the bonded mount, with all its hit points restored and any conditions removed.

You can’t have more than one mount bonded by this spell or find steed at the same time. As an action, you can release a mount from its bond, causing it to disappear permanently.

Whenever the mount disappears, it leaves behind any objects it was wearing or carrying.

A mount summoned with this spell cannot take legendary actions. If it normally would have legendary actions, on its turn, it can use its action to take one of its legendary actions.

A paladin can cast this spell consuming two 5th-level spell slots, instead of one 9th-level spell slot.

This spell would appear only on the Paladin spell list, and could be prepared and cast by a paladin once the paladin was 19th-level. Additionally, this spell would be available to an 18th level Bard via magical secrets. I think this spell only being available to 18th level and higher characters is going to be enough to balance it. Compared to true polymorph, the effects here actually seem pretty modest for a 9th level spell; and for the paladin, casting is always going to be limited to once per long rest, as it uses up all of their highest level spell slots.

The mounts I have chosen range from CR 3 to CR 5. The original 2nd-level spell find steed mounts range from CR 1/8 to CR 1/2, and the now penultimate 4th-level spell find greater steed provides mounts ranging from CR 1 to CR 2. These two spells are given a comparative analysis in this answer. This CR 3-5 range seems like an appropriate increase in power, but as with both its predecessors, some of these greatest steeds will be less greatest than others. I’ve carefully chosen four creatures for this spell, I feel that each brings something unique to the table, even though one of them seems to be a head above the rest. Speaking of which…

The Unicorn (CR 5)

If I’m being totally honest, this spell could have been called find unicorniest steed. The unicorn is easily the best mount on the list. It is not the best damage dealer, not even close, but the utility and support the unicorn provides is unparalleled by other creatures on this list. It can cast pass without trace at will, and its ability healing touch is equivalent to a 2nd-level cure wounds twice a day.

The unicorn is the only creature on the list with legendary actions. I felt that giving the unicorn unbridled access to its legendary actions was too much. Additionally, its just easier to keep track of things when I’m not keeping up with my own turn, my mount’s turn, and legendary actions for my mount on other turns. Instead, the unicorn can opt to use one of its legendary actions on its turn. In particular the unicorn’s shimmering shield ability is quite good, and allows the unicorn to excel in its support role.

The Bulette (CR 5)

This guy is the bruiser of the group. At +7 to hit for 4d12+4 damage, the bulette’s bite attack hits like a truck, and AC 17 averaging 93 hp gives him respectable staying power. The bulette really gets interesting with his movement: burrow 40 ft. If you’re nostalgic about catching your first diglet in a cave outside of Vermilion City, the bulette is for you.

The Felidar (CR 5)

The felidar packs a similar punch to the bulette with identical AC and hitpoints, but the felidar is for the more psychically minded adventurer. The felidar has the ability to form a special bond with another creature, granting these benefits:

  • The felidar can sense the direction and distance to the bonded creature if they’re on the same plane of existence.

  • As an action, the felidar or the bonded creature can sense what the other sees and hears, during which time it loses its own sight and hearing. This effect lasts until the start of its next turn.

Similar combat prowess as the bulette, but has some interesting abilities that make the felidar an excellent scout and great insurance policy if his owner gets kidnapped.

The Nightmare (CR 3)

This goth version of the pegasus features an ability that makes it better than his winged celestial brother, earning him a spot on this list. For the most part, the nightmare is identical to the pegasus, which makes him probably the weakest choice on this list. But the nightmare has one ability the earns him his place here:

Ethereal Stride. The nightmare and up to three willing creatures within 5 feet of it magically enter the Ethereal Plane from the Material Plane, or vice versa.

This guy can disappear to the ethereal plane at will. And he can bring his three closest friends. The utility of this ability is limited only by your imagination and how annoyed your DM is that your flaming horse can walk through walls.

Time Complexity of Recursive Ray Tracing with respect to Depth

How does depth of ray tracing affect the run time (role in the complexity) of the recursive ray tracing algorithm with reflection and refraction?

How I have calculated it is, for each ray after intersection, it is split to 2 rays (one for reflection and one is the refracted ray), so the complexity with respect to depth would be exponential time ~O(2^D) for the ray tracing depth D. And for the image resolution of M*N, the complexity would be O(M.N.2^D).

Would you confirm these results, or am I missing something?

Subset of $k$ vectors with shortest sum, with respect to $\ell_\infty$ norm

I have a collection of $ n$ vectors $ x_1, …, x_n \in \mathbb{R}_{\geq 0}^{d}$ . Given these vectors and an integer $ k$ , I want to find the subset of $ k$ vectors whose sum is shortest with respect to the uniform norm. That is, find the (possibly not unique) set $ W^* \subset \{x_1, …, x_n\}$ such that $ \left| W^* \right| = k$ and

$ $ W^* = \arg\min\limits_{W \subset \{x_1, …, x_n\} \land \left| W \right| = k} \left\lVert \sum\limits_{v \in W} v \right\rVert_{\infty}$ $

The brute-force solution to this problem takes $ O(dkn^k)$ operations – there are $ {n \choose k} = O(n^k)$ subsets to test, and each one takes $ O(dk)$ operations to compute the sum of the vectors and then find the uniform norm (in this case, just the maximum coordinate, since all vectors are non-negative).

My questions:

  1. Is there are a better algorithm than brute force? Approximation algorithms are okay.

One idea I had was to consider a convex relaxation where we assign each vector a fractional weight in $ [0, 1]$ and require that the weights sum to $ k$ . The resulting subset of $ \mathbb{R}^d$ spanned by all such weighted combinations is indeed convex. However, even if I we can find the optimum weight vector, I am not sure how to use this set of weights to choose a subset of $ k$ vectors. In other words, what integral rounding scheme to use?

I have also thought abut dynamic programming but I’m not sure if this would end up being faster in the worst-case.

  1. Consider a variation where we want to find the optimal subset for every $ k$ in $ [n]$ . Again, is there a better approach than solving the problem naively for each $ k$ ? I think there ought to be a way to use the information from runs on subsets of size $ k$ to those of size $ (k + 1)$ and so on.

  2. Consider the variation where instead of a subset size $ k$ , one is given some target norm $ r \in \mathbb{R}$ . The task is to find the largest subset of $ \{x_1, …, x_n\}$ whose sum has uniform norm $ \leq r$ . In principle one would have to search over $ O(2^n)$ subsets of the vectors. Do the algorithms change? Further, is the decision version (for example, we could ask if there exists a subset of size $ \geq k$ whose sum has uniform norm $ \leq r$ ) of the problem NP-hard?