Automatic Problem
Generation
A new approach to Mathematical analysis
Presented by: Abhishek Dey. Developer. Architect.
What is a problem?
▪ Take a typical example (Algebra):
𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0 is a quadratic equation. Resolve the factors.
Approach:
1. We multiply a*c and resolve the common factors.
2. We manipulate them and try to rearrange equation to satisfy constraint b.
3. 𝑎𝑥2 + 𝑏′ 𝑥 + 𝑏 − 𝑏′ 𝑥 + 𝑐 = 0 where b’ is a constant.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 2
Human Analysis Vs. Machine Analysis
Factorize a*c.
I. assume expr=a*c
II. take a suitable integer x and divide expr/x
III. if remainder is divisible by x, continue
(expr-x)/x else, check for a new divisor y
(expr-x)/y.
IV. repeat unless expr reduces to a prime
number or 1.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 3
Computer’s Algorithm:
▪ Has to start from 2 and continue checking up to a*c-1 times.
▪ Iterator 𝑖 ≔ 2 to 𝑖 ≔ 𝑒𝑥𝑝𝑟 − 1
– If 𝑒𝑥𝑝𝑟%𝑖 ≔ 0, then
▪ 𝑒𝑥𝑝𝑟 ≔ 𝑒𝑥𝑝𝑟/𝑖
– Else
▪ 𝑖 + +
▪ Do you think this is smart ? 
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 4
A better approach
▪ Fundamental Law of Arithmetic:
– Every composite number can be expressed as a product of primes.
▪ This makes the algorithm faster and smarter.
Number Number of Divisors
Prime 2
Square of a prime 3
Cube of a prime 4
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 5
Problem with Machines
▪ They generate random figures.
– Can you solve 48885𝑥2
+ 3287𝑥 + 95670 = 0 ?
– Probably. But not in a limited time.
▪ The generated problem may not have a unique solution.
▪ Some problems such as Matrix Chain multiplication, Bellman Ford,
Dijkstra may require a lot of processing power.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 6
Where there is will, there is a unique
solution
▪ Processing Queue:
– We use a distributed processing model.
– Some problems from our end, others from customer’s end.
– We maintain a processing queue.
– A worker role that keeps record of all the distributed tasks
going on.
Example:
Say, we have a customer X who wants 10 questions on
quadratic equations.The server supplies 5 of them and
the remaining is generated in his system and backed up
in our server.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 7
Architecture of the back end
Backend
Database
ProcessingQueueWrites data
Contacts tracker
We areTrackers!
We keep track of
jobs
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 8
Determining a unique solution
▪ We form aTree.
▪ Trace all paths that can be followed.
▪ If we reach a wrong node, we trace
back using Backtracking.
▪ Finally the correct path is determined.
▪ If the tree is too complex we use
Union-Find algorithm.
▪ This also helps us to know the
difficulty level of a problem.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 9
Another problem has come up!
▪ When a user chooses a level of difficulty for
the generated problems, what do we mean
by EASY or HARD?
▪ EASY is a relative term.
▪ So, we employ 2 things:
– A Machine Learning mechanism based on
sentiment analysis.
– Feedback from live customers.
– What is MACHINE LEARNING?? :O
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 10
Achieved Throughput
0
5000000
10000000
15000000
20000000
25000000
30000000
35000000
40000000
500 1000 10,000 1,00,000 10,00,000 20,00,000
NO.OFQUESTIONS
NO. OF DEVICES
NO. OF DEVICES
No. of devices
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 11
What’s the point?
We hate these
situations!
We want a
solution.
Maybe unique.

9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 12
The UI and UX:
▪ Users will be offered:
– Choose number of questions.
– Choose difficulty level of questions.
– If not satisfied with response, option to discard
question by just a slide.
– The experience is sleek and hassle free.
▪ What we shall get:
– We are Opensource. Not just FREE.
– Entire profits from advertisements.
– You contribute your processing power. (a little bit.)
– Build a platform for teachers.
9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 13
To all the teachers,
on Teacher’s Day
ThankYou.
uriosity
ommitment
ommunityC

Automatic problem generation

  • 1.
    Automatic Problem Generation A newapproach to Mathematical analysis Presented by: Abhishek Dey. Developer. Architect.
  • 2.
    What is aproblem? ▪ Take a typical example (Algebra): 𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0 is a quadratic equation. Resolve the factors. Approach: 1. We multiply a*c and resolve the common factors. 2. We manipulate them and try to rearrange equation to satisfy constraint b. 3. 𝑎𝑥2 + 𝑏′ 𝑥 + 𝑏 − 𝑏′ 𝑥 + 𝑐 = 0 where b’ is a constant. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 2
  • 3.
    Human Analysis Vs.Machine Analysis Factorize a*c. I. assume expr=a*c II. take a suitable integer x and divide expr/x III. if remainder is divisible by x, continue (expr-x)/x else, check for a new divisor y (expr-x)/y. IV. repeat unless expr reduces to a prime number or 1. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 3
  • 4.
    Computer’s Algorithm: ▪ Hasto start from 2 and continue checking up to a*c-1 times. ▪ Iterator 𝑖 ≔ 2 to 𝑖 ≔ 𝑒𝑥𝑝𝑟 − 1 – If 𝑒𝑥𝑝𝑟%𝑖 ≔ 0, then ▪ 𝑒𝑥𝑝𝑟 ≔ 𝑒𝑥𝑝𝑟/𝑖 – Else ▪ 𝑖 + + ▪ Do you think this is smart ?  9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 4
  • 5.
    A better approach ▪Fundamental Law of Arithmetic: – Every composite number can be expressed as a product of primes. ▪ This makes the algorithm faster and smarter. Number Number of Divisors Prime 2 Square of a prime 3 Cube of a prime 4 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 5
  • 6.
    Problem with Machines ▪They generate random figures. – Can you solve 48885𝑥2 + 3287𝑥 + 95670 = 0 ? – Probably. But not in a limited time. ▪ The generated problem may not have a unique solution. ▪ Some problems such as Matrix Chain multiplication, Bellman Ford, Dijkstra may require a lot of processing power. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 6
  • 7.
    Where there iswill, there is a unique solution ▪ Processing Queue: – We use a distributed processing model. – Some problems from our end, others from customer’s end. – We maintain a processing queue. – A worker role that keeps record of all the distributed tasks going on. Example: Say, we have a customer X who wants 10 questions on quadratic equations.The server supplies 5 of them and the remaining is generated in his system and backed up in our server. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 7
  • 8.
    Architecture of theback end Backend Database ProcessingQueueWrites data Contacts tracker We areTrackers! We keep track of jobs 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 8
  • 9.
    Determining a uniquesolution ▪ We form aTree. ▪ Trace all paths that can be followed. ▪ If we reach a wrong node, we trace back using Backtracking. ▪ Finally the correct path is determined. ▪ If the tree is too complex we use Union-Find algorithm. ▪ This also helps us to know the difficulty level of a problem. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 9
  • 10.
    Another problem hascome up! ▪ When a user chooses a level of difficulty for the generated problems, what do we mean by EASY or HARD? ▪ EASY is a relative term. ▪ So, we employ 2 things: – A Machine Learning mechanism based on sentiment analysis. – Feedback from live customers. – What is MACHINE LEARNING?? :O 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 10
  • 11.
    Achieved Throughput 0 5000000 10000000 15000000 20000000 25000000 30000000 35000000 40000000 500 100010,000 1,00,000 10,00,000 20,00,000 NO.OFQUESTIONS NO. OF DEVICES NO. OF DEVICES No. of devices 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 11
  • 12.
    What’s the point? Wehate these situations! We want a solution. Maybe unique.  9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 12
  • 13.
    The UI andUX: ▪ Users will be offered: – Choose number of questions. – Choose difficulty level of questions. – If not satisfied with response, option to discard question by just a slide. – The experience is sleek and hassle free. ▪ What we shall get: – We are Opensource. Not just FREE. – Entire profits from advertisements. – You contribute your processing power. (a little bit.) – Build a platform for teachers. 9/5/2015Prepared by: Abhishek Dey, Developer, Cloud Architect. 13
  • 14.
    To all theteachers, on Teacher’s Day ThankYou. uriosity ommitment ommunityC