Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. How can i write the code about undirected graph?
Forum Updated to NodeBB v4.3 + New Features

How can i write the code about undirected graph?

Scheduled Pinned Locked Moved C++ Gurus
1 Posts 1 Posters 936 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    trouble34
    wrote on last edited by
    #1

    i have an problem with a question.there is an undirected graph and below is a sample file:
    3 7
    5 24
    12 45
    ...
    Each line above specifies an edge. I want to convert this to adjacency-list in C++.And here are my questions:
    Sparsity of the graph
    Degree of a vertex
    Max, min, and avg. degrees.
    Shortest path between two vertices
    Shortest path passing through a particular vertex
    Average shortest path length.
    Diameter of the graph.

    I just want to understand how can i start to write these codes.I need the codes,but even if you cannot write all ,just give the ideas about how to implement them.Thank you:))))

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved