Geeks With Blogs

News Ashraful Alam Joy

Create Your Badge

Ashraful Alam is a Software Architect, who has 8 years of professional experience in Software Development industry. This Bangladeshi national is involved with project management and development of several US based software projects from his country. Already he has managed and developed several software projects, which are being used by several users of different countries, such as USA, Canada, Australia, and Bangladesh. While developing and managing a team, he contains and maintains a set of well defined engineering practices developed by him and other online developer communities.

Due to his willingness to give effort to improve and share better software development practices, Ashraf has been awarded as “Most Valuable Professional” (MVP) in ASP.NET category by Microsoft since year 2007 multiple times, which is a rare honor and prestigious reorganization among the developers around the world.

Check his portfolio to know more about him and his works.

.NETTER Characters... Every part of your life is best, if you can know yourself and thus create your life like an artist!

When I was the 2nd year student in my computer science under-grad course, solving logical and computational problem was my favorite hobby. Some of those were directly related to programming and some were just brainstorming. When not engaged with study, I passed my time either using pen and pages to draw diagrams or just seen in the sky whether I can find any solutions there!

12 Marbles Problem

Among all of the problems that I found and solved, the most interesting problem to me was "12 marbles problem". One of my senior course mate gave it to me. When I first hear it, it didn't seemed much complex to me. He smiled to me to see it, and told, "well lets solve it first!". Ah, very soon I got understood why he smiled at me! The problem started to take my hours after hours, days after days! I really forgot my daily life, by this time, couldn't study well, couldn't eat, couldn't sleep...12 marbles were moving and playing around my world! After 3-4 days, I got really embarrassed, and thought there might be no solution for it, so I shouldn't try to solve it more. Or at least I should drop it for few days, coz I have lots of other stuffs to do! Sometimes, even a simple problem may turn to too complex, by continuously thinking of it. Leaving it for few time will create some new views to solve the  problem. Can't remember how many days I left the problem, but after few days again, I started to think about it, with new energy! Ah, it was a cool feelings for me when I got the solution! And couldn't believe first, I have solved it! Also got lost soon, as the solution itself is not that much simple.

Finally I grabbed the total solution, by more careful and patient thought! And felt that, this is the only solution for it that I just found! It was a matter of great joy for me, as so far I learned only a few number of person have solved it! But the interesting thing was, when I have heard their solution, I found those are separate to each others and even separate from my solution! Well, lets see the problem and see whether you can find your own solution !

You have 12 marbles. All the marbles have the same look and same weight, but there is a defective one, which weight is a bit more or less than others. Using a balance just three times, you have to find the defective marble!

400 Marbles Problem !

Once I solved it, I was given another problem :P By this time I have 400 marbles and I can use a weight machine  only one time! Huh! Kidding? 400 marbles and can take weight only once? I didn't want to spent hundreds of "MAD" days for just to solve one problem, since 12 marbles took my few days to solve! But once I surrendered, when I heard the solution, I really wanted to kick at my ass! Ah, how easy the solution is! Basically although it was about 400 marbles, but it is much easier than before. So found a moral on problem solution: "Sometimes solving complex problems made our thoughts complex. You can find a solution easily, just by understanding the problem clearly, and then find your best way to solve it!"  

Any way, lets see the interesting problem, and check which one you find easier!

You have 20 boxes, each of the boxes has 20 marbles, each of the marbles is weighted 20 gram. There is only one box which has 20 marbles, but each of which marbles has 1 gram less or more than 20 gram. You have a weight machine, which can be used only once, to find which box contains less or more valued box.  

Posted on Thursday, February 15, 2007 10:12 PM Fun , My Life , Software Development | Back to top

Comments on this post: Brainstorm with Marbles!

# re: Brainstorm with Marbles!
Requesting Gravatar...
get incrementing marbles from each bag (1 form bag1,m 2 from bag2 etc) and weigh them together. Divide the combined weight with the expected weight and the factor remaining will give you the answer!

Also, I wud like to knw yr version of the answer to the first one!

Left by Vivek on Apr 09, 2007 3:24 PM

# re: Brainstorm with Marbles!
Requesting Gravatar...
Yeah man its been a while i am trying to find the solution for the 12 marbles problem.

Kindly Mr. Alam post the solution so that i can finally see my self smile again.

Thank You.
Left by Shahzad Husain on Jun 24, 2008 9:45 PM

# re: Brainstorm with Marbles!
Requesting Gravatar...
can i have the answere for 12 marballs one plz .....i have been trying...i just wana see the solution. can anybody give me the solution plz.thanks
Left by khan on Nov 20, 2009 6:55 PM

# re: Brainstorm with Marbles!
Requesting Gravatar...
I have the solution for 400 marble problem
Left by Mahit on Aug 24, 2010 2:53 AM

Your comment:
 (will show your gravatar)

Copyright © Ashraf Alam | Powered by: