## When using the evocation wizard’s Sculpt Spells, can you protect fewer creatures than the maximum you are allowed?

The Evocation Wizard’s Sculpt Spell ability allows the wizard to protect some creatures from their own evocation spells:

When you cast an Evocation spell that affects other creatures that you can see, you can choose a number of them equal to 1 + the spell’s level. The chosen creatures automatically succeed on their Saving Throws against the spell, and they take no damage if they would normally take half damage on a successful save.

Does the number of chosen creatures need to be exactly equal to 1 + the spell’s level, or can it be lower?

For example, if an evocation wizard casts Fireball, can they choose 1, 2, or 3 creatures to be protected from the spell, or do they need to select either zero or exactly 4 creatures?

## FOR THE KLEPTOMANIACS OUT THERE:

Let’s say we’re attempting to pickpocket something from someone and would like to reduce our chances of failure as much as possible. What is the highest minimum roll and maximum roll reliably possible in the game? In order to make this easier to replicate for others, I’m going to offer some restrictions:

• Things that are not largely guaranteed in most games, such as: Boons, Artifacts, and Manuals.
• This can be any level character up to 20th level, all that matters is that it still remains the highest min and max roll for the check.
• Must be acting alone and receive assistance only from themselves, their items, feats, racial abilities, class features, etc.

These restrictions should ensure that the check can be performed reliably any time it is made by anyone with the proposed build in nearly any campaign with the average amount of magical items and quest rewards, etc.

I will post my own findings as an answer below. Feel free to use it as a frame for further answers, or offer one all your own.

## 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.

## Is there any security risk in not setting a maximum password length?

I’m a listener of the podcast "Security Now" where Steve Gibson, a security expert, often claims that there are no reasons to limit the number of characters a user can use in their passwords when they create an account on a website. I have never understood how it is even technically possible to allow an unlimited number of characters and how it could not be exploited to create a sort of buffer overflow.

I found a related question here, but mine is slightly different. The author of the other question explicitly mentions in their description that they understand why setting a maximum length of 100000000 characters would be a problem. I actually want to know why it would be a problem, is it like I have just said because of buffer overflows? But to be vulnerable to a buffer overflow, shouldn’t you have a sort of boundary which you can’t exceed in the first place, and thus if you didn’t limit the number of characters, would you even have this risk? And if you are thinking about starving a computer’s RAM or resources, could even a very large password be a problem?

So, I guess it is possible not to limit the number of characters in a password: all you’d have to do would be to not use the maxlength attribute or not have a password validation function on the server side. Would that be the secure way to do it? And if it is, is there any danger in allowing an unlimited number of characters for your passwords? On the other hand, NIST recommends developers to limit passwords to 256 characters. If they take the time to recommend a limitation, does it mean there has to be one?

## Find the maximum number of valid cartesian coordinates

Given a list X containing m number of x coordinates and a list Y containing m number of y coordinates. The coordinate (x, y) is valid if and only if the difference between x and y is less than or equal to d. I need to find out the maximum number of valid coordinates. Here is my algorithm.

``sort the list X in non-decreasing order sort the list Y in non-decreasing order for x in X:      for y in Y:          if abs(x - y) <= d:              let x match with y              remove x from X              remove y from Y ``

Can this algorithm give me maximum number of valid pairs? If yes, is there any more efficient algorithm? The nested loop means the worst-case time is $$O(m^2)$$. Is there any log linear time $$O(mlogm)$$ algorithm for this question?

## Time complexity about Maximum subarray

I recently came across a function called the strawman algorithm which the pseudo code looks like this:

``StrawmanSubarray(A):   Initialize bestsum = A[0]        For left=0 to n-1:         For right = left to n-1:            Compute sum A[left] + . . . + A[right]            If sum > bestsum: bestsum = sum ``

The time complexity is Θ (n^3), and I don’t quite get where is the 3rd n comes from to get Θ (n^3)?

## Algorithm for summation with lowest maximum temporary sum

I’ve got this problem on my last exam, which I struggle to deal with.

Lets say we have array of N integers (it can be float too, but lets say integers for sake of simplicity. We need to sum those numbers, but we can only use operation of summing two adjacent numbers. Goal of algorithm is to sum this sequence, so maximum of sum from this operation will be lowest possible.

For example: Lets say we have array -2 5 -3. First we sum 5 and -3, so the temporary sum is 2, and our sequence changes to -2 2. Then we sum -2 and 2, so now our temporary sum is 0. As we see, maximum of temporary sums was 2, and we cant get any lower. (summing -2 and 5 would give us 3, which is higher that 2).

My goal on that exam was to find best complexity algorithm, and proof its correctness.

What i tried: First thought was to use greedy algorithm, so just sum those two numbers which give lowest temporary sum right now. Problem is, i cant neither prove it is valid way to solve it, or find any counterexample. So i write here, maybe someone finds it interesting. Thanks for your attention

## Maximum (s,t) flow in a simple graph – BIG O

0

Given a simple graph (at most one edge between u-v), with no loops or parallel edges, I have to prove that max (s,t) flow is at most O(v^2 / d^2).

I understand that this is asking to prove max flow <= C* (V^2/d^2) for some positivie c. I asked my TA (teacher assistant) and he said that we’d need to prove this by contradiction

MY PROOF

Assume for a contradiction, there’s more than one edge between some vertices x and y. The shortest path is distance ‘d’. I’m stuck after this. In other words, I need to show that the minimum cut cannot be > v^2 / d^2

## What is the maximum number of known spells (that can be cast with spell slots and use Charisma) a character can have?

I often find it frustrating how few spells sorcerers have. This has led me to trying to increase the number of spells they have with a few multiclassing dips. I was then inspired to ask this question:

What is the maximum number of spells known a character can have?

I want this to be achieved primarily through multiclassing, so there are a few restrictions:

• The spells must be cast using Charisma as the spellcasting modifier, so multiclassing into Wizard or Druid doesn’t help;
• I’m not including features you’d get through subclasses (i.e. Eyes of the Dark gives you darkness for free), since I want this solution to be a template I can stick any subclasses onto;
• A bard’s Magical Secrets is allowed, since that’s a base class feature, but Additional Magical Secrets is not, since that’s Lore bard only;
• Feats are allowed, but Epic Boons and magic items are not;
• I’ll allow Unearthed Arcana for this one, for example UA feats;
• The spells known must be cast via your spell slots that you have via your class features;
• Polymorphing into something else that can cast spells is not allowed;
• Assume a level 20 character, and whatever ability scores are necessary (although I imagine that’ll just be Charisma 20);
• Also note that this question has nothing to do with the number of spell slots, only spells known.

## Best Algorithm for Minimum Cost Maximum Flow?

Can someone tell me which is the best algorithm for minimum cost maximum flow (and easy to implement) and from where to read will be helpful . I searched online and got names of many algorithms and unable to decide which one to study .