Disclosure: I built GTU Hero, a site that shows GTU previous-year papers with repeated questions highlighted. This post is about the counting exercise behind it.
Students at Gujarat Technological University (GTU) love "IMP question" lists. Google autocomplete suggested phrases like gtu imp question bank sem 2 when I checked in October 2026. The problem with most of those lists is that nobody says where they came from.
So I tried a boring question first: if you take the official papers for one subject and just count, what actually repeats? No ML, no scraping tricks. A folder of PDFs, a spreadsheet and some Python. This post is the build story, including the parts that broke.
The dataset
I counted 44 official papers across three first-year subjects:
| Subject | Code | Papers |
|---|---|---|
| Mathematics-2 | 3110015 | 9 (Summer 2022 to Summer 2026) |
| Mathematics-1 | 3110014 | 9 (same sessions) |
| Mathematics-1 | BE01000041 | 4 (Winter 2024 to Summer 2026) |
| Physics | 3110011 | 9 |
| Physics | 3110018 | 9 |
| Physics | BE01000021 | 4 |
Every PDF came from GTU's own question paper repository (gtu.ac.in/Download1.aspx: pick a session, pick BE, search the subject code). No third-party uploads, so anyone can rebuild the numbers.
Step 1: get text out of the PDFs
I ran pdftotext on every file and checked the output length. Most papers gave somewhere between 3,000 and 8,000 characters. Then there was the Winter 2025 paper for 3110014. The PDF is about 195 KB, but pdftotext returned 587 characters, which is just the header: subject code, date, time, total marks. The questions were images.
That is the first lesson: a length check per file catches silent extraction failures. If I had only looked at the combined output, I would have counted that paper as "has no questions". For the image-based papers I read the pages as images instead.
Step 2: decide what a "topic" is
This is the part no library does for you. I tagged every sub-question, OR options included, with a topic like "Green's theorem" or "Ruby laser". The rule that kept the counts honest:
A topic counts once per paper if it appears anywhere in that paper, compulsory question or OR option.
Without that rule, a paper with Green's theorem in both Q.1 and an OR option would count twice and inflate the repeat rate.
Judgement calls still happen. One Summer 2025 Mathematics-2 question solves an initial value problem without the word "Laplace" in it, but it sits in the Laplace question, so I counted it as Laplace. Calls like that are noted in the data so someone else can disagree.
Step 3: a long CSV, not a wide one
My first version was a wide sheet: one row per topic, one column per session. It is nice to read and annoying to validate. The shipped version is long: one row per topic per paper, with a 0 or 1.
subject_code,subject,topic,unit_or_module,session,appeared,position
3110015,Mathematics-2,Green's theorem (evaluate/verify),,S2022,1,Q2c-OR
3110015,Mathematics-2,Green's theorem (evaluate/verify),,S2023,1,Q1c
Long data means the summary can be recomputed and checked against the hand-built one:
import csv
from collections import defaultdict
hits = defaultdict(int)
checked = defaultdict(int)
with open("data/topic_by_paper.csv", newline="", encoding="utf-8") as f:
for r in csv.DictReader(f):
key = (r["subject_code"], r["topic"])
checked[key] += 1
hits[key] += int(r["appeared"])
for (code, topic), n in sorted(hits.items(), key=lambda kv: -kv[1]):
if code == "3110015" and n == checked[(code, topic)]:
print(f"{n}/{checked[(code, topic)]} {topic}")
Nothing clever. My rebuild script does the same thing and fails loudly if a count in the summary file does not match the per-paper rows, so the two files cannot drift apart.
What the counts showed
Mathematics-2 (3110015), 9 papers. I tagged 22 topics. Nine appeared in all 9 papers: Green's theorem, div/curl checks, Fourier integral, a Laplace initial value problem, variation of parameters, undetermined coefficients, Euler-Cauchy equations, equations not of first degree (p and Clairaut), and power series solutions. Green's theorem sat in the compulsory Q.1(c) in 8 of the 9 papers.
Syllabus hours are not exam frequency. The official syllabus gives the Fourier integral unit 2 teaching hours and lists no separate weightage for it. It still appeared in all 9 papers.
Mathematics-1 (3110014). 7 of 23 tagged topics appeared in every one of the 9 papers, including Fourier series, local extreme values of f(x, y) and change of order of integration.
The newer code is more uniform. For BE01000041, 15 of 19 tagged topics appeared in all 4 papers. With only 4 papers that is an early signal, not a law.
Physics. For 3110011, four topics were in all 9 papers: Ruby laser, torsion, NDT and a superconductor critical field numerical. For 3110018, solar cell or photovoltaic effect was the only topic in all 9.
Exact repeats exist. I logged 38 questions that came back copy-paste level in two or more sessions. One Physics numerical (ultrasonic source at 0.09 MHz, pulse returning after 0.55 s) shows up in two 3110011 papers and two BE01000021 papers. That one jumped across subject codes.
Where it gets messy
- One subject name, several codes. GTU has more than one "Mathematics-2". 3110015 covers vector calculus, Laplace and series solutions. BE02000011 covers matrices, ODEs and complex variables. Tallies do not transfer between codes, so my data stores the code on every row.
- The same PDF under two codes. Where one file was served under two codes, I counted it once, otherwise the numbers double.
- Possible under-counting. A few lines in the 3110018 Summer 2025 and Summer 2026 PDFs did not extract as text, so those two papers may be slightly under-counted.
- Small samples. Four papers is not a pattern yet.
- Past repetition is not a promise. GTU can change a paper any time. Use counts to decide the order of study, not what to skip.
Try it yourself
You do not need my files to repeat this. Download one subject's papers from the GTU repository, tag each sub-question with a topic, keep one row per topic per paper, and count. It takes an evening per subject and you will know your paper better than any IMP list.
If you are a GTU student and want the plain-language version of the Mathematics-2 count, with the exam pattern and a study plan, it is here: GTU Maths 2 Paper: PYQs, Old Papers and Repeated Sums.
If you have counted exam questions before, how did you handle topics that straddle two chapters? I tagged by the main method the question asks for, and I am not sure that is the best rule.
Writing note: I used an AI assistant to help tidy the draft. The counting, the numbers and the judgement calls are mine and were checked against the papers.
Top comments (0)