OK, I asked "Caude 3.5 Sonnet" AI for "Boost remove edge constant time" and got C++ class FastGraph.
It looks constant time for "remove_edge()", but calls "boost::remove_edge()".
I knew that lot of that called Boost code is not constant time.
So I inserted FastGraph into my Boost code proving non-constant runtime for "undirected_graph" remove_edge from here:
https://github.com/Hermann-SW/graph/blo ... remove.cpp
The result is new gist I created:
https://gist.github.com/Hermann-SW/c9f5 ... e9763381de
Compiles warning free, but execution proves quadratic runtime (doubling number of vertices results in 4x runtime) overall, and that "remove_edge()" cannot be constant time because input graph Wn (the wheel graph on n vertices) is planar and has linear in n number of edges ...
So "Claude 3.5 Sonnet" is definitely better than the two other AIs tested wrt graph theory before, but you still cannot trust it. On the other hand Claude has that disclaimer at the end of every response:
It looks constant time for "remove_edge()", but calls "boost::remove_edge()".
I knew that lot of that called Boost code is not constant time.
So I inserted FastGraph into my Boost code proving non-constant runtime for "undirected_graph" remove_edge from here:
https://github.com/Hermann-SW/graph/blo ... remove.cpp
The result is new gist I created:
https://gist.github.com/Hermann-SW/c9f5 ... e9763381de
Compiles warning free, but execution proves quadratic runtime (doubling number of vertices results in 4x runtime) overall, and that "remove_edge()" cannot be constant time because input graph Wn (the wheel graph on n vertices) is planar and has linear in n number of edges ...
Code:
pi@raspberrypi5:~/graph/example $ g++ -O3 -Wall -Wextra -pedantic fgqr.cpppi@raspberrypi5:~/graph/example $ ./a.out Wn FastGraph runtimes [s]10000 0.03885120000 0.15366840000 0.60810980000 2.40422160000 9.69207pi@raspberrypi5:~/graph/example $
So "Claude 3.5 Sonnet" is definitely better than the two other AIs tested wrt graph theory before, but you still cannot trust it. On the other hand Claude has that disclaimer at the end of every response:
Statistics: Posted by HermannSW — Thu Oct 24, 2024 12:30 pm