Блог пользователя Libraion

Автор Libraion, история, 3 года назад, По-английски

Given a undirected graph with $$$N (N \leq 100)$$$ vertices, $$$M (M \leq N * (N + 1) / 2)$$$ edges (there can be edge connect a vertex with itself but all edges are distinct).

Find the number of minimum paths that every edge is in exactly 1 path.

Thanks.

UPD: I just realized it is sum of (odd vertices / 2) for every connected component (and some special case like m = 0, odd vertices = 0).

  • Проголосовать: нравится
  • +38
  • Проголосовать: не нравится

»
3 года назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

just find Eilerev way ? or am i wrong ?

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится +24 Проголосовать: не нравится

    Sorry I don't understand what you mean. Could you elaborate it a bit?

    • »
      »
      »
      3 года назад, # ^ |
        Проголосовать: нравится -24 Проголосовать: не нравится

      As I understand it, a non-weighted graph is given and we want to visit all the edges exactly once, but exactly this is done by the algorithm of the eleree path, there is a theorem when it is possible to traverse all the edges once.

      • »
        »
        »
        »
        3 года назад, # ^ |
          Проголосовать: нравится +24 Проголосовать: не нравится

        So what happen when there is > 2 odd degree vertex that you cannot fit every vertices into 1 path. Then how many paths? And what if after finishing 1 path you make the graph unconnected ... etc.

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Libraion (previous revision, new revision, compare).