Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding info about time complexity #5

Open
einsteinsfool opened this issue Sep 25, 2018 · 2 comments
Open

Adding info about time complexity #5

einsteinsfool opened this issue Sep 25, 2018 · 2 comments

Comments

@einsteinsfool
Copy link

einsteinsfool commented Sep 25, 2018

Christofides algorithm is O(n^3) because this is the time it takes to calculate minimum weight perfect matching. So people using your library might assume that this it's time complexity when in fact it's O(n!) (more precisely A000984). Might be a good idea to inform people about it.

@StupidHobbit
Copy link

Yeah, basically this whole package does not make any sense, because I can just use brute force and solve TSP with few lines of code with the same complexity.

@csaluigm
Copy link

Agree. This line starts to break the time complexity: bipartite_set = [set(i) for i in itertools.combinations(set(odd_vertices), int(len(odd_vertices)/2))]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants