What happens to a character whose load exceeds maximum?

Rules give us 3 value ranges for load: Light, Medium and Heavy.

There are respective bonuses/penalties to those loads. I couldn’t find any mention of what happens after exceeding heavy load range (endpoint is named maximum load).

Can such character even move? Does such character get damaged by being smashed to the ground by his/her own equipment?

Also – what happens to creatures that are extremely heavy on their own (let’s say dragons) when their strength drops to very low levels? I can’t believe that such dragon would be able to move if it had strength of a regular human.

Maximum sum path in a matrix

Given a square matrix of size N X N (1 <= N <= 1000) containing positive and negative integers with absolute value not larger than 1000, we need to compute the greatest sum achievable by walking a path, starting at any cell of the matrix and always moving downwards or rightwards. Additionally we also have to find the number of times that this sum is achievable.

For example:
For the matrix
1 1 1
2 2 2
3 3 3
The maximum sum is 12 and it occurs only once

Why does NMaxmize miss this true maximum?

I am having trouble with maximizing a function which appears as a curvature of a planar curve.

{tmin, tmax} = {0, 2 Pi}  f=-((6-3 Cos[t]-Cos[3 t])/((-11+6 Cos[t]+8 Cos[2 t]-6 Cos[3 t]+Cos[4 t])   Sqrt[Cos[t]^2+9 Sin[t]^2-12 Cos[t] Sin[t]^2+4 Cos[t]^2 Sin[t]^2]));  NMaximize[{f, tmin <= t <= tmax}, t] 

says that the maximum of f is attained at

{1.37888, {t -> 5.78352}} 

But,

Plot[f, {t, tmin, tmax}, PlotRange -> Full] 

indicates that the true maximum is attained at t=Pi

Why is this happening? I’m using Mathematica version 12.0.0 for Microsoft Windows (64-bit).

Maximum characters in a deterministic Turing machine

Assume we have a deterministic Turing machine $$M = (q_s, q_a, q_r, \Sigma, \Gamma, \delta, Q, b)$$ where $$q_s,q_a,q_r$$ are the (unique) starting state, accept state and reject state respectively, $$Q$$ the set of non-final states, $$\Sigma$$ the input alphabet, $$\Gamma$$ the tape alphabet, $$\delta$$ the transition function and $$b \in \Gamma$$ the blank symbol.

How many characters can fit in $$\Gamma$$, as a function of $$|\Sigma|, |Q|$$ such that for each $$c \in \Gamma$$, $$\delta$$ will be defined by it for some state and character?

Path with maximum coins in directed graph

I am trying to solve this question:

A game has n rooms and m tunnels between them. Each room has a certain number of coins. What is the maximum number of coins you can collect while moving through the tunnels when you can freely choose your starting and ending room?

Input

The first input line has two integers n and m: the number of rooms and tunnels. The rooms are numbered $$1, 2, \dots, n$$.

Then, there are n integers $$k_1, k_2, \dots, k_n$$: the number of coins in each room.

Finally, there are m lines describing the tunnels. Each line has two integers a and b: there is a tunnel from room a to room b. Each tunnel is a one-way tunnel.

Output

Print one integer: the maximum number of coins you can collect.

Constraints $$1 \le n \le 10^5, 1 \le m \le 2 \cdot 10^5, 1 \le k_i \le 10^9 1 \le a,b \le n$$

Example:

Input: 4 4 4 5 2 7 1 2 2 1 1 3 2 4  Output: 16 

I was thinking of doing a dfs but it’s unclear to me how to go about it, given the existence of cycles.

Does reduction of maximum hit points stick to the form it is applied to?

Following up on How does Max-HP reduction affect wild-shaped/polymorphed creatures?, which states:

Damage taken in animal form doesn’t affect your original form’s HP unless you’re dropped to 0 HP in animal form and there’s excess damage. Nowhere is it suggested that max-HP reduction would work any differently. Because Wild Shape/Polymorph gives you a new pool of HP, only that pool is affected by the reduction.

Context

A druid gets seduced by a succubus. They kiss while the druid is in bear form – this is not hypothetical as yesterday exactly this had happened. The druid gets lowered Maximum Hit Points because of this forced romance. So according to the linked Q&A, the reduction would only apply to the bear form.

Question

If the druid reverts back to normal, the HP reduction is not active anymore. What if the druid wild shapes another time, back into a bear: does it get a fresh “pool of HP”, or does the Reduced Max HP stay with its bear form until it gets “cured”?

In other words: are shapeshifters actually really resilient against abilities that reduce maximum hit points?

Example

In case it helps to clarify, let’s use these numbers:

1. Druid: 45 HP
2. Wild Shapes into Brown Bear: 34 HP, but reduced to 10 Maximum HP (after two kisses).
3. Druid reverts back to normal: 45 HP
4. Wild Shapes back into Brown Bear: 34 HP, or still at 10 HP?

N 3d integer points in box with maximum average distance

given a 3d cube with a size of m x m x m, is there an efficient algorithm to find N integer points with the average Euclidean distance between each pair maximized? If not, is there any evolutionary approach I can take to this, so in each step the solution will be improved?

Thanks!

Ant Colony Optimization on Maximum Partitioning Graphs with Supply and Demand

I’m still new to the field of Computer Science and I’m having trouble understanding this paper An ant colony optimization algorithm for partitioning graphs with supply and demand. Can I ask for a simpler explanation of the paper?