CambelFatih / KruskalPrime

Kruskal and Prima Create Graph Algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimum-Spanning-Tree

Create the matrix after adding your nodes. Tapping the nodes increases their cost.

12

Select the algorithm you want Kruskal or Prim's and press run.

3 4

Instructions

Please Read The Instructions That Are Written Here Before Running The Program ...

  • When the program starts, you can add nodes by clicking on the white screen
  • How many nodes you will create, you must first create the nodes and then click the create matrix button.
  • Please click the create matrix button after adding as many nodes as the number of nodes you will add.
  • When the create matrix button is clicked, a matrix is created on the tabpage1 page of the tabcontrol object on the right.
  • If you press the left click of the mouse on the buttons in the matrix, the connection between the nodes is established and the cost between the nodes increases one by one with each click, and you will see that it increases faster.
  • If you press the mouse's right click, the length-cost between nodes decreases. it decreases faster if you hold it down.
  • By pressing the buttons on the matrix or pressing a node and pressing another node, you establish a connection between nodes.
  • The number of nodes is limited to 12 as the matrix can fit as much as the size of the tabepage1 object.
  • If you created the graf, you can select one of the Kruskal or Prim's algorithms and press the run button.
  • When you click the Run button, you can follow through which nodes the algorithm has passed and its total loss from the cost list section.
  • If the graph structure you created is wrong or you want to create a new graph You can click the create a new graph button in the lower left corner.
  • If you click on the checkbox1 object whose text name is 'grid' in the lower left corner, you will change the background of the picturebox1.
  • When you run any of the kruskal or premium algorithms, color changes occur in the graph structure, and the refresh button is used to restore the color changes.
  • Bonus algorithm starts from 0 node.
  • For the Kruskal algorithm to work properly, please make a connection between all nodes. Establish the connections of unconnected nodes.

Talimatlar

Lutfen programı çalıştırmadan önce talimatları okuyunuz...

  • program başladığında beyaz ekrana tıklayarak düğüm(node) ekleyebilirsiniz.
  • kaç adet düğüm oluşturacaksanız, ilk önce düğümleri oluşturup ondan sonra matris oluştur buttonuna basmalısınız.
  • lütfen matris oluştur buttonuna ekleyeceğiniz düğüm sayısı kadar düğüm ekledikten sonra basınız.
  • matris olustur butonuna basıldığında sağ taraftaki tabcontrol nesnesinin tabpage1 sayfasına matrix olusturulur.
  • matrisdeki butonlara mouse'un left click(sol tık)'a basarsanız nodelar arasında bağlantı kurulur ve her bir tıklamada nodelar arasındaki maliyet birer birer artar basılı tutarsanız daha hızlı arttığını göreceksiniz.
  • mouse'un right click(sağ tık)'a basarsanız node’lar arası uzunluk-maliyet azalır. basılı tutarsanız daha hızlı azalır.
  • matrixdeki buttonlara basarak veya bir noda basıp başka bir noda bastığınızda node'lar arası bağlantı kurmuş olursunuz.
  • tabepage1 nesnesinin boyutu kadar matrix sığabildiği için node sayısı 12 ile sınırlandırılmıştır.
  • graf'ı oluşturduysanız Kruskal veya Prim’s algoritmalarından birini seçip çalıştır buttonuna basabilirsiniz
  • Çalıştır butonuna bastığınızda maliyet listesi kısmından algoritmanın hangi düğümlerden geçtiğini ve toplam mağliyetini takip edebilirsiniz.
  • Eğer Oluşturduğunuz graf yapısı yanlış veya yeni bir graf oluşturmak istiyorsanız sol alt köşedeki yeni bir graf oluştur butonuna tıklayabilirsiniz.
  • sol alt köşedeki text ismi 'ızgara' olan checkbox1 nesnesine tıklarsanız picturebox1 in arkaplanını değiştirirsiniz.
  • kruskal veya prim algoritmalarından birini çalıştırdığınızda graf yapısında renk değişimleri olur renk değişimlerini eski haline getirmek için yenile buttonu kullanılır.
  • Prim algoritması 0 nodundan başlamaktadır.
  • Kruskal algoritmasının düzgün çalışması için lütfen bütün node’lar arasında bağlantı Kurunuz. Bağlantısı olmayan düğümlerin bağlantılarını kurunuz.

About

Kruskal and Prima Create Graph Algorithm

License:GNU General Public License v3.0


Languages

Language:C# 100.0%