मराठी ब्लॉगर्स नेटवर्क - Marathi Bloggers Network!

शनिवार, ५ ऑक्टोबर, २०१३

Smallest Number Divisible by 1 -100 Numbers

There are two types of numbers, Prime Numbers and Composite Numbers.

The Prime Numbers between 1 - 100 are
1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97. Since there is no common factor between these numbers, to find the least number which is divisible by all above numbers, we will have to take product of these numbers.
Hence part one of our answer
x = 1*2*3*5*7*11*13*17*19*23*29*31*37*41*43*47*53*59*61*67*71*73*79*83*89*97

The composite numbers between 1-100 are
4,6,8,9,10,12,14,15,16,18,20,21,22,24,25,26,27,28,30,32,33,34,35,36,38,39,40,42,44,45,46,48,
49,50,51,52,54,55,56,57,58,60,62,63,64,65,66,68,69,70,72,74,75,76,77,78,80,81,82,84,85,86,
87,88,90,91,92,93,94,95,96,98,99,100

So let's try to find the smallest number which along with x will be divisible by all the above composite numbers.

4,6 = 4 (2,3 From x along with 2 from 4 will give us 12)
4,8 = 4 (2,3 from x along with 4 gives us 24)
4,9 = 12 (2,3 from x along with 2 from 4 will still need 3 to give us 36)
12,10 = 12 (2,5, from x gives us 10)
12,12 = 12
12,14 = 12 (7 from x along with 2 from 12 gives us 14)
12,15 = 12 (3,5 from x takes care of 15)
12,16 = 24 (2 from x and 4 from 12 will still need additional 2 to make it multiple of 16)
24,18 = 24 (3 from x and 24 gives 72)
24,20 = 24 (2,5 from x and 2 from 24 gives multiple of 20)
24,21 = 24 (3,5 from x takes care of 15)
24,22 = 24 (2,11 from x takes care of 22)
24,24 = 24
24,25 = 120 (5 from x needs additional 5)
120,26 = 120 (2,13 from x takes care of 22)
120,27 = 360 (3 from x, 3 from 120 needs additional 3 for 27)
360,28 = 360 (7 from x and 4 from 360 forms 28)
360,30 = 360
360,32 = 720 (2 from x, 8 from 360 needs additional 2 for 32)
720,33 = 720 (3,11 from x takes care of 33)
720,34 = 720 (2,17 from x takes care of 34)
720,35 = 720 (5,7 from x takes care of 35)
720,36= 720
720,38= 720 (2,19 from x takes care of 38)
720,39= 720 (3,13 from x takes care of 39)
720,40= 720
720,42 = 720 (2,3,7 from x takes care of 42)
720,44 = 720 (2,11 from x takes care of 22, supplemented by 2 from 720)
720,45 = 720
720,46 = 720 (2,23 from x takes care of 22)
720,48 = 720
720,49 = 5040 (7 from x needs additional 7)
5040, 50 = 5040 (5 from x and 10 from 5040 will form 50)
5040, 51 = 5040 (3,17 from x takes care of 51)
5040, 52 = 5040 (13 from x supplemented by 4 from 5040 takes care of 52)
5040, 54 = 5040
5040, 55 = 5040 (11 from x and 5 from 5040 forms 55)
5040, 56 = 5040 (7 from x and 8 from 5040 forms 56)
5040, 57 = 5040 (3, 19 from x forms 57)
5040, 58 = 5040 (2, 29 from x forms 58)
5040, 60 = 5040
5040, 62 = 5040 (2,31 from x forms 62)
5040, 63 = 5040 (3,7 from x supplemented by 3 from 5040 gives 63)
5040, 64 = 10080 (2 from x, 16 from 5040 needs additional 2)
10080, 65 = 10080 (5,13 from x forms 65)
10080, 66 = 10080 (2,3,11 from x forms 66)
10080, 68 = 10080 (2,17 from x along with 2 from 10080 forms 68)
10080, 69 = 10080 (3, 23 from x forms 69) 
10080, 70 = 10080 (2,5,7 from x forms 70)
10080, 72 = 10080
10080, 74 = 10080 (2, 37 from x forms 74)
10080, 75 = 10080 (3,5 from x along with 5 from 10080 forms 75)
10080, 76 = 10080 (2, 19 from x along with 2 from 10080 forms 76)
10080, 77 = 10080 (7, 11 from x forms 77)
10080, 78 = 10080 (2, 3, 13 from x forms 78)
10080, 80 = 10080
10080, 81 = 30240 (3 from x, 9 from 10080 needs additional 3) 
30240, 82 = 30240 (2, 41 from x forms 82)
30240 , 84 = 30240 (2,3,7 from x along with 2 from 30240 forms 84)
30240 , 85 = 30240 (5,17 from x forms 85)
30240 , 86 = 30240 (2,43 from x forms 86)
30240 , 87 = 30240 (3,29 from x forms 87)
30240 , 88 = 30240 (2,11 from x and 4 from 30240 forms 88)
30240 , 90 = 30240 (3 from x and 30 from 30240 forms 90)
30240 , 91 = 30240 (7, 13 from x forms 91)
30240 , 92 = 30240 (2, 23 from x along with 2 from 30240 forms 92)
30240 , 93 = 30240 (3, 31 from x forms 93)
30240 , 94 = 30240 (2, 47 from x forms 94)
30240 , 95 = 30240 (5, 19 from x forms 95)30240 , 96 = 30240            
30240 , 98 = 30240 (7 from x and 14 from 30240 forms 98)
30240 , 99 = 30240 (3,11 from x and 3 from 30240 forms 99)
30240 , 100 = 30240 (2,5 from x and 10 from 30240 gives 100)
Hence the final answer is
= 1*2*3*5*7*11*13*17*19*23*29*31*37*41*43*47*53*59*61*67*71*73*79*83*89*97*30240
= 6.9720375229712477164533808935312 *10^40

Let me know if you find errors!


The same calculation can be used to find smallest number divisible by any range up to 100.
Say the range is 1-10.
The Prime numbers to be considered are 1*2*3*5*7
The composite numbers calculation till 10 is
4,6 = 6 (2 From x along with 6 will give us 12)
6,8 = 12 (2,3 from x along with 2 from 8 gives us 12)
12,9 = 12 (3 from x along with 3 from 12 gives us 9)
12,10 = 12 (2,5, from x gives us 10)

So answer is = 1*2*3*5*7*12 = 2520.




 

 

शुक्रवार, १२ जुलै, २०१३

वसईची पिशवी



लहानपणची गोष्ट, मुंबईला राहणाऱ्या आत्या वसईच्या मुक्कामाहून परत मुंबईला जायला निघाल्या की आजी त्यांच्या हातात भाजीची पिशवी देई. वाडीतील भाजी, केळ्याचा फणा, सुरण तत्सम पदार्थांचा त्यात समावेश असे. वसईच्या भाज्या ताज्या, मुंबईला परत गेल्यावर लगेच बाजारात जायला लागू नये म्हणून आजी ह्या भाज्या देत असेल अशी माझी समजूत. काही वर्षाने बहिणींची लग्न झाल्यावर हेच चित्र पुन्हा अवतरले. ह्या ही वेळेला माझ्या समजुतीत फारसा काही फरक झाला नाही.


काही वर्षे गेली, शिक्षण संपले, नोकरी चालू झाली. प्रथमच परदेशगमनाचा योग आल्यावर सामान भरताना मध्येच आईने त्यात लाडूचा एक डबा भरला. हा डबा कशाला, असा थोडासा तिच्याशी वाद घातल्यावर मी तो डबा नेण्याचे कबूल केले. शनिवारी रात्री ब्रायटन (इंग्लंड) येथील हॉटेलात आगमन झाले. व्यवस्थित पोटपूजा होण्याची काही शक्यता नव्हती. रविवारी सकाळी, इंग्लंडच्या थंड हवेत उठून बाहेर एक फेरफटका मारून आल्यावर अचानक ह्या लाडूच्या डब्याची आठवण झाली. तो एक लाडू तोंडात घालताच हजारो मैलांचे अंतर पार करून मी थेट घरापर्यंत पोहोचलो. पुढे हा डबा मी बरेच दिवस पुरविला. त्यानंतरच्या प्रत्येक परदेशवारीला घरून दिलेली ही पिशवी मी नेत गेलो. बोरिवलीला राहायला गेल्यानंतर वसईच्या फेर्या शनिवार- रविवारकडे होत राहिल्या. मुंबईत वाढलेली बायको, वसईच्या भाज्यांची, माश्यांची रसिक बनली. वसईहून आम्ही आता पिशव्या घेवून येवू लागलो. मेरू, स्विफ्ट मध्ये एकावेळी सर्वाधिक पिशव्या घेवून येण्याचा विक्रमही बहुधा आम्ही प्रस्थापित केला.


ह्या सर्व प्रवासात वसईची पिशवीतील भाजीच्या ताजेपणापेक्षा त्यातील भावनिक गुंतवणुकीचा, मायेचा उलगडा केव्हा आणि कधी झाला हे माझे मलाच कळले नाही. एका पिढीतील माया दुसर्या पिढीपर्यंत भौगोलिक अंतराचे बंध ओलांडून पोहचविण्याचे काम ही वसईची पिशवी अनेक वर्ष करीत राहील याविषयी मात्र माझ्या मनात अजिबात शंका नाही!

 

शनिवार, १५ जून, २०१३

Excerpts from Book Musafir by Achyut Godbole

In Software industry as one moves up in hierarchy, person has to get used to deal with managing pressure situations alone. The guidance, support one gets at junior level slowly disappears at top level. At the topmost levels such as a CEO, one is absolutely alone. If one is going through the disappointment / frustration / pressure situations, it has to be dealt with individually. Generally this one will know things which are very confidential, will make decisions which are very critical but still there is no standard rules which can be referred to. Once they are step out of their cabins, these persons can not let their next level managers, employees see the emotions they are going through. In the most challenging times also, this person needs to maintain a smile on his face and continue to be optimistic. And this happiness / optimism has to be really present inside, not for just sake of showing to others. Mr. Godbole calls out the importance of two important principles in software industry 'Never Give Up' and 'Never Say Die'.
  1. Mr. Godbole also writes about his practice of analyzing things in depth when things went wrong such as losing a contract to a competitor. A CEO can't afford to stay disappointed over this fact. He used to immediately start analysis on probable points where the team went wrong, where they were under prepared and what are the things which competitor did better than his firm. Once this analysis is done, he used to call meetings of his VPs and General Managers. In these meetings the primary rule was 'Everyone should come out openly about the mistakes they have committed'. Mr Godbole would start from himself and admit all the mistakes which he has committed. Since the CEO had started from himself, everyone else was comfortable in following the suit. As a result, the discussion / criticism which used to follow was more focused on actual decisions than on individuals.
  2. Mr. Godbole then touches upon practical example of 'Never say die' principle and how one should utilize the differentiating factor an individual / firm has to maximum benefit. In early 90's, GE spent close to 1 year in shortlisting the preferred vendors to whom they were to outsource significant portion of their IT work. Somehow Godbole's firm was not at all aware of these proceedings and came to know about it only when 4 companies were shortlisted. This was major shock for Mr Godbole / his firm. It was perceived as failure of their intelligence. But they disagreed to accept that it was the end of the road for them. After discussion within the core group of the firm, they decided to focus on identifying any work which could be executed only from US and what unique skills the firm could bring to GE. They figured out that IDMS was the skill set which was unique to them and then managed to get meeting with GE Capital to convince them that the firm could provide this skill. A lot of effort was spend in selection of initial 2 candidates since they were going to be critical factors in success of future plans. Mr Godbole was so involved in this effort that he himself went to drop these two guys at the airport. The rest they say is a history. The firm managed to get listed as fifth preferred vendor and got into one of the most successful client - vendor relations of Indian IT industry.
  3. Mr. Godbole has then written on people management aspect. Team Work is important but more important is identify the abilities / potential of an individual and assign task accordingly. It is agreed that the person has to stretch beyond his abilities / potentials but then this stretch has to be within reasonable limits else there is always possibility that the person may experience break down and loose his confidence completely. Also it is very important to keep top performers engaged / challenged all the time, else they may get disappointed and that will not be a good thing for firm / individual. Then it becomes very important that the manager should be 'Hands-on' Manager. He should know the technology and should be detail oriented. Only few people have right to make this statement (including Mr Godbole) who himself has written many in-depth books on technology.
  4. He then specifies the criteria which he used to apply while selecting senior managers in the firm.
    1. How much in-depth technical knowledge this person brings to the firm?
    2. Does this person has pleasant personality?
    3. Is this person a good team player? Does he possess good ability to mix with others?
    4. Is this person always worried?
    5. In pressure situations, does he lead from front or push the next layer to face the music?
    6. Can this person accept his / her mistake openly?
    7. Is he willing to learn new concepts / technology?
    8. What is his ability to take critical decisions independently and own these decisions? and so on
  5. He then mentions that 'Conventional definition of Management is getting work done through people, but real management is developing people through work!'
  6. Then there is section in which human side of Mr Godbole's personality is shown. This is a story of an experienced IT professional who is suffering from depression. This person has lost his previous job due to this and hence is unwilling to disclose this in Mr Godbole's firm. But then the case comes out in open when this person travels overseas. This is difficult situation for firm since this is very important client facing position. Then Mr Godbole goes all the way to support this person. He immediately travels to client location with the family of this guy, takes the client into confidence, provides replacement candidate and more importantly supports this guys for next 2-3 years to come out of the depression. The emotional point comes when years later, daughter of this person while receiving an award at hands of Mr Godbole thanks him and mentions that the award and whatever she is today is due to Mr Godbole.
 
 

 

शनिवार, २५ मे, २०१३

Fundamentals from Office Life


Every Day is a new day.
There will be really bad days in office. The days when Murphy’s law will hold good for you. Everything that can go wrong will go wrong during these days. Below are examples
Team member handling most critical task has emergency. His / her backup also has emergency. And task has to be delivered on same day.
Natural calamities happen on your delivery date
Your supervisor has received some firing from his supervisor and you forget to send him status report which would have saved him from saving his back.
And so on…

What we do in these situations?· Try best to complete the day without making further damage. Don’t fight with your supervisor on this day. Listen to him. Give it back to him in double when you have your chance.
· Next day you are likely to find few things going your way which would give your strength to work on remaining challenges.

Also if you are worried that people around are going to remember your embarrassing day throughout their life then forget it. They have many other things to worry about and they have short term memory.


Switch Off technique.Once you swipe out from office building, you should be able turn into mindset of a school kid. There is one life and you need to enjoy it whenever you get chance. You may get calls from office at odd hours. You need to develop ability to decide quickly whether that call coming from office at odd hour is really important to you. You can’t always be honest.

You are not the only one responsible.You as a programmer/leader/manager will witness your delivery causing major havocs in production environment. Apart from backing out your code, you will be required to fix data corruption, resume operations in stipulated time. Then there will be root cause analysis meetings which you need to attend. In these all situations remember that behind every delivery there is process of the organization which is involved. You may be responsible partially being part of that process but not entirely.

Ability to live normally outside office.What you do in your office / profession should not affect your relations with your family / friends. We have already reached half way through our professional lives, but long way to go in our actual life. Family / friends are going to be ones who are going to be most important part of your remaining lives.

Can’t insist on perfection all the time.This was very difficult lesson for me to learn. You need to be as perfect as is required by situation. That is as tricky as it can get. Those who master this art become quickly up the ladder. Others keep on struggling on achieving perfection in areas which may not be relevant in broad perspective.

10000 feet viewThis is the term used to investigate anything from neutral / broader perspective. In case your delivery has failed, you are feeling really bad then you need to think on following lines. This is just one delivery from this project. This is just one project from this client. This is just one client from this company. This is just company from many companies which you are going to join. This will help in long way reducing the impact.

रविवार, १४ एप्रिल, २०१३

Mathematics - Quiz

Mathematics - Quiz (15 Minutes)

1> A car travels to hill top at the speed of 20 km /hr from base and returns at the speed of 25 km /hr. If the distance of hill top from base is 100 km then what is the average speed during this entire journey?
2> Give two practical examples where 11 + 3 = 2 holds good.
3> How many numbers are there which are less than 100 and divisible by both 2,3?
4> What is the angle between Hr and Minute Hands at 1:45 P.M.?
5> Was yr 1900 a leap year?
6> What is sqaure of 75?
7> 27th Feb 2012 was Monday then what would be day on 27th Feb 2013 and 27th Feb 2014?
8> x = 17, a = 1, b = 2, ..., z = 26 then
( x - a ) * ( x - b ) * ...*(x - z) = ?
9> 101 * 101 = 10201

102 * 102 = 10404
103 * 103 = 10609
then 109 * 109 = ?10> A monley has to cross distance of 100 m. In his first leap he crosses 50 m and in each of his subsequent leaps he crosses half of the distance remaining. How many leaps he would take to cross finish line.



DON'T SCROLL TILL YOU HAVE FINISHED ANSWERING ALL QUESTIONS











Answers
1> Average speed = Total distance travelled / total time taken
Here Total distance travelled = 200 KM
Total time taken = 9 Hr
Hence average speed = 200 / 9 = 22.22 km /hr

Here you may get tempted to answer this as 22.5 in hurry.

2> 3 Hrs after 11 A.M. we have 2 P.M.
3 months after November we are in February the second month

3> Answer 16
The number divisible by both 2 and 3 is 6
There are 16 numbers less than 100 which are divisible by 6 and hence the answer.

4> The minute hand is at 9
The angle between 9 and 1 = 120
The Hr hand travels 30 degrees in 60 minutes
so in 45 minutes it will travel 22.5 degrees
Hence the total angle = 142.5 degrees

5> No.
The year which ends with 00, needs to be divisible by 400 to qualify as leap year

6> 5625.
To get square of any number ending with 5, first write 25 and then precede it with product of the number  (7) and the subsequent number (8)

7> Wednesday and Thursday respectively.
In leap year we have 366 days, which means 2 additional days to 52 weeks. So weekday shift by 2 days
In normal year we have 365 days, which means 1 additional day to 52 weeks and hence the weekday shift by 1 day

8> 0
One of the term in the series would be (x-x)

9> 11881

(a+b)*+(a+b) = a*a + 2*a*b+ b*b
Here a = 100, b = 9

10> Monkey won't reach the finish line.



शुक्रवार, १२ एप्रिल, २०१३

Abhimanyu and We!

Abhimanyu participated in the Mahabharata war when he was sixteen years old. During the Mahabharata war, Abhimanyu held at bay great warriors such as Drona, Karna, Duryodhana and Dushasana. Abhimanyu entered the war fighting the battle but then enemy had made such trap (Chakravyuh) that he couldn't break away from it and eventually got killed.

In today's world, we also get trapped in various temptations, responsibilities and then can't find real ourselves.
  1. Once a child is born, he/she is trapped in expectations of the parents.
  2. Then, in current world, it is technology which take control of mind of the kid.
  3. We form our firm opinions which take control of us for rest of the life. We never realize how much these opinions restrict our abilities to see the world with open eyes.
  4. We then fall in love with someone. People love a person for selfish reasons many times. They love someone else because by doing so the pleasure sensations in their brains are triggered. More intense these sensations are more addicted the person is to that love. Sometimes people make sacrifices for their love.  Because love makes them weaker. They can't stand the thought of loosing the person whom they love.
  5. Then comes professional life. Some people become successful in it, and then get entrapped in their own successful image. They have to continue to keep on trying to maintain this successful image
  6. Some people have to resort to not so legal ways of earning money. They become part of system / chain which don't let them break free from it. So they are also trapped.
  7. Then we get trapped with our loves for our kids.
In short we all are Abhimanyus. The only difference being, the real abhimanyu entered war at his own choice, we don't have that choice.

गुरुवार, २१ फेब्रुवारी, २०१३

Invisible Power and Parenting

In a relationship which involves two individuals, societies or nations, there always exists a battle to gain control of the relationship between two parties involved. In the most premature state this battle is open and stronger party uses power to gain control of relationship and forces the other entity to behave as per its wish. But this model of controlling the relationship can not be sustained for longer duration since there will be always unhappiness prevailing in minds of weaker entity. It will try to become more powerful in course of time and take control of relationship.
In more matured model of relationship, the stronger entity controls the behaviour of the weaker entity by putting it in controlled environment. The environment is organized in such a way that weaker party is brainwashed into behaving in a pattern desirable to the stronger one. This needs a lot of thought processing and self discipline on behalf of stronger one.
The similar principle can be applied to parenting in which parents can thoughtfully create an environment at home in which kids are driven into behaviour as desired by parents. In modern age it is desirable philosophy of parenting. Here is word of caution though, considering the intelligence of new generation, it is highly likely that this philosophy may not be long sustaining unless parents always keep on evolving their techniques.
Same principle applies to other relationships in professional and personal life. The complexity of the equation varies according to relation.

पोह्यांचा ऊहापोह

पारंपरिक मराठी घरांमध्ये दररोज सकाळी सर्वसाधारणपणे शिरा, उपमा आणि पोहा हे तीन होतकरू उमेदवार आपला अर्ज दाखल करत असत. घरातील मुख्य गृहिणी विव...