File size: 2,380 Bytes
8cddfae
1f44dc8
 
 
 
 
 
 
8cddfae
1f44dc8
dd49053
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28ad5e3
dd49053
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
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

```python
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.