dynamic programming – Maximum sum of elements from each column of the 2 x n matrix

Given the $2times N$ matrix, the algorithm should maximize the total sum of points from each column of the matrix.
I should choose only one point from each column, and I can choose the points consecutively up to two in the same row of matrix.

Input is $2times N$ size matrix, and the output is the maximum total sum.

For example, for $2times 3$ matrix $A=begin{bmatrix}1&5&7\3&6&11end{bmatrix}$, without the constraint, the answer will be $3+6+11=20$. But with the constraint, the algorithm should give $3+5+11=19$ as the output.

How can I do this in recursive manner? (I want it in polynomial time complexity.)

brute force – What determines maximum thread-count when using Bruteforce programs?


When using most brute-force tools, there is usually an option to set thread count. What is the maximum thread count we can set in those programs. Say gobuster a directory buster based in go


What determines the maximum threads one could set in those options? Does it depend on how many CPU cores? But I’ve seen blog posts where people set to 20-30 threads -t 30

I also see that /proc/sys/kernel/threads-max is 255211 , so would that be the maximum we can set ?

plotting – Why are my polar grid lines limited by the maximum radial value?

I am wondering why the displayed polar grid lines are limited by the maximum plotted value (see minimal example below) – is it possible to show polar grid lines beyond the largest radial value?

Thanks and Best,

{ListPolarPlot({{(Pi)/4, 0.5}}, PlotRange -> {{-1, 1}, {-1, 1}}, 
  PolarGridLines -> {Range(0, 2 (Pi), 2 (Pi)/24), Range(0, 1, 0.1)}),
 ListPolarPlot({{(Pi)/4, 0.8}}, PlotRange -> {{-1, 1}, {-1, 1}}, 
  PolarGridLines -> {Range(0, 2 (Pi), 2 (Pi)/24), 
    Range(0, 1, 0.1)})}

complex analysis – maximum product of distances of a point and vertices of equilateral triangle

If $ABC$ is an equilateral triangle. $P$ is a variable point inside the triangle or on its sides. We need to find the maximum product of $AP cdot BP cdot CP$.

This question is in a Complex Analysis homework.
I don’t know how can I use the complex analysis (maybe, maximum modulus theorem ) to find the maximum product.

multivariable calculus – How to prove the position of maximum of $ sin (x+y-z)+sin (x-y)+sin (x+z) , $?

I have this three-variable real function
$$ sin (x+y-z)+sin (x-y)+sin (x+z) , $$
where $-3<y,z<3$, but I do not know the range of $x$.

According to numerical data, I see that the maximum of this function happens at $y=z=0$ regardless of the value of $x$. How can I prove this by formula? Any hints are appreciated.

looking for counterexample for my algorithm for maximum independent set in Bipartite Graph

Consider the following graph:

bipartite graph

None of the vertices has degree 1, so we go straight to step 5. Your algorithm would return 5 as the maximum independent set size, as both $L$ and $R$ have 5 vertices. However, the actual maximum independent set is ${1, 2, 3, 6, 7, 8}$, which has 6 vertices.

php – Error maximum execution time exceeded en XAMPP

Estoy tratando de importar una base de datos en phpmyadmin, pero me da el siguiente error.

Fatal error: Maximum execution time of 300 seconds exceeded in C:xamppphpMyAdminvendorphpmyadminsql-parsersrcLexer.php on line 805

Cabe aclarar que probé modificando el valor $cfg[‘ExecTimeLimit’], pero luego me aparece una página en blanco en phpmyadmin y tuve que volver a reinstalar todo.

network flow – Assignment Problem with Minimum and Maximum constraints

I have the following problem:

In a school, there are n students and m clubs, with n > m. Each student needs to be assigned a club. The students have preferences, (say top 3 or top 5) of the clubs they wish to be matched to. So far, it’s basically just a maximum weight matching in a weighted bipartite graph, which can be done through the Hungarian algorithm.

But now the constraint is that there’s both a maximum and a minimum number of slots that each club can accommodate. A way to deal with the maximum constraint would be to have multiple copies of each club, one for each slot, and then run the Hungarian algorithm to calculate the maximum weight matching as before. However, we also want a minimum number of students in each club, say to make the club functional – and this number can be different for different clubs based on popularity. Is there any way to do this? Would it mean a tweak to the main algorithm, or perhaps just a post-algorithm shuffling?