PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, June 26, 2022

[FIXED] What exactly is Input size

 June 26, 2022     algorithm, complexity-theory, graph, performance     No comments   

Issue

When I am about to know some algorithms I confused about what exactly is input size.

For example in travelling sales person problem dynamic programming implementation takes O(2n × n2)

And Kruskal's algorithm takes O(E log V). Though both are graph problems why TSP input size is the number of vertices n and in Kruskal's algorithm the input size is in Edges and Vertices.

How to know exactly what can be taken as input size?


Solution

You can state an algorithm's complexity in terms of whatever variables you like.

You should generally choose them to clearly communicate useful information about the running time of the algorithm.



Answered By - Matt Timmermans
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing