Saturday, October 7, 2017

Today we look at a new puzzle:
 A transposition of a vector is created by switching exactly two entries of the vector. For example, (1,4,3,4,2,6,7) is a transposition of (1,2,3,4,5,6,7). Find the vector X if S = (0,0,1,1,0,1,1), T =(0,0,1,1,1,1,0), U=(1,0,1,0,1,1,0) and V=(1,1,10,1,0,1,0) are all transpostions of X Describe your method of finding X.
Intuitively many of the positions in a vector will remain unchanged if only two of the positions are exchanged in a transposition. If we are given a set of transpositions, a majority of them will share the common positions. Thus if a position has three or four occurrences of 1 in the given four transpositions, it is highly likely that the X also has 1 in those positions. Similarly a position with one occurrence among all the transpositions indicates a zero in the corresponding position with X.
We therefore start with X as follows:
0011011
0011110
1010110
1101010
?011?10 - X
With this candidate as X and switching the position of ? with the occurrence of extra 1 in a given transposition we eliminate the occurrence of ? and replace it with 1 or 0. In this case, it results in X as (1,0,1,1,0,1,0)
Alternatively we can also work through the problem in a systematic manner.
We enumerate all possible transpositions of S, T, U, and V in four columns by exchanging only two elements from their corresponding vector. Then we look for the vector that is common to all the possible enumerated transpositions. The nice thing about this method is that we can reduce the search space as we move from the transpositions in one column to the next and the number of candidates reduces to finally one in the last column.  Given that there are 7 positions, each column may have 14 entries using the value of 0 or 1 for each of those seven positions. Candidates found in the first column will reduce to candidates found in the second column as the criteria that S and T will share the same transposition is restrictive. This further reduces as we include U with S and T and finally to the solution with S, T, U and V.

#explain ethernet protocol
The Exponential backoff algorithm is an example of the ethernet protocol
When a collision first occurs, a jamming signal prevents further data
a frame is sent again immediately or after 51.2 micro-seconds called an interval
If it fails, the frame is sent again in multiples of that interval
If it still fails, it is resent after a multiple that is in an integer between 0 and 7 (one less than a power of two)
If it fails after nth attempt, the frame is sent again at a multiple k where k is between 0 and one less than the nth power of 2

Friday, October 6, 2017

Today we review technical aspects of Gigya. It is a socialization platform for companies. It provides websites and apps with a complete social infrastructure. It integrates three critical functionalities for the end-user:
1) a framework for social login which is their signature social identity management.
2) shares of media by end users to socialize
3) a plugin to socialize

Their framework includes a gamification layer and an analytics layer. The former is used to reward users and build loyalty.

When a company implements Gigya, it makes the following considerations:
1) provisioning social login to enable users to easily login across sites, apps and devices via a single social identity
2) provisioning identity storage which provides a unified view of consumer identity across channels that can be seamlessly integrated into 3rd party platforms.
3) enabling comments, chats and reactions - that builds an interactive community of engagement.
4) activating a gamification system that promotes valuable user actions and rewards participation and loyalty.

By integrating social login, Gigya has shown that customers spend more time online at the site than with standard login and much more than when they are not logged in. Social logins are provided by Facebook, Yahoo, Google, Twitter and LinkedIn sites in that order of popularity with Facebook being the single most dominant provider.

From their plugin interaction, they found that the average time spent on-site was most when users were leaving comments, followed closely by when they were using newsfeeds and shares. The number of page views was also similarly higher to about 11 for comments, shares and newsfeeds in general.

The tenets of the CIAM solution as per Gigya remain as follows:
1) a specialized cloud based system to manage customer identities is necessary as identity is a resource unlike any other
2) Identity may have a notion of pool for the same customer to access different sites.
3) businesses adapting to the digital marketplace are opting to hand off CIAM functionality
4) CIAM platforms are built on user experience as identity belongs to the user.
5) CIAM platforms must have flexible implementations as users and sites may choose different ways to interact and login.
6) CIAM platform must be scalable where millions of logins for cloud based retail sites is not uncommon. As a consolidator of services specializing is in something as critical as identity, we cannot ignore performance.
7) CIAM platform must secure their APIs as it is the most visible and customer facing APIs for a retail site.
8) Finally, a specialized CIAM solution gets you to market in a fraction of the time of custom deployments
#puzzle
Given a set of points in a plane, we make perpendicular bisectors of the line segments for connecting every pair of those points.Then we count the number of points in which the distinct perpendicular bisectors constructed this way intersect each other. For twelve points on the plane, the maximum possible number of intersection points is 1705. What is the maximum possible number of intersection points if we start with thirteen points ?
If we have n points, the maximum number of lines is nChoose2  = n(n-1)/2
Each of these lines has a perpendicular bisector and we have m lines
The maximum number of intersection points for  m lines is mChoose2 = m(m-1)/2
But three points form a triangle and in a triangle the perpendicular bisectors intersect at a common point. Therefore we must have to reduce the redundant 2 times nChoose3 from the total nChoose2 points.
Therefore the maximum number for m lines is mChoose2-2(mChoose3) where m = n(n-1)/2
For 13 this gives 2431.

Thursday, October 5, 2017

The tenets of the CIAM solution as per Gigya are as follows:
1) a specialized cloud based system to manage customer identities is necessary as identity is a resource unlike any other
2) Identity may have a notion of pool for the same customer to access different sites.
3) businesses adapting to the digital marketplace are opting to hand off CIAM functionality
4) CIAM platforms are built on user experience as identity belongs to the user.
5) CIAM platforms must have flexible implementations as users and sites may choose different ways to interact and login.
6) CIAM platform must be scalable where millions of logins for cloud based retail sites is not uncommon. As a consolidator of services specializing is in something as critical as identity, we cannot ignore performance.
7) CIAM platform must secure their APIs as it is the most visible and customer facing APIs for a retail site.
8) Finally, a specialized CIAM solution gets you to market in a fraction of the time of custom deployments

#codingexercise
Find the position of an element in an array of infinite numbers:
When elements are sorted, it is easy to find elements by excluding half the range. If we pick the middle of the range at any time and compare with the given element, we can easily shrink the next range to compare as half of the original range because the element either lies on one side of the midpoint or the other and the mid-point is not the element itself. This method is therefore our binary chop. However, the size of the initial range to perform binary chop is not determined in an infinite series. Therefore we must keep moving and expanding the range progressively. One way to do this is to start with two elements and double the range going forward while excluding those that we have already compared. This means that if we start with lo and hi as the index demarcators for the range, initially hi is immediately next after lo and as we compare hi and decide to progress further we move lo to where hi was and double the hi as the next range to look at. This way elements behind the lo have already been excluded contiguously and the element is not found in them. If an element will be found it will be past in the next range or we move to the range after that. We decide based on the element at hi index. If the element there is higher than the target element, we know that it must occur between lo and hi. Once we have pegged the hi index, we can then do a binary search between lo and high.
Another way to traverse the infinite series involving more levels of adjustment of range is to use exponential back off algorithm.

Wednesday, October 4, 2017

Gigya therefore cites the big challenges for identity management as follows:
1) User Experience : Legacy IAM solutions focus on security. Current CIAM solutions focus on sharing the identity across businesses.
2) Scale: While identities explode for a single individual, employee, partner or vendor, performance is maintained across levels  by scaling out
3) Data structure: The vast majority of customer generated information is unstructured and requires new analytics and pipeline capabilities.
4) Integrations: This is perhaps the single biggest development cost for today's CIAM solutions as companies not only integrate with business applications but also with customer facing applications and activities.
5) Security: WebAPIs and open protocols have required changes in the way identity information is persisted and propagated. Authentication, Authorization and Auditing have taken new forms
6) Privacy and Compliance: While regional and international regulatory compliance have to be complied with, customers are requiring social networking integrations which make these tasks harder. Security breaches alone can undermine the entire CIAM solution
CIAM Solutions can be either homegrown or purchased. They differ from IAM solutions in these ways :
1) less infrastructure CIAM is cloud based

2) licensing is based on users or login and not servers

3) support and maintenance is less as it is part of the service

4) deployment time is reduced

5) backend application integration is faster and with fee only per application

6) Customer experience customizations can be improved out of band

#puzzle
Find four distinct integers a, b, c, and d such that each of the four sums a+b+c, a+b+d, a+c+d and b+c+d is the square of an integer. Show that infinitely many quadruples (a,b,c,d) with this property can be created.
We can denote the four sums as squares w, x, y and z
therefore a = (w+x+y+z)/3-z
               b = (w+x+y+z)/3-y,
               c = (w+x+y+z)/3-x
               d = (w+x+y+z)/3-w
In order for a,b,c, and d to be integers we only need to have the sum of the squares w+x+y+z to be divisible by three. In order for a,b,c,d to be distinct, the squares must also be distinct, Also, the largest of the squares must also be smaller than half the sum of the other three squares so that the smallest of a,b,c and d will be positive. By trying incrementally, we can see the smallest set is the one satisfying the squares of 8,9,10 and 11.

Tuesday, October 3, 2017

We continue to review a whitepaper from Gigya which draws observations from the Forrester 2017 report based predictions on dynamics that will shape the future in the age of customer and how CIAM Solutions can help. The Forrester report mentions how customers are driving businesses - old and new to restructure their customer experience by demonstrating a willingness to shift spend.  Even companies that bind customers to contracts feel the heat. Revenue risk is not the only symptom. Customers and businesses have started using the language of emotions. Companies are recognizing that customers don't forgive.  This report mentions that companies can overcome these by classifying operations into emotions matrix and focus on repairing those that provoke negative emotions. The report also states that customer journey mapping is important for understanding and anticipating customer needs as they move across touchpoints
Gigya therefore cites the big challenges for identity management as follows:
1) User Experience : Legacy IAM solutions focus on security. Current CIAM solutions focus on sharing the identity across businesses.
2) Scale: While identities explode for a single individual, employee, partner or vendor, performance is maintained across levels  by scaling out
3) Data structure: The vast majority of customer generated information is unstructured and requires new analytics and pipeline capabilities.
4) Integrations: This is perhaps the single biggest development cost for today's CIAM solutions as companies not only integrate with business applications but also with customer facing applications and activities.
5) Security: WebAPIs and open protocols have required changes in the way identity information is persisted and propagated. Authentication, Authorization and Auditing have taken new forms
6) Privacy and Compliance: While regional and international regulatory compliance have to be complied with, customers are requiring social networking integrations which make these tasks harder. Security breaches alone can undermine the entire CIAM solution.
These challenges are being grappled with by organizations and businesses in myriad ways which can be classified into a few categories, CIAM solution provides the ability to address all of these as one-stop shop.
Companies approach CIAM solutions in three different ways:
1) The homegrown approach which is usually chosen to maximize security and control with the pitfalls of custom coding and pricy connectors
2) The Frankenstein approach which stitch together existing IAM solutions
3) A buy it don't build it approach where CIAM providers offer cloud based services.
#puzzle
A set of block is laid out in three dimensions on a 4 by 4 matrix. There are two views presented below:
South View      and  East View
B   B                            B   B
B   B                         BB   B
B   BB                       BBBB
BBBB                       BBBB

Find the maximum number of blocks
Solution: The blocks are maximum when the same set of blocks is cloned and contributing towards both the South View and the East View. For example the four blocks stacked one on top of another in South  will not be contributing towards a four block tower in East View which will have its own four blocks. This arrangement counts clones behind the first that appear in a view as included in the final maximum solution. This gives us 38 blocks 

Monday, October 2, 2017

We were reviewing a whitepaper from Gigya which informs us how CIAM solution can make sure that the corporate strategy is not hostage to the IT strategy. This draws observations from the Forrester 2017 report based predictions on dynamics that will shape the future in the age of customer. That report mentions "how competitive markets are on the move.The customers are driving businesses - old and new to restructure their customer experience by demonstrating a willingness to shift spend. They are rewarding or punishing companies based on a single experience. One poor experience triggers an immediate and prolonged shift in spend to competitor. Companies are worrying about losing upto half their revenue. Even companies that bind customers to contracts feel the heat. Revenue risk is not the only symptom. Customers and businesses have started using the language of emotions. It's no longer merely the appeal and use of brands where emotions are put to work.Companies are recognizing that customers don't forgive.  Moreover these numbers are not even measured and reported accurately. This report mentions that companies can overcome these by classifying operations into emotions matrix and focus on repairing those that provoke negative emotions. In fact this report clearly indicates that there will be some in-roads made in this direction this year.The third and perhaps relevant observation for CIAM solutions in this report is that the customer journey mapping is important for understanding and anticipating customer needs as they move across touchpoints and microstrategies that highlight brand value are attempted to be stretched over time from a single moment.
Gigya therefore cites the big challenges for identity management as follows:
1) User Experience : Legacy IAM solutions focus on security. Current CIAM solutions focus on sharing the identity across businesses.
2) Scale: While identities explode for a single individual, employee, partner or vendor, performance is maintained across levels  by scaling out
3) Data structure: The vast majority of customer generated information is unstructured and requires new analytics and pipeline capabilities.
4) Integrations: This is perhaps the single biggest development cost for today's CIAM solutions as companies not only integrate with business applications but also with customer facing applications and activities.
5) Security: WebAPIs and open protocols have required changes in the way identity information is persisted and propagated. Authentication, Authorization and Auditing have taken new forms
6) Privacy and Compliance: While regional and international regulatory compliance have to be complied with, customers are requiring social networking integrations which make these tasks harder. Security breaches alone can undermine the entire CIAM solution.
These challenges are being grappled with by organizations and businesses in myriad ways which can be classified into a few categories, CIAM solution provides the ability to address all of these as one-stop shop.
#puzzle
A set of block is laid out in three dimensions on a 4 by 4 matrix. There are two views presented below:
South View      and  East View
B   B                             B   B
B   B                          BB   B  
B   BB                       BBBB
BBBB                       BBBB

Find the minimum number of blocks
Solution: The blocks are minimum when the same set of blocks is distinct and contributing towards both the South View and the East View. For example the four blocks stacked one on top of another in South  View can be contributing towards a four block tower in East View. This arrangement counts all the eleven blocks of South as included in the final minimum solution. Plus there are three extra blocks in the East view. Together they make the minimum to be 14.

Sunday, October 1, 2017

We were reviewing the whitepaper - the chutes and ladders of customer identity from Gigya which is a leader in Customer Identity and Access Management Industry. The title uses an analogy of a well-known game. This is a whitepaper that introduces the delights and the pitfalls in customer experience with identity. CIAM solutions make it easy for a customer to be recognized, remembered, informed and subscribed for recommendations which become more and more personalized with every interaction until she becomes a champion for the brand in her social circle.
Today we start reading another whitepaper which informs us how CIAM solution can make sure that the corporate strategy is not hostage to the IT strategy. This draws observations from the Forrester 2017 report based predictions on dynamics that will shape the future in the age of customer. That report mentions "how competitive markets are on the move. Banks try to innovate so that they are displaced by digital banks, retailers confront the digital threat with store closing and enhanced omni-channel and mobile efforts. Manufacturers are taking to an online presence. Relationship driven investment firms battle software companies takeover and even commodity and utility companies are launching customer initiatives." Behind all these moves, the customer is the one driving these.  They are demonstrating a willingness to shift spend. They are rewarding or punishing companies based on a single experience. One poor experience triggers an immediate and prolonged shift in spend to competitor. Companies are worrying about losing upto half their revenue. Even companies that bind customers to contracts feel the heat. Revenue risk is not the only symptom. Customers and businesses have started using the language of emotions. It's no longer merely the appeal and use of brands where emotions are put to work.Companies are recognizing that customers don't forgive.  Moreover these numbers are not even measured and reported. This report mentions that companies can classify operations into emotions matrix and focus on repairing those that provoke negative emotions. In fact this report clearly indicates that there will be some in-roads made in this direction this year.The third and perhaps relevant observation for CIAM solutions in this report is that the human beings are in a constant mode of multitasking and handling distractions. This is about customer journey mapping which is important for understanding and anticipating customer needs as they move across touchpoints. Here customer experience professionals  are going with micro strategies. For example they are determining signature moments where customers appreciate the value the most. Another example is their search for ways to come through with the brand so that a single moment can be stretched over time. This microdesign is more effective and pertinent to the customer rather than larger sweeping initiatives.
#codingexercise
Find the lowest common ancestor between two nodes.
Here the strategy is very simple. The lowest common ancestor is one that has the nodes in both the sub-trees. As we recursively search the tree if the root has a node in the left  and the node in the right, then it is the lowest common ancestor. If only the left is available, we return left. If only the right is remaining we return right. Finally if neither is present, we return null. The edge cases are that the root itself is one of the nodes required or the root is null.
This method assumes both nodes can be found in the sub-trees