I need codes with non-obvious time complexities for testing gpt-3 / codex abilities

Revision en2, by Guuber, 2022-04-30 17:10:05

I have been playing lately with the programming abilities of Codex and one thing that surprised me was how accurately it figured out the time complexities of the codes. I have only tested with about 10-20 competitive programming codes and it has deduced the time complexities correctly in every of them. Most of the codes were pretty simple / standard, so I got curious of how "complicated" codes it could guess the time complexity correctly. My intuition is that it could be hard to interpret the time complexity from recursion with a non-trivial base case but I haven't yet tested this too much.

So my challenge for you is to create program(s) from which Codex can't "guess" the time complexity correctly and posting the code as a comment below.

By guessing I mean that I give the code + a line like "// The time complexity of the algorithm is " and let the codex fill out the rest (usually the time complexity in big O notation)

Tags gpt3, codex, challenge

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Guuber 2022-04-30 17:10:05 222 I changed GPT-3 to Codex and added the extra clarification about the word "guess"
en1 English Guuber 2022-04-30 02:23:05 842 Initial revision (published)