Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Monday, October 31, 2016

Basic Number Theory Tutorial in Bangla by ইকরাম মাহমুদ



Tutorial Link - progkriya

Number of common divisors of 2 numbers

Problem link: COMDIV - Number of common divisors

For this we need to know
                         CommonDivisor(a,b) = NumberOf Divisor(gcd(a,b)) proof

Find the number of divisors: Time Complexity O(sqrt(n))



tutorial for finding the number of divisors : progkriya

Solution:

Sunday, October 30, 2016

Codeforces problem B Two Buttons analysis

Problem Type : BFS , math , greedy , shortest path

Problem link: Two Buttons


this was a very interesting for me.


This problem asks us what is the minimum steps we need to reach from one given number to another given number by multiplying by 2 or  subtracting 1


i have found 2 ways to solve this problem 

       1) using bfs (hard way)
       2) simple mathematics

The hard way:


let us try to analyze 2 given test cases 


1)  4 ->6  minimum steps: 2

2) 10 ->1 minimum steps: 9

let us make a graph using the 2 test cases



Thursday, September 29, 2016

Prime Factors Finding



Algorithm:

1) divide n by 2 till n is divided by 2 and save 2 in a list each time
2) divide n by (3 to  root(n) and only the odd numbers) if divisible save it in the list
3)if n is greater than 2 save n in the list

all the prime factors are in the list.


Football Player Transfer Prediction

Football Player Transfer Prediction Using Different Classifiers Project Report :  Football Player Transfer Prediction Report ...