metadata
language:
- en
pretty_name: Project Euler Problems
tags:
- code
size_categories:
- n<1k
Project Euler Problems Dataset
A comprehensive collection of mathematical and programming challenges from Project Euler (projecteuler.net), organized for machine learning and educational purposes.
Dataset Description
This dataset contains 918 problems from Project Euler, a series of challenging mathematical/computer programming problems that require creative problem-solving approaches.
Features
- id: Problem number (integer)
- title: Problem title
- problem: Plain text version of the problem statement
- question_latex: LaTeX formatted problem statement
- question_html: HTML formatted problem statement
- numerical_answer: The correct numerical answer
- pub_date: Publication date
- solved_by: Number of people who have solved the problem
- diff_rate: Difficulty rating (percentage of users who solved it)
Splits
The dataset provides several splits for different use cases:
- train/test: Standard 80/10/10 split for machine learning
- train: 734 problems
- test: 184 problems
- easy/medium/hard: Problems grouped by difficulty level
- easy: 277 problems (>25% solve rate)
- medium: 336 problems (5-25% solve rate)
- hard: 305 problems (≤5% solve rate)
- early_problems/later_problems: First half vs. second half of problems by ID
- early_problems: 464 problems
- later_problems: 454 problems
- sample: A random selection of 50 problems for quick experimentation
Usage
from datasets import load_dataset
# Load the entire dataset with all splits
dataset = load_dataset("alexandonian/project-euler")
# Work with specific splits
train_problems = dataset["train"]
hard_problems = dataset["hard"]
sample_problems = dataset["sample"]
# Example: Get a problem
problem = train_problems[0]
print(f"Problem #{problem["id"]}: {problem["title"]}")
print(problem["problem"])
print(f"Answer: {problem["numerical_answer"]}")
Potential Applications
- Training math problem-solving models
- Generating solutions or solution approaches
- Testing reasoning capabilities of language models
- Educational tools for learning algorithmic thinking
Citation & License
This dataset is provided for research and educational purposes. Project Euler problems are from projecteuler.net.