0

Write a program that simulates a positional game, such as the connectivity game, between a given number of players.

At the beginning of the game the board contains all the edges of a complete graph with n vertices (all the pairs formed with distinct numbers from 1 to n). Each player extracts edges successively from the board and must create with them a spanning tree of the initial complete graph. The game ends when either a player makes a spanning tree (in this case the winner receives n points and the others 0) or when all edges have been removed from the graph (in this case each player receives a number of points equal to the number of vertices of their largest partial tree). I have to consider the situation when the player choose random an edge and when a "smart" player should try to extend its maximal tree while not allowing others to create a spanning tree.

AdryL
  • 33
  • 3

0 Answers0