DEV Community

Cover image for Amateur armed with ChatGPT solves an Erdős problem
Aman Shekhar
Aman Shekhar

Posted on

Amateur armed with ChatGPT solves an Erdős problem

I've gotta admit, when I first heard that an amateur had used ChatGPT to tackle an Erdős problem, I was a mix of skeptical and intrigued. For those who aren't deep in the mathematical weeds, Erdős problems are a set of conjectures and problems posed by the legendary Hungarian mathematician Paul Erdős. They’re often deceptively simple but can stump even the most seasoned mathematicians. So, how did this rookie manage to crack one of these brain-busters with the help of an AI language model? Spoiler: it wasn’t a smooth ride, but the journey was full of insights that I couldn't help but share.

The Magic of AI in Problem Solving

I've been diving into the world of AI and machine learning, and let me tell you, the possibilities are exhilarating. When I first started using models like ChatGPT, I thought they were just fancy chatbots. But as I tinkered with them, I realized these tools can be like a brainstorming buddy on steroids. Ever wondered why brainstorming in a group can sometimes lead to those “Aha!” moments? Well, AI can mimic that process too.

So, when I heard about this amateur mathematician using ChatGPT to tackle an Erdős problem, I was curious about the approach. Using AI as a collaborator is one thing, but solving a complex mathematical problem? That's like using a Swiss Army knife to build a Swiss watch!

The Journey Begins: Setting the Scene

Our amateur hero, let’s call him Alex, had a fascination with combinatorial problems but wasn't exactly a math PhD. He decided to use ChatGPT to help with the Erdős problem involving the distribution of prime numbers. I remember when I first attempted something similar. I was on a quest to optimize a React app when I stumbled upon a performance issue that felt like an unsolvable puzzle. Spoiler alert: I didn't crack it overnight.

Alex initially struggled with how to frame his questions. It’s kinda like trying to explain a complex coding issue to a friend who doesn’t program—context matters. He realized that instead of asking vague questions, he needed to be specific. This made me think about my own experiences with Stack Overflow. The more detail you provide, the better answers you get.

Crafting the Perfect Prompt

After a few trial and error runs, Alex discovered the art of crafting prompts. I remember sitting in front of my terminal, trying to debug a React component. I asked, “Why isn’t this element rendering?” only to get a generic response. It wasn’t until I asked, “What might cause this specific failure in a useEffect hook?” that I found a breakthrough.

For Alex, the turning point came when he started asking ChatGPT to generate specific proofs or propose methods to approach the problem. He learned to present the problem in various ways, sort of like how you might refactor a function to improve its readability. Here’s an example prompt that worked wonders for him:

# Example prompt to ChatGPT
"What are some methods to prove that the number of prime numbers less than n grows asymptotically like n / log(n)?"
Enter fullscreen mode Exit fullscreen mode

This prompted the model to pull together various mathematical concepts into a cohesive approach, giving Alex a clearer path forward.

The Highs and Lows of Collaboration

Of course, it wasn’t all sunshine and rainbows. There were moments of frustration when the AI’s “brilliant” suggestions led him down rabbit holes that went nowhere. I know this feeling all too well when I’m knee-deep in a project and a library’s documentation is less than clear. I once spent an entire afternoon trying to implement a feature with an outdated library, only to discover it had been deprecated.

But that’s the beauty of this collaboration: each failure is a lesson, and Alex learned to take the AI’s responses with a grain of salt. He started cross-referencing its suggestions with actual mathematical literature, which in turn deepened his understanding of the problem.

Celebrating the Breakthrough

After weeks of trial and error, Alex finally hit a breakthrough. He used the AI to help formulate an innovative approach that hadn’t been considered before. What if I told you that this wasn’t just a win for Alex but also a victory for AI as a tool in research? I can't help but feel excited about how technology like this can democratize knowledge and empower us to tackle big problems.

In my own work, I've seen similar breakthroughs using AI to assist with code generation or even to automate mundane tasks in project management. The more I experiment, the more I realize that while AI can’t do everything, it can certainly amplify our capabilities.

Lessons Learned: The Bigger Picture

Reflecting on Alex’s journey got me thinking about the broader implications of using AI in mathematical research and problem-solving. It’s a game-changer. But, we must also address the ethical considerations and the risk of over-reliance. Just like I wouldn’t fully trust an AI to write my entire application without reviewing it, we need to ensure we maintain a critical eye on AI-generated results.

I personally believe that our approach to AI needs to be like a good development workflow: iterative, collaborative, and always open to feedback.

Moving Forward: The Future of AI in Research

As I wrap up my coffee and this blog post, I'm genuinely excited about what the future holds for AI in areas like mathematics, programming, and beyond. Alex's journey is a testament to the fact that with the right tools and mindset, anyone can dive into complex problems.

So, what’s next for you? Will you dive into the world of AI-assisted problem-solving? Or perhaps explore another branch of research? Whatever path you choose, remember: the journey is just as important as the destination. Don’t be afraid to fail, learn, and iterate. After all, that’s what makes us better developers—and, frankly, better humans.


Connect with Me

If you enjoyed this article, let's connect! I'd love to hear your thoughts and continue the conversation.

Practice LeetCode with Me

I also solve daily LeetCode problems and share solutions on my GitHub repository. My repository includes solutions for:

  • Blind 75 problems
  • NeetCode 150 problems
  • Striver's 450 questions

Do you solve daily LeetCode problems? If you do, please contribute! If you're stuck on a problem, feel free to check out my solutions. Let's learn and grow together! 💪

Love Reading?

If you're a fan of reading books, I've written a fantasy fiction series that you might enjoy:

📚 The Manas Saga: Mysteries of the Ancients - An epic trilogy blending Indian mythology with modern adventure, featuring immortal warriors, ancient secrets, and a quest that spans millennia.

The series follows Manas, a young man who discovers his extraordinary destiny tied to the Mahabharata, as he embarks on a journey to restore the sacred Saraswati River and confront dark forces threatening the world.

You can find it on Amazon Kindle, and it's also available with Kindle Unlimited!


Thanks for reading! Feel free to reach out if you have any questions or want to discuss tech, books, or anything in between.

Top comments (0)