Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What exactly is Input size

When I am about to know some algorithms I confused about what exacly is input size.
For example in travelling sales person problem dynamic programming implementation takes O(2n Ă— n2)
And krushals algorithm takes
O(E log V).Though both are graph problems why TSP input size is no.of Vertices n and krushals input size is in Edges and Vertices.
How to know exactly what can be taken as input size

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading