Skip to main content

Coin Flipping Puzzle: Interview Question

Golu has 100 identical coins (with head side and tail side) which he wants to donate to someone. There are many people who are aiming to get this collection of 100 coins. So Golu created a puzzle using all 100 coins and declared that the one who will solve his puzzle will get all the coins. You desperately need money so solving the puzzle is only option you have.

The Problem goes like this:
All 100 coins are laying flat on a table. 80 of them are heads up and remaining 20 are tails up. You can’t feel, see or in any other way find out which side is up. Split the coins into two piles(sets) such that there are the same number of tails in each pile.
[Baby Hint]: If number of coins in first pile is n then other pile will have 100-n coins.



First try yourself before peeking into the solution below. 




Solution:

Solution is very easy. Divide the pile of 100 coins into two separate piles of 80 and 20 coins respectively. Just flip every coin of the pile of 20 coins and you will have same number of tails up(also same number of heads) in both piles.

Too easy to digest, huh. Let’s see mathematically what’s happening. You have just divided 100 coins into two piles of 20 and 80 coins each. Since you can’t see so you have no idea how many tails/heads up are there in two piles. Let’s assume that the number of tails up in first pile(20 coins pile) is X then number of heads up coins would be 20 - X. Since, initially total number of tails up coins was 20 so number of tails up coins in second pile(80 coins pile) would be 20 - X. If you flip every coin of first pile then all X tails up coins will become heads up and remaining 20 - X heads up coins will be now tails up. Second pile is already having 20 - X tails up coins so we have now equal number of tails up coins in both piles. And since they have equal number of tails up coins means they also have same number of heads up coins. Easy right!!

Comments

  1. The first thing you’ll discover when accessing El Royale is the trendy animations and bonuses floating around the corners. This fashionable and fashionable web site is the primary one on our record with an lively social media presence on each Facebook and Twitter. Increased social media presence means extra accountability and the chance to publicly work together with the casino and engage in a extra personal relationship. As a general rule, the bigger the bonus, the extra times it will have to be rolled over. It will depend 점보카지노 on the casino, and extra doubtless depend on the value of the bonus received. Take the bonus that requires the least monetary value turnover for one of the best likelihood of turning it into actual cash.

    ReplyDelete

Post a Comment

Popular posts from this blog

Mahabharat

प्रेम व प्रथम विवाह  प्रेम व प्रथम... प्रेम व विवाह  प्रेम व विवाह  शान्तनु शान्तनु गंगा  गंगा  देवव्रत देवव्रत past encounter past encounter सत्यवती  सत्यवती  ऋषि परासर  ऋषि परासर  वेद व्यास  वेद व्यास  आठवाँ पुत्र  आठवाँ पुत्र  प्रथम ७ पुत्रों को नदी में बहाया  प्रथम ७ पुत्रों को नदी में बहाया  पुत्र  पुत्र  विवाह पूर्व पुत्र  विवाह पूर्व पुत्र  पुत्री  पुत्री  दासराज  दासराज  पुत्र  पुत्र  पुत्र  पुत्र  संतान  संतान  चित्रांग्ध  चित्रांग्ध  विवाह  विवाह  विवाह  विवाह  विचित्रविर्य  विचित्रविर्य  विवाह को तिरस्कार किया  विवाह को तिरस्कार किया  प्रेमी  प्रेमी  अम्बा  अम्बा  अंबिका अंबिका loses her color on seeing vyas loses her color... अम्बालिका  अम्बालिका  तिरस्कार किया  तिरस्कार किया  शाल्व्य  शाल्व्य  विवाह  विवाह  गोद  ले लिया  गोद  ले लिया  गांधारी की दासी से पुत्र  गांधारी की दासी से पुत्र  धृतराष्ट्र धृतराष्ट्र प्रथम पुत्र(जन्म से अंधा) प्रथम पुत्र(जन्म से अंधा) नियोग क्रिया  नियोग क्रिया  पुत्र  पुत्र  नियोग क्रिया  नियोग क्रिया  विवाह  विवाह  विवाह  विवाह  पांडु  पांडु  अंबि...

आ तमाशा तू भी देख

देखने वाले देखते हैं, सब कुछ देखते हैं ये लोग देख देख कुछ करते नहीं, जाने कहाँ से लगा ये रोग ।  गरीब देखा, पीड़ित देखा, देखे उनके खेत बंजर फर्क उनको कुछ पड़ा नहीं, देख किसानों का ये मंजर झूठ वादा, झूठे काम, किसानों के प्रति झूठा सम्मान सब देख मंद मुस्काते हैं, चाहे फांद गला लटके किसान हिन्दू देखा, मुस्लिम देखा, देखी जाने कितनी जाती पर जिससे इंसान दिखें, ऐसी कला कहाँ उनको आती देखने वाले देखते हैं, सब कुछ देखते हैं ये लोग देख देख कुछ करते नहीं, जाने कहाँ से लगा ये रोग ।  घर में देखा, ऑफिस में देखा, देखा ओलंपिक्स में परचम लहराते चाहे जितने हुनर उनके देखे, पर कसी फब्तियां आते जाते कल के दुश्मन आज हैं भाई, गले पड़े भुला के सब लफड़े लेकर ठेका आदर्शवाद का, नाप रहे दूजों के कपडे अधरों पे बेशर्मी का पर्दा, जो पीड़ित है उसी की गलती देख देख इन बड़बोलों को, दानवों की कमी कहाँ है खलती देखने वाले देखते हैं, सब कुछ देखते हैं ये लोग देख देख कुछ करते नहीं, जाने कहाँ से लगा ये रोग ।  सड़क नहीं, बिजली नहीं, जनता का पैसा, उनकी जेब जहाँ देखो वहीँ ...

Krishna ki chetawani -- कृष्ण की चेतावनी

कृष्ण की चेतावनी -- रामधारी सिंह दिनकर  वर्षों तक वन में घूम घूम बाधा विघ्नों को चूम चूम सह धूप घाम पानी पत्थर पांडव आये कुछ और निखर सौभाग्य न सब दिन सोता है देखें आगे क्या होता है मैत्री की राह दिखाने को सब को सुमार्ग पर लाने को दुर्योधन को समझाने को भीषण विध्वंस बचाने को भगवान हस्तिनापुर आए पांडव का संदेशा लाये दो न्याय अगर तो आधा दो पर इसमें भी यदि बाधा हो तो दे दो केवल पाँच ग्राम रखो अपनी धरती तमाम हम वहीँ खुशी से खायेंगे परिजन पे असी ना उठाएंगे दुर्योधन वह भी दे ना सका आशीष समाज की ले न सका उलटे हरि को बाँधने चला जो था असाध्य साधने चला जब नाश मनुज पर छाता है पहले विवेक मर जाता है हरि ने भीषण हुँकार किया अपना स्वरूप विस्तार किया डगमग डगमग दिग्गज डोले भगवान कुपित हो कर बोले जंजीर बढ़ा कर साध मुझे हां हां दुर्योधन बाँध मुझे ये देख गगन मुझमे लय है ये देख पवन मुझमे लय है मुझमे विलीन झंकार सकल मुझमे लय है संसार सकल अमरत्व फूलता है मुझमे संहार झूलता है मुझमे उदयाचल मेरा दीप्त भाल, भूमंडल वक्षस्थल विशाल, भुज परिधि-बन्ध को घेरे हैं, मैनाक-मेरु पग मेरे हैं। दिपते जो ग्रह नक्षत्...

Stock Analysis: L&T Finance Holdings

  Overview L&T Finance Holdings Ltd. (LTFH) is a financial holding company offering a focused range of financial products and services across rural housing and wholesale finance sectors as well as mutual fund products and wealth management services through its wholly-owned subsidiaries viz. L&T Finance Ltd. L&T Housing Finance Ltd. L&T Infrastructure Finance Company Ltd. L&T Investment Management Ltd. L&T Capital Markets Ltd. and L&T Infra Debt Fund Ltd.   Details of business L&T Finance Holdings Limited is one of India’s most valued and fastest-growing Non-Banking Financial Companies (NBFCs). Incorporated in 2008 and headquartered in Mumbai, the Company offers a diverse range of financial products and services in Rural, Housing and Infrastructure finance sectors. It also offers Investment management services.   Business Principles Prudent ALM(Asset and Liability Management), Adequate liquidity and well established liability franchise Highe...

BCCI fails to renew domain name for its official website

www.bcci.tv is(or should I use "was") the BCCI's official website where it posts news about Indian cricket and even live-stream the cricket events. I tried to reach to their page and it's rendering above page as the domain has expired and BCCI(Board of Control for Cricket in India) has failed to renew it within the expiry deadline. After using whois for this domain name, I got to know that the domain was registered on 2nd February 2006 and was updated again today on 4th February 2018. Will BCCI be able to regain its domain back? Update : BCCI has got its domain back and showing the contents as earlier.

10 small business idea to start with in India

If you want to start your own business and you want to start small, here's are 10 business ideas which you can try. The following business takes less capital and more enthusiasm. 1. photography : If you have a genuine interest in photography and want to make some money out of it then there are many opportunities may land your doorstep. It ney.eds more passion than anything else to start earning from photography. You can sell your photos to stock photography sites like shutterstock.com, Fotolia.com, istockphoto.com, stocksy.com etc. You can also provide your photos to the online travel sites like holidayiq.com. There are many types of photography viz Architectural photography, Candid photography, Documentary photography, Fashion photography, Food photography, Landscape photography, Night-long exposure photography, Conceptual/ fine art photography, wedding photography etc. 2. Wedding Planner: India is a place of the largest bunch of young people and wedding ...

JSON vs YAML

JSON JSON(JavaScript Object Notation) is a human-readable data exchange format.  JSON is built on two structures: A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence. JSON's basic data types are: Number : a signed decimal number that may contain a fractional part and may use exponential E notation, but cannot include non-numbers such as NaN. The format makes no distinction between integer and floating-point. JavaScript uses a double-precision floating-point format for all its numeric values, but other languages implementing JSON may encode numbers differently. String : a sequence of zero or more Unicode characters. Strings are delimited with double-quotation marks and support a backslash escaping syntax. Boolean : either of the values true or false Arra...

[Fixed] Alexa can count only from 1 to 10

Note : At the time of writing this post, Alexa had this issue which has been resolved. Alexa can now count flawlessley even in reverse. Alexa is the smart virtual assistance by Amazon. It is beating google now and Siri on non-screen devices. Alexa is hailed for its intelligence but it seems that the Alexa knows to count only from 1 to 10. By 1 to 10, I mean exactly from 1 to 10; neither more nor less. Even asking Alexa to count from 1 to 5 or 3 to 10 or 3 to 5 results in an apology from Alexa. Watch the above video to see for yourself.