Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJComments has a deprecated constructor in /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php on line 25 Call Stack: 0.0001 360720 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.0515 1209368 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.0515 1209368 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.3054 4124288 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.3068 4151840 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.3076 4169552 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.3078 4200072 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.3089 4222792 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.3089 4222792 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.3596 4937408 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.3634 5129560 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.3639 5150488 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.3760 5367872 13. Joomla\CMS\Plugin\PluginHelper::importPlugin() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:189 0.3760 5368128 14. Joomla\CMS\Plugin\PluginHelper::import() /var/www/astarmathsandphysics/libraries/src/Plugin/PluginHelper.php:182 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; JCommentsACL has a deprecated constructor in /var/www/astarmathsandphysics/components/com_jcomments/classes/acl.php on line 17 Call Stack: 0.0001 360720 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.0515 1209368 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.0515 1209368 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.3054 4124288 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.3068 4151840 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.3076 4169552 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.3078 4200072 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.3089 4222792 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.3089 4222792 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.3596 4937408 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.3634 5129560 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.3639 5150488 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.6483 13786072 13. JEventDispatcher->trigger() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:199 0.6486 13786472 14. plgContentJComments->update() /var/www/astarmathsandphysics/libraries/joomla/event/dispatcher.php:160 0.6486 13786472 15. plgContentJComments->onContentAfterDisplay() /var/www/astarmathsandphysics/libraries/joomla/event/event.php:70 0.6488 13794720 16. plgContentJComments->onAfterDisplayContent() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:339 0.6490 13796456 17. JComments::show() /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php:282 0.6497 13829504 18. JCommentsFactory::getACL() /var/www/astarmathsandphysics/components/com_jcomments/jcomments.php:188 0.6497 13829904 19. spl_autoload_call() /var/www/astarmathsandphysics/components/com_jcomments/classes/factory.php:274 0.6498 13829984 20. JLoader::load() /var/www/astarmathsandphysics/components/com_jcomments/classes/factory.php:274

Kruskal's Algorithm - Table Form

Kruskal’s algorithm for the minimum spanning tree has a table equivalent. This is useful for large problems where drawing the network diagram would be hard or time-consuming. The table algorithm is also very suitable for automation.

Kruskal's table algorithm has the following steps.

  1. Choose the smallest number (arc length) in the table. Cross out the rows for the vertices at each end of this arc.

  2. Label the column containing this arc (1).

  3. Look for the next minimum arc length in the table. Bracket it, cross out the row, label the column and carry on in this manner until all the columns are labelled.

  4. The length of the minumum spanning tree is the sum of the bracketed numbers.

    The distance table for the above network is

     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    5

    -

    -

    -

    11

    B

    4

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    6

    -

    -

    -

    10

    -

    E

    -

    -

    1

    -

    -

    4

    -

    F

    -

    -

    -

    10

    4

    -

    10

    G

    11

    -

    2

    -

    -

    10

    -

    CE is the minimum length. Cross out rows C and E and label columns C and E as (1) and (2).

         

    (1)

     

    (2)

       
     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    5

    -

    -

    -

    11

    B

    4

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    6

    -

    -

    -

    10

    -

    E

    -

    -

    (1)

    -

    -

    4

    -

    F

    -

    -

    -

    10

    4

    -

    10

    G

    11

    -

    2

    -

    -

    10

    -

    Now look for the smallest number free in the table. It is 2 in row G. Cross out row G and label column G as (3).

         

    (1)

     

    (2)

     

    (3)

     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    5

    -

    -

    -

    11

    B

    4

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    6

    -

    -

    -

    10

    -

    E

    -

    -

    (1)

    -

    -

    4

    -

    F

    -

    -

    -

    10

    4

    -

    10

    G

    11

    -

    (2)

    -

    -

    10

    -

    Look for the smallest free number in the table. We have a choice of the 4's in rows A, B or F. The next smallest entries in rows A, B and F are 5, 6 and 10 respectively. By picking row F to cross out we are keeping shorter lengths in rows A and B 'in the pot'. Cross out row F and label column F as (4).

         

    (1)

     

    (2)

    (4)

    (3)

     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    5

    -

    -

    -

    11

    B

    4

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    6

    -

    -

    -

    10

    -

    E

    -

    -

    (1)

    -

    -

    4

    -

    F

    -

    -

    -

    10

    (4)

    -

    10

    G

    11

    -

    (2)

    -

    -

    10

    -

    The smallest free number is now 4. We have a choice of the 4's in the first or second row. The next smallest entries in rows A and B are 5 and 6 respectively. Cross out row B to keep the 5 available and label column B as 5.

       

    (5)

    (1)

     

    (2)

    (4)

    (3)

     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    5

    -

    -

    -

    11

    B

    (4)

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    6

    -

    -

    -

    10

    -

    E

    -

    -

    (1)

    -

    -

    4

    -

    F

    -

    -

    -

    10

    (4)

    -

    10

    G

    11

    -

    (2)

    -

    -

    10

    -

    The smallest free number is 4 in row A but picking this number would make a cycle (AB and BA)

    The remaining smallest free number is 5 in row A. Cross out row A and label column A as (6).

     

    (6)

    (5)

    (1)

     

    (2)

    (4)

    (3)

     

    A

    B

    C

    D

    E

    F

    G

    A

    -

    4

    (5)

    -

    -

    -

    11

    B

    (4)

    -

    9

    6

    -

    -

    -

    C

    5

    9

    -

    -

    1

    -

    2

    D

    -

    (6)

    -

    -

    -

    10

    -

    E

    -

    -

    (1)

    -

    -

    4

    -

    F

    -

    -

    -

    10

    (4)

    -

    10

    G

    11

    -

    (2)

    -

    -

    10

    -

    Finally the smallest remaining number is 6 in row D. Cross out row D and label column D as (6). The minimum spanning tree is shown below.

Add comment

Security code
Refresh