#hitachi20171a. [hitachi2017_1_a]Problem 1

[hitachi2017_1_a]Problem 1

Problem

In what follows assume we are given two graphs. The first graph G=(V,E)G=(V,E) consists of a set of vertices VV and edges EE to which weights shall be assigned. The second graph Gemb=(Vemb,Eemb)G_{emb}=(V_{emb},E_{emb}) also consists of a set of vertices VembV_{emb} and edges EembE_{emb} and shall be a square King's Graph, with vertex labels as illustrated in the figure below. Under the constraints that we explain below, assign each vertex in VV to exactly one vertex in VembV_{emb} such that the following score becomes as high as possible.


Score

For a given output of a source code in which each vertex in the graph GG is assigned to exactly one vertex in the graph GembG_{emb}, the score of the output is calculated as follows:

  • The score is obtained by adding the weight of each edge of the graph GG connecting the vertices u,vu, v, if the corresponding vertices in the graph GembG_{emb} are connected by an edge.
  • To evaluate your total score, we will run your algorithm on a total of 3030 input graphs GG (including 18 random graphs and 12 complete graphs) and add up the corresponding score.*