Probabilities Revised

In an attempt to learn machine learning, I am revising some previous concepts regarding statistics and probabilities. Here are some of the links I find useful while reading:

For the  understanding of

Conditional, Joint and marginal probability here

Bayes Theorem (Breast Cancer Example) here

 

Advertisements

BST reverse in-order traversal for sorting elements in descending order

We all know that there are 3 most popular types of tree traversals namely pre-order, in-order and post-order traversal. Among these three, the in-order traversal of BST gives us the output elements arranged in ascending or increasing order. Now, what if we require the elements to be output in decreasing/descending order??? …. I have found out a very interesting article here covering this technique i-e reverse in-order traversing.

Modular Multiplicative Inverse

A very useful post … helps me very much writing key splitter in c++ .. reference code is taking from http://en.wikipedia.org/wiki/Shamir's_Secret_Sharing

COME ON CODE ON

The modular multiplicative inverse of an integer a modulo m is an integer x such that $latex a^{-1} equiv x pmod{m}.$

That is, it is the multiplicative inverse in the ring of integers modulo m. This is equivalent to $latex ax equiv aa^{-1} equiv 1 pmod{m}.$

The multiplicative inverse of a modulo m exists if and only if a and m are coprime (i.e., if gcd(a, m) = 1).

Let’s see various ways to calculate Modular Multiplicative Inverse:

1. Brute Force
We can calculate the inverse using a brute force approach where we multiply a with all possible values x and find a x such that $latex ax equiv 1 pmod{m}.$ Here’s a sample C++ code:

The time complexity of the above codes is O(m).

2. Using Extended Euclidean Algorithm
We have to find a number x such that a·x = 1 (mod m). This can be written as well…

View original post 985 more words

Tips and Tricks about creating an effective presentation

While reading through online blogs i’ve found out some useful articles related to graphical presentation styles by Scott Schwertly. First article named The 4 Basic Principles of Presentation describes Balance, Emphasis, Unity and movement among objects as key factors to attain viewer’s attention. Whereas, the second article on How to utilize the Gestalt principle explains about The Gestalt Principles designed and developed by The Berlin School.