16/03/2023
Dear Students and Parents,
New Coaching / Tuition Batches for Academic Year 2023 - 2024 will start soon.
Batch details are as follows -
****************************************************
Classes XI and XII - Maths, Physics and Chemistry
Classes VI to X - Maths and Science
****************************************************
Join fast and enjoy early mover advantage.
Regards,
Pie Classes
23/03/2017
For College Students & Professionals
====================================
Solutions to selected problems of sheet 2017/SX-0L64
Problem 1
=========
Compute the strongly connected components of G. Then construct a new graph G’, and use one vertex to present one component. We know G’ is a DAG. If there’s more than one vertex in G’ whose in-degree is 0, G doesn’t have a mother vertex; otherwise we have a vertex v in G’ that can visit all other components, so any vertex in the component which v presents would be a mother vertex.
Problem 5
=========
There are 7 diffrent ways or C(20) = 7.
20 equals to:
1. Twenty 1
2. Fourteen 1, one 6
3. Four 1, two 6
4. Two 1, three 6
5. Ten 1, One 10
6. Four 1, One 6, One 10 7
7. Two 10.
Problem 6
=========
We can solve this problem using Dynamic Programming. We fill matrix C, where C[n, k] is the number of ways to make a change of n, using 1st k denominations only. C[n, k] = C[n - dk, k] + C[n, k - 1]
23/03/2017
For College Students & Professionals
=============================
Solutions to selected problems of sheet 2017/SX-0L45
Problem 1
=========
We compute the hash of the pattern string, and compare it to the hash of all possible length m substrings of A, i.e., compare h(P) to h(A[i..(i + m − 1)]), for 1 ≤ i < n−m+1. Since the hash function is perfect, h(P) = h(A[i..(i+m−1)]) if and only if P = A[i,..(i+m−1)]. There are O(n) hash functions to compute, O(n) comparisons of hash values, and each computation and comparison requires O(m) time, for a total running time of O(mn).
Problem 4
=========
The algorithm proceeds in two phases. In the first phase, we ascend levels as rapidly as possible, until we find a level that does not allow forward motion. A better solution is to examine the next point at each level, and only continue up if the next key is smaller than the target key. Each node in a linked list is augmented to include a count of consecutive non-promoted nodes that follow it in the list. For example, if the next node in the linked list is promoted, the count is 0; if the next node is not promoted, but the following node is promoted, the count is 1. The goal is to ensure that the count of a promoted node is at least Z-1 and no more than 2Z-1 .
Figure out 2nd Phase yourself.
Problem 9
=========
Constructing the data structure requires O(n lg n) because we are effectively sorting the points. One solution is to sort the points by x coordinate, and then construct a balanced tree by picking a median element as the root and recursively constructing
the left and right subtrees. This construction takes O(n lg n) time to sort the points and O(n) to construct the tree.
23/03/2017
For College Students & Professionals
=============================
Problem PS-0X-SP00037
Time Given = 60 minutes.
Once you get an initial idea of solving it via Non Deterministic Finite Automaton then it becomes a implementation heavy graph problem.
Outline of Steps
1) Build NFA corresponding to Regular Expression.
2) Create Graph representing NFA.
3) Pass input string and check if Final State is reached.
A Sample Code is attached -
21/03/2017
For School Students
================
Marking Scheme and Solutions of Class 10th SA-2 Science Mock Test conducted on 19/03/2017 are attached.
17/03/2017
For School Students
================
Marking Scheme and Solutions of Class 10th SA-2 Science Mock Test conducted on 17/03/2017 are attached.
15/03/2017
For School Students
================
Marking Scheme and Solutions of Class 10th SA-2 Science Mock Test conducted on 15/03/2017 are attached.
12/03/2017
For School Students
================
Marking Scheme and Solutions of Class 10th SA-2 Maths Mock Test conducted on 10/03/2017 are attached.