stefanbalaz2's blog

By stefanbalaz2, history, 3 years ago, In English

Is there a way to multiply 2 polynomials with complex coefficients by using only 1 FFT and 1 inverse FFT?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By stefanbalaz2, history, 3 years ago, In English

I came across a problem(link in the bottom), brief description:

Given n nodes (n<=10) and m edges (m<=25), whose weights are wi(wi<=1000), u should construct 2 spanning trees from those edges such that the sum of the weights of the chosen edges is minimal.

Then i came across a solution(link in the bottom), brief description:

Lets define important edges. Important edge is an edge such that it is included in every MST. After finding important edges for our graph, we know that they will definatelly be in either first spanning tree or the second spanning tree, so we will try all possibilities of assigning important edges to those two spanning trees, and when trying a possible assignment of important edges, we will first add them to the corresponding spanning tree we assigned them to, and then we will simulate a regular MST building process for the remaining edges, first to build up the first spanning tree, then the second spanning tree. Minimum taken from all the possibilities is the answer.

I have spent hours on trying to prove this, yet i made no progress. Maybe the solution isnt actually correct but rather just passed the test cases.

I would be grateful if someone would have a look at this problem solution.

problem link: https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=0&problem=1748&mosmsg=Submission+received+with+ID+25718261

solution link: https://blog.csdn.net/u012596172/article/details/42610761

Full text and comments »

  • Vote: I like it
  • +23
  • Vote: I do not like it