Auto Question -Answer Generation on
Dynamic Programming
MAHATMA GANDHI MISSION’S COLLEGE OF
ENGINEERING,
NANDED
GUIDED BY:
DR. KAPRE MAM
PRESENTED BY :
TEJAS KOTALWAR (218)
SOHAM KASHETTIWAR (225)
GANESH KONDAMWAR (224)
AKSHRAPLUS (INTERNSHIP)
Introduction to Dynamic Programming
What is Dynamic Programming (DP)?
Dynamic Programming is a technique to solve complex problems by breaking them down into
simpler overlapping subproblems and storing their results to avoid redundant computations.
Applications
It's widely applied in various fields.
• Sequence analysis
• Computational biology
• Text processing
Key Features of DP:
 Overlapping Subproblems:
Problems can be broken down into smaller, repeated subproblems.
 Optimal Substructure:
An optimal solution can be constructed from optimal solutions of
subproblems.
 Memoization or Tabulation:
Used to store subproblem results (Top-down or Bottom-up approach).
Subtopics of Dynamic Programming
 Overlapping subproblems and optimal substructure
 Longest Common Subsequence (LCS)
 Fibonacci sequence and memoization
 Matrix Chain Multiplication
 0/1 Knapsack Problem
 Floyd-Warshall Algorithm
What is LCS (Longest Common Subsequence)?
LCS is the longest sequence that appears in the same relative order (but not necessarily contiguous)
in both strings.
Example:
•String X: ABCBDAB
•String Y: BDCAB
•LCS: BCAB or BDAB (Length = 4)
LCS Characteristics:
•Not a substring (can skip characters).
•Has optimal substructure → perfect for dynamic programming.
•Frequently used in:
• DNA sequence alignment
• File diff tools
• Plagiarism detection
• Code similarity checkers
Time Complexity:
•O(m * n) using DP table (where m and n are lengths of the two strings)
Project Objective
Why Auto Question Generation?
Why Auto Question Generation?
•To reduce manual effort in creating diverse and meaningful coding questions.
•To support automated learning tools, mock tests, and online coding platforms.
•Useful for students, educators, and interview preparation platforms.
Our Goal:
Build an intelligent system that can automatically generate unique, high-quality questions related
to LCS across different categories (conceptual, implementation, algorithmic) and difficulty levels
(easy, medium, hard).
Dataset Creation
Custom Dataset Built for LCS Question Generation
Custom Dataset Built for LCS Question Generation
•Designed a template-based dataset using JSON.
•Each entry includes:
•Template: Text format with placeholders {X}, {Y}
•Category: Conceptual | Implementation | Algorithmic
•Difficulty: Easy | Medium | Hard
•Variables: List of possible values for placeholders
T5 Model Overview
1 Transformer-Based
A powerful model designed for text-to-text tasks.
2 Fine-Tuned
Specifically for generating questions on coding concepts
related to LCS.
3 Dataset
Curated from platforms like HackerRank and LeetCode.
System Workflow
Input
Provide keywords and a difficulty level for the question.
Processing
The system preprocesses data and fine-tunes the T5 model.
Output
The system generates and refines questions with test cases.
S
Y
S
T
E
M
W
O
R
K
F
L
O
Sample Questions Generated
✅ Q1:
"Write a recursive function to compute the LCS of AB and AX."
✅ Q2:
"Find the length of the longest common subsequence between
the strings HELLO and WORLD."
✅ Q3:
"What is the LCS of MNOP and PROGRAM?"
✅ Q4:
"Determine the longest common subsequence of DYNAMIC and
LANGUAGE."
Answer Generation
Answer Generation using BERT Model
Objective:
Automatically understand the type of LCS question and generate the
correct answer or response using classification + logic.
How It Works:
1. 🧾 Input: LCS-related question
e.g., “Find the LCS of apple and maple.”
2. 🧠 Question Classification using BERT
•Fine-tuned a BERT-based classifier to detect the type of question:
•Basic LCS
•Only Length
•Multiple Pairs
•Incomplete/Vague Question
3. 🔁 Function Mapping
•Each category maps to a function from lcs_solver.py:
•solve_basic_lcs() – Extracts and computes full LCS
•solve_lcs_length_only() – Returns only LCS length
•solve_multiple_pairs() – Handles multi-comparison
•solve_incomplete_question() – Gracefully handles vague inputs
Answer Generation
Answer Generation using BERT Model
4. ✅ Answer Output
Example:
Q: "What is the LCS of apple and maple?"
A: 💡 The Longest Common Subsequence is
‘aple’, with length 4.
Conclusion and Future
Scope
AI Automation
AI automates tasks for scalable educational tools.
Future Extension
Extend to other dynamic programming problems.
Multilingual Support
Incorporate multilingual support and interactive components.
Auto-Question-Generation-on-Dynamic-Programming-LCS-1.pptx

More Related Content

PPTX
Compeition-Level Code Generation with AlphaCode.pptx
PDF
Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...
PPTX
Concurrency Programming in Java - 01 - Introduction to Concurrency Programming
PPTX
CS4443 - Modern Programming Language - I Lecture (1)
PDF
Introduction to OpenSees by Frank McKenna
PPT
Oop(object oriented programming)
PPTX
Deep Learning for Machine Translation
PPTX
lect 1 Dr. Maher (3).pptxasdfghjlkjhgfasdfgh
Compeition-Level Code Generation with AlphaCode.pptx
Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...
Concurrency Programming in Java - 01 - Introduction to Concurrency Programming
CS4443 - Modern Programming Language - I Lecture (1)
Introduction to OpenSees by Frank McKenna
Oop(object oriented programming)
Deep Learning for Machine Translation
lect 1 Dr. Maher (3).pptxasdfghjlkjhgfasdfgh

Similar to Auto-Question-Generation-on-Dynamic-Programming-LCS-1.pptx (20)

PPTX
Natural Language Query to SQL conversion using Machine Learning Approach
PDF
Modelica-OpenModelica-slides para aprender.pdf
PPT
Memory models
PPTX
Gnerative AI presidency Module1_L4_LLMs_new.pptx
PPTX
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
PPTX
MiniOS: an instructional platform for teaching operating systems labs
PPTX
Deep Learning Enabled Question Answering System to Automate Corporate Helpdesk
PPTX
Introduction to Finite Automata and model Questions to Students
PPTX
Keynote at IWLS 2017
PPTX
Advancements in HPCC Systems Machine Learning
PDF
ODSC East: Effective Transfer Learning for NLP
PDF
From Commodore 64 to the Cloud — Lessons from 30 years of programming
PDF
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
PPTX
Natural Language to SQL Query conversion using Machine Learning Techniques on...
PPT
Viva slides_secured objective programming
PDF
Domain-Specific Term Extraction for Concept Identification in Ontology Constr...
PPTX
Expection Setting - 1st ppt. pptx
PPT
Lecture1.ppt
PPTX
intro.pptx
PDF
Program Synthesis, DreamCoder, and ARC
Natural Language Query to SQL conversion using Machine Learning Approach
Modelica-OpenModelica-slides para aprender.pdf
Memory models
Gnerative AI presidency Module1_L4_LLMs_new.pptx
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
MiniOS: an instructional platform for teaching operating systems labs
Deep Learning Enabled Question Answering System to Automate Corporate Helpdesk
Introduction to Finite Automata and model Questions to Students
Keynote at IWLS 2017
Advancements in HPCC Systems Machine Learning
ODSC East: Effective Transfer Learning for NLP
From Commodore 64 to the Cloud — Lessons from 30 years of programming
AI-ASSISTED METAMORPHIC TESTING FOR DOMAIN-SPECIFIC MODELLING AND SIMULATION
Natural Language to SQL Query conversion using Machine Learning Techniques on...
Viva slides_secured objective programming
Domain-Specific Term Extraction for Concept Identification in Ontology Constr...
Expection Setting - 1st ppt. pptx
Lecture1.ppt
intro.pptx
Program Synthesis, DreamCoder, and ARC
Ad

Recently uploaded (20)

PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
CRP102_SAGALASSOS_Final_Projects_2025.pdf
PPTX
Education and Perspectives of Education.pptx
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
IP : I ; Unit I : Preformulation Studies
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
International_Financial_Reporting_Standa.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Literature_Review_methods_ BRACU_MKT426 course material
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PPTX
What’s under the hood: Parsing standardized learning content for AI
PDF
Journal of Dental Science - UDMY (2021).pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
CRP102_SAGALASSOS_Final_Projects_2025.pdf
Education and Perspectives of Education.pptx
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
IP : I ; Unit I : Preformulation Studies
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Hazard Identification & Risk Assessment .pdf
International_Financial_Reporting_Standa.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
AI-driven educational solutions for real-life interventions in the Philippine...
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
Core Concepts of Personalized Learning and Virtual Learning Environments
Cambridge-Practice-Tests-for-IELTS-12.docx
Literature_Review_methods_ BRACU_MKT426 course material
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
Complications of Minimal Access-Surgery.pdf
Unit 4 Computer Architecture Multicore Processor.pptx
What’s under the hood: Parsing standardized learning content for AI
Journal of Dental Science - UDMY (2021).pdf
Ad

Auto-Question-Generation-on-Dynamic-Programming-LCS-1.pptx

  • 1. Auto Question -Answer Generation on Dynamic Programming MAHATMA GANDHI MISSION’S COLLEGE OF ENGINEERING, NANDED GUIDED BY: DR. KAPRE MAM PRESENTED BY : TEJAS KOTALWAR (218) SOHAM KASHETTIWAR (225) GANESH KONDAMWAR (224) AKSHRAPLUS (INTERNSHIP)
  • 2. Introduction to Dynamic Programming What is Dynamic Programming (DP)? Dynamic Programming is a technique to solve complex problems by breaking them down into simpler overlapping subproblems and storing their results to avoid redundant computations. Applications It's widely applied in various fields. • Sequence analysis • Computational biology • Text processing Key Features of DP:  Overlapping Subproblems: Problems can be broken down into smaller, repeated subproblems.  Optimal Substructure: An optimal solution can be constructed from optimal solutions of subproblems.  Memoization or Tabulation: Used to store subproblem results (Top-down or Bottom-up approach).
  • 3. Subtopics of Dynamic Programming  Overlapping subproblems and optimal substructure  Longest Common Subsequence (LCS)  Fibonacci sequence and memoization  Matrix Chain Multiplication  0/1 Knapsack Problem  Floyd-Warshall Algorithm
  • 4. What is LCS (Longest Common Subsequence)? LCS is the longest sequence that appears in the same relative order (but not necessarily contiguous) in both strings. Example: •String X: ABCBDAB •String Y: BDCAB •LCS: BCAB or BDAB (Length = 4) LCS Characteristics: •Not a substring (can skip characters). •Has optimal substructure → perfect for dynamic programming. •Frequently used in: • DNA sequence alignment • File diff tools • Plagiarism detection • Code similarity checkers Time Complexity: •O(m * n) using DP table (where m and n are lengths of the two strings)
  • 5. Project Objective Why Auto Question Generation? Why Auto Question Generation? •To reduce manual effort in creating diverse and meaningful coding questions. •To support automated learning tools, mock tests, and online coding platforms. •Useful for students, educators, and interview preparation platforms. Our Goal: Build an intelligent system that can automatically generate unique, high-quality questions related to LCS across different categories (conceptual, implementation, algorithmic) and difficulty levels (easy, medium, hard).
  • 6. Dataset Creation Custom Dataset Built for LCS Question Generation Custom Dataset Built for LCS Question Generation •Designed a template-based dataset using JSON. •Each entry includes: •Template: Text format with placeholders {X}, {Y} •Category: Conceptual | Implementation | Algorithmic •Difficulty: Easy | Medium | Hard •Variables: List of possible values for placeholders
  • 7. T5 Model Overview 1 Transformer-Based A powerful model designed for text-to-text tasks. 2 Fine-Tuned Specifically for generating questions on coding concepts related to LCS. 3 Dataset Curated from platforms like HackerRank and LeetCode.
  • 8. System Workflow Input Provide keywords and a difficulty level for the question. Processing The system preprocesses data and fine-tunes the T5 model. Output The system generates and refines questions with test cases.
  • 10. Sample Questions Generated ✅ Q1: "Write a recursive function to compute the LCS of AB and AX." ✅ Q2: "Find the length of the longest common subsequence between the strings HELLO and WORLD." ✅ Q3: "What is the LCS of MNOP and PROGRAM?" ✅ Q4: "Determine the longest common subsequence of DYNAMIC and LANGUAGE."
  • 11. Answer Generation Answer Generation using BERT Model Objective: Automatically understand the type of LCS question and generate the correct answer or response using classification + logic. How It Works: 1. 🧾 Input: LCS-related question e.g., “Find the LCS of apple and maple.” 2. 🧠 Question Classification using BERT •Fine-tuned a BERT-based classifier to detect the type of question: •Basic LCS •Only Length •Multiple Pairs •Incomplete/Vague Question 3. 🔁 Function Mapping •Each category maps to a function from lcs_solver.py: •solve_basic_lcs() – Extracts and computes full LCS •solve_lcs_length_only() – Returns only LCS length •solve_multiple_pairs() – Handles multi-comparison •solve_incomplete_question() – Gracefully handles vague inputs
  • 12. Answer Generation Answer Generation using BERT Model 4. ✅ Answer Output Example: Q: "What is the LCS of apple and maple?" A: 💡 The Longest Common Subsequence is ‘aple’, with length 4.
  • 13. Conclusion and Future Scope AI Automation AI automates tasks for scalable educational tools. Future Extension Extend to other dynamic programming problems. Multilingual Support Incorporate multilingual support and interactive components.