Matlab code to create k-connected Harary Graph 4

The following is a MATLAB script to create a k-connected Harary Graph of n-nodes. Clearly the inputs required are n (no of nodes) and k (degree of each node).

Also, while the code is a MATLAB script the basic technique to generate the adjacency matrix of the graph can be easily adopted to other languages like C, C++ or Java etc. (The code used the Bioinformatics toolbox of Matlab to display the graph. Check that you have it in your Matlab installation via ‘ver‘ command which would list the installed packages.)

 

A sample run of the above code is shown below:

running matlab harary graph script

running matlab harary graph script

 

The generated graph output for the above code would be like this:

 

harary_graph_result

4.5/5 - (2 votes)

4 thoughts on “Matlab code to create k-connected Harary Graph

  1. Reply monclerc Nov 27,2013 2:32 pm

    Wonderful work! This is the type of info that should be shared
    across the internet. Shame on the seek engines for now not positioning this publish upper!

    Come on over and consult with my website .
    Thank you =)

  2. Reply Clash of Clans hack mac gratuit Mar 7,2015 6:41 pm

    Everything is very open with a precise description of the issues.
    It was truly informative. Your site is useful. Thanks for sharing!

  3. Reply William Jan 29,2016 8:13 am

    Hi, There’s no doubt that your web site might be having internet browser compatibility problems.
    Whenever I take a look at your website in Safari, it looks fine however when opening in I.E., it’s got some overlapping
    issues. I simply wanted to provide you with a quick heads up!
    Besides that, wonderful blog!

Leave a Reply