Sunday, March 29, 2015

Pattern Recognition- 29

Find the next two numbers in the series.

35, 13, 22, 27 ,11 , 16 , 14 , 4 , 10 , 15 ,_ ,_ ............


Answer

35, 13, 22,      27 ,11 , 16 ,      14 , 4 , 10 ,   15 ,_ ,_ ............


22 , 16 , 10, 4,.............

35-13=22      27 -11 =16       14-4=10         15, _, 4     
15-4=11

Next two numbers 11,4


35, 13,  22,  27 , 11 , 16 , 14 , 4 , 10 , 15 , 11,  4,...................

Sunday, March 22, 2015

Pattern Recognition - 28

Find the next two numbers in the series.

842, 1052 , 1263, 1473 ,1684 ,_ ,_


Answer


842, 1052 , 1263, 1473 ,1684 ,_ ,_

8/2= 4     remainder 0  Ignore remainder in every division  4/2=2

10/2= 5      5/2=2

12/2= 6      6/2=3

14/2= 7      7/2=3

16/2= 8      8/2=4


Next two numbers

18/2= 9      9/2 =4


20/2= 10    10/2=5



842, 1052 , 1263, 1473 ,1684 , 1894 , 20105,........

 

Saturday, March 14, 2015

Pattern Recognition - 27

Find the next two numbers in the series.

7, 8, 12, 21, 37, _ , _ ,....................


Answer

8   =  7  +  1        1 = (1*1)
12 =  8  +  4        4 = (2*2)
21 = 12 +  9        9 = (3*3)
37 = 21 + 16       16= (4*4)


Next two numbers  37+(5*5) =62
                            62+(6*6)=98


7, 8, 12, 21, 37, 62,98,...........

Saturday, March 7, 2015

Pattern Recognition - 26

If

21=12
32=26
45=520
53=315

Then
62= ?


Answer

21---  1  (2*1) ---- 12
32 --- 2  (3*2) ---- 26
45---- 5  (4*5) ---- 520
53-----(5*3) ---- 315

62-----2  (6*2) ---- 212

Sunday, March 1, 2015

Pattern Recognition -25

Find the next two numbers in the series.

251, 382 , 4113,  5144 ,_ , _, .......


Answer


251, 382 , 41135144 ,_ , _, .......


2, 3 , 4 , 5 , ....................

1 , 2 , 3 , 4, ...................


5= (2*2)+1

8=(3*2) +2

11=(4*2)+3

14=(5*2) +4


Next two numbers  (6*2)+5=17
                            (7*2)+6=20


251, 382 , 4113,  5144 , 6175 , 7206, .......

Poor Broker



Mukesh- a newly married guy meets his friend Mithun  - a geek software developer, after a long time in a restaurant. In the middle of the conversation, Mukesh expresses his concern about the daily fight between his wife and mother.

It’s hard to find a day without arguments and fight between them. Even simple things would trigger the fight. “Said Mukesh sadly.

Mithun :  No worries buddy. I’ll try to help you even though I never faced this kind of problems. There is something called design patterns in software architecture. It has solutions for any and every problem in the world.
                     
Mukesh : Oh God! Why did I tell my problem to this crazy fellow that eats software and sleeps with software non-senses. (says to himself)
 
Mithun  :  Give me a day, Mukesh ! …a single day is enough. I’ll go through all the patterns and find a solution for you.
 
Mukesh : Hey, It’s ok. I know you are very busy these days. I’ll try to resolve that on my own. Thanks for willing to help me.
 
The very next day Mukesh gets a call from Mithun.
Mukesh  : (mind voice) He must have found some crazy solution for my problem. Anyway, let’s listen what he says.
 
Mukesh picks up the phone. Mithun speaks on the other end in a glad tone.
 
Hey buddy! I found a solution for your issue. You will find it as an apt approach
 
Mukesh : What is that?
 
Mithun  : There is a pattern called “Broker pattern” in software architecture. That means

“A broker component is responsible for coordinating communication, such as forwarding requests, as well as for transmitting results and exceptions.”
 
You could use that pattern in your case.  I understand that the incompatibility between mother and wife interfaces causes the problem and there seems to be lot of misinterpretations of messages happen.
Invoking a broker will definitely make a difference.

Broker needs do the following things.
 
  1. Make sure that no direct communication happens between mother and wife interfaces at least for the conflicting concerns.
  2. Forward the requests and pass the results back.
  3. Interpret the messages that passed in an appropriate and advantageous way.
  4. Sometimes broker may need to modify the messages/results before pass it to the receiver.
  5. Exceptions and security concerns should be handled very well and in case of exceptions acceptable messages should be passed to the receiver rather than directly throwing the exception message.
 
And you may wonder where to find the broker for you. I know the most suitable broker in your case is
“YOU”.
 
Mukesh agrees to try this solution.
 
After  a week…
 
Mukesh calls Mithun…..
 
Mukesh : Buddy! It is amazing. You gave me the best solution. By the way, where can I buy the “software design patterns” book that you referred?