[Show all top banners]

helpjava11
Replies to this thread:

More by helpjava11
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 NEW PUZZLE for Sajha Intellects Day 3

[Please view other pages to see the rest of the postings. Total posts: 29]
PAGE: <<  1 2  
[VIEWED 16562 TIMES]
SAVE! for ease of future access.
The postings in this thread span 2 pages, View Last 20 replies.
Posted on 06-03-14 7:59 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Q1. Three identical light switches operate three identical bulbs in another room. Which switch corresponds to which bulb? You are allowed only one trip into that room.

 
Posted on 06-03-14 5:37 PM     [Snapshot: 531]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Punter is right on this : you should always switch. (+1)

 
Posted on 06-03-14 6:03 PM     [Snapshot: 561]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I think study reveals that losers tend to change their decision. And in this case, there is still 50-50 chance after one goat is revealed. So, I won't change the decision.

http://www.bbc.com/news/science-environment-27228416

Between, I tried to solve Q1 regarding bulb and room this way.
Room=>> R1, R2, R3
Bulbs=>> B1, B2, B3
Turn on B1 and B2
Go to R1.
Cond1: If lights Off then B3=>R1
Cond2: If On , B1 or B2 =>>R1
Cond1:
B3=>R1
Turn off B1 (B2 is still ON!!)
Go to R2
If Lights on, B2=>>R2 and B1=>R3
If lights off, B1=>R2 and B2=>R3
Cond2:
Suppose lights in R1 was on
Turn off B1 and go to R2(B2 is ON!!)
Cond 2a: if Lights on: B2=>R2 and B1=>R1 and B3=>R3
Cond 2b: If lights off: B2=>R1 and B1,B3=>R2,R3
Cond2b: Turn off B2 and turn on B3
Go to R3
if ON B3=>R3, B1=>R2 else vice versa

 
Posted on 06-03-14 6:16 PM     [Snapshot: 567]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Nas bro, thats what i thought at first but turns out changing the door the probability is 2/3 and not chaging the door is 1/3.
Its called Monty Hall problem. Theres videos on youtube on how it happens.


 
Posted on 06-04-14 10:59 AM     [Snapshot: 682]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Famous Monty Hall Problem, mathematically explained at Wolfram Alpha:- http://mathworld.wolfram.com/MontyHallProblem.html
 
Posted on 06-04-14 4:04 PM     [Snapshot: 747]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Got really busy at work today so could not post any puzzle whole day.

Q. You are given 2 eggs.
-> You have access to a 100-storey building.
-> Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical.
-> You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.
-> Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process.

 
Posted on 06-04-14 5:33 PM     [Snapshot: 758]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

helpjava bro, it seems like an Algorithm & Data Structure problem. I guess binary search effective huncha jasto cha since the outcome is bounded by event of dropping of only 2 eggs without being broke. aba ghar ma gayera dudhe chiya + churot khayera serious thinking garnu parryo.
 
Posted on 06-04-14 10:43 PM     [Snapshot: 827]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Drop the first egg from 50.If it breaks you can try the same approach for a 50-storey building (1 to 49) and try it from 25th floor. If it did not break try at 75th floor. And use linear search with the remaining portion of storey we need to test. For example if the first egg breaks at 50 we need to try all possibilities from 1 to 49.

Now this looks a feasible solution. In computer student's jargon do a binary search with first egg and linear search with the second one. Best case is log (100) and worst is 50.


Now the optimal solution for the problem is that you figure out that you will eventually end up with a linear search because you have no way of deciding the highest floor with only one egg (If you broke one egg and you have to find the answer among 10 all you can do is start from the lowest to the highest and the worst is the total number of floors). So the whole question grinds up to how to make use of the first egg to reduce the linear testing of the egg.


(For strict computer science students, well this problem can be solved using binary search on the number of drops needed to find the highest floor.)

Now let x be the answer we want, the number of drops required.

So if the first egg breaks maximum we can have x-1 drops and so we must always put the first egg from height x. So we have determined that for a given x we must drop the first ball from x height. And now if the first drop of the first egg doesn’t breaks we can have x-2 drops for the second egg if the first egg breaks in the second drop.

Taking an example, lets say 16 is my answer. That I need 16 drops to find out the answer. Lets see whether we can find out the height in 16 drops. First we drop from height 16,and if it breaks we try all floors from 1 to 15.If the egg don’t break then we have left 15 drops, so we will drop it from 16+15+1 =32nd floor. The reason being if it breaks at 32nd floor we can try all the floors from 17 to 31 in 14 drops (total of 16 drops). Now if it did not break then we have left 13 drops. and we can figure out whether we can find out whether we can figure out the floor in 16 drops.

Lets take the case with 16 as the answer

1 + 15 16 if breaks at 16 checks from 1 to 15 in 15 drops
1 + 14 31 if breaks at 31 checks from 17 to 30 in 14 drops
1 + 13 45 .....
1 + 12 58
1 + 11 70
1 + 10 81
1 + 9 91
1 + 8 100 We can easily do in the end as we have enough drops to accomplish the task


Now finding out the optimal one we can see that we could have done it in either 15 or 14 drops only but how can we find the optimal one. From the above table we can see that the optimal one will be needing 0 linear trials in the last step.

So we could write it as

(1+p) + (1+(p-1))+ (1+(p-2)) + .........+ (1+0) >= 100.

Let 1+p=q which is the answer we are looking for

q (q+1)/2 >=100

Solving for 100 you get q=14.
So the answer is: 14
Drop first orb from floors 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100... (i.e. move up 14 then 13, then 12 floors, etc) until it breaks (or doesn't at 100).
 
Posted on 06-05-14 10:02 AM     [Snapshot: 901]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

giordano: your answer is correct. but i dont even know how..ही ही
 
Posted on 06-05-14 10:09 AM     [Snapshot: 910]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Ali sajhilo, ali dimag lagaune rakham na ho, yo table bhari paper charera computer ma lamo program banaune khale ta aafule sochnai sakdina, k garnu programming belaima sikiyena, 25 kate pachi man pani laagena, dimag ma chirna pani garo :)
 



PAGE: <<  1 2  
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
TPS Update : Jajarkot earthquake
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters