I think 17/80 is right answer.. otherwise no use of mentioning *first five
times* specifically in the question. ! though m not sure
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
1/5+1/2^6
On Aug 7, 8:34 pm, Algo Lover algolear...@gmail.com wrote:
A bag contains 5 coins. Four of them are fair and one has heads on
both sides. You randomly pulled one coin from the bag and tossed it 5
times, heads turned up all five times. What is the probability that
you toss next time,
i think the answer will be 1/5+ 4/5*1/2=3/5
coz the question is saying what is the probability of getting head* sixth
time*(when 5 heads were already there)..
it is not saying what is the probability of getting heads* 6 times*..(in
this case answer will be 17/180)
On Mon, Aug 8, 2011 at 9:54
I think the answer is 3/5, becoz all the trails/tossing coins are
independent events. So even when it is 100th time the answer is 3/5.
On 8 August 2011 09:05, Kamakshii Aggarwal kamakshi...@gmail.com wrote:
i think the answer will be 1/5+ 4/5*1/2=3/5
coz the question is saying what is the
What is so ridiculous in this. My doubt it do we have to assume that
the left and right directions of both the people are same or can we do
without that also ?
On Aug 7, 11:31 pm, shady sinv...@gmail.com wrote:
this is one ridiculous puzzle... this must have been asked to some
philosophy
233 is the right answer..
On Fri, Jul 29, 2011 at 12:27 PM, shiv narayan narayan.shiv...@gmail.comwrote:
solutions for cow questions:
if we consider first cow would she calf at age 2 then first new cow
would come at age two.
at end of 2nd year: 1st would give new cow:
at end of 3rd year:1st
@Nikhil
Once the rabbits are mature, they should be able to produce babies every
month. after 2 months a female produces new babies for first time.
but then they should be able to produce a new pair at the end of the third
month as they can again mate at the end of second month.
Like in the cow
In the problem statement, the rabbits give birth to new ones after every 2
months. Not after each month.
On Sun, Jul 31, 2011 at 12:51 PM, Tushar Bindal tushicom...@gmail.comwrote:
@Nikhil
Once the rabbits are mature, they should be able to produce babies every
month. after 2 months a female
144 pairs
correct me if im wrong
On Sun, Jul 31, 2011 at 1:00 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
In the problem statement, the rabbits give birth to new ones after every 2
months. Not after each month.
On Sun, Jul 31, 2011 at 12:51 PM, Tushar Bindal tushicom...@gmail.comwrote:
Suppose that our rabbits never die and that the female always
produces one new pair (one male, one female) *every month from the
second month on
*
@Priyanka
You have answer 288
I added 178 to it because I got the answer that 89 females would have given
birth in the last month.
Pls clarify.
Are
Oops. My bad. Rabbits produce every month too.
I overlooked that.
On Sun, Jul 31, 2011 at 1:24 PM, Tushar Bindal tushicom...@gmail.comwrote:
Suppose that our rabbits never die and that the female always
produces one new pair (one male, one female) *every month from the
second month on
*
for the cows ques ... you all are forgetting to add the orginal starting cow
...
thus the answer should be *233*
On Sun, Jul 31, 2011 at 1:30 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
Oops. My bad. Rabbits produce every month too.
I overlooked that.
On Sun, Jul 31, 2011 at 1:24 PM,
the answer is 144 she-calves..the qn asks for calves, not cows and
calves..in all there are 233 cows n calves where there are 144 calves n 89
cows
On Sun, Jul 31, 2011 at 2:02 PM, Shubham Maheshwari
shubham@gmail.comwrote:
for the cows ques ... you all are forgetting to add the orginal
for rabbits answer would be different from cows as they give birth to a pair
at a time, so at any time odd number of rabbits won't be there
On Sat, Jul 30, 2011 at 9:13 AM, Reynald Suz reynaldsus...@gmail.comwrote:
Thank ya shiv, agarwal and Anders.
On Sat, Jul 30, 2011 at 8:10 AM, Anders Ma
For rabbits, answer is 256.
On Sat, Jul 30, 2011 at 8:33 PM, Tushar Bindal tushicom...@gmail.comwrote:
for rabbits answer would be different from cows as they give birth to a
pair at a time, so at any time odd number of rabbits won't be there
On Sat, Jul 30, 2011 at 9:13 AM, Reynald Suz
And 233 for cows. Shiv narayan's answer is correct. But he didn't add the
main cow.
On Sat, Jul 30, 2011 at 8:42 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
For rabbits, answer is 256.
On Sat, Jul 30, 2011 at 8:33 PM, Tushar Bindal tushicom...@gmail.comwrote:
for rabbits answer would
Nikhil
can u pls explain ur logic for the rabbit question.
I think it will be more
On Sat, Jul 30, 2011 at 8:46 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote:
And 233 for cows. Shiv narayan's answer is correct. But he didn't add the
main cow.
On Sat, Jul 30, 2011 at 8:42 PM, Nikhil Gupta
solutions for cow questions:
if we consider first cow would she calf at age 2 then first new cow
would come at age two.
at end of 2nd year: 1st would give new cow:
at end of 3rd year:1st cow would another new cow
at end of 4th year :1st cow will give new cow and the cow born at end
of 2nd year
i think for rat pair answer should be same as cow..correct me if i am
wrong
On Jul 29, 1:10 pm, sunny agrawal sunny816.i...@gmail.com wrote:
No ans will be sum of all
final fib. number is the no of she-calves of age 0
second last is number is she-calves of age 1
...and so on
so answer is
anders@anders-Satellite-U400:~/puzzle$ cat novel_she_calf.c
#include stdio.h
/*
iIf a cow produces its first she-calf at age two years and after that
produces another single she-calf every year, how many she-calves are
there after 12 years? assuming none die.
*/
unsigned int she_calves(unsigned
Thank ya shiv, agarwal and Anders.
On Sat, Jul 30, 2011 at 8:10 AM, Anders Ma xuejiao...@gmail.com wrote:
anders@anders-Satellite-U400:~/puzzle$ cat novel_she_calf.c
#include stdio.h
/*
iIf a cow produces its first she-calf at age two years and after that
produces another single she-calf
It was due to finish of oxygen inside the car.as it was sealed with
closed door and windows
On Sat, Jun 25, 2011 at 8:59 PM, sarveswaran v sarveswar...@gmail.comwrote:
she might have died because of heat generated inside the closed car
On Jun 24, 3:05 am, Lavesh Rawat
may be the car has no roof
On Fri, Jun 24, 2011 at 10:40 PM, hary rathor harry.rat...@gmail.comwrote:
cause of smothering ...
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
she might died because of heat generated inside the car
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
cause of smothering ...
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options,
guys wake up
On Fri, May 27, 2011 at 9:24 PM, himanshu kansal
himanshukansal...@gmail.com wrote:
a king has two sons eric and bob.he wants to divide his
islands
the islands are in a queue.eric being elder gets the first
chancethey both can pick d island alternatively
It's been posted quite a few times recently. Just check the mailing list.
On 30 May 2011 18:46, himanshu kansal himanshukansal...@gmail.com wrote:
guys wake up
On Fri, May 27, 2011 at 9:24 PM, himanshu kansal
himanshukansal...@gmail.com wrote:
a king has two sons eric and bob.he
http://anandtechblog.blogspot.com/2010/10/directi-interview-question_3183.html
On Mon, May 30, 2011 at 3:54 PM, Carl Barton odysseus.ulys...@gmail.comwrote:
It's been posted quite a few times recently. Just check the mailing list.
On 30 May 2011 18:46, himanshu kansal
First you need a Piece class to represent one piece of a puzzle.
Each piece has four sides, each one with a unique outline which will
only connect to one other piece. Edge sides have an edge outline.
Each side also has a piece id attribute called adjacent to store the
value of the piece it
3 1 2 2 1 1
1 3 1 1 2 2 2 1
On Apr 13, 12:32 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote:
* Sequence Puzzle
The below is a number puzzle. It should be read left to right, top to
bottom.
Question 1 What is the next two rows of numbers.
Question 2 How was this reached.
1 1
2 1
1 2 1 1
1
3 1 2 2 1 1
1 3 1 1 2 2 2 1
On Thu, Apr 14, 2011 at 10:24 PM, arpit.gupta arpitg1...@gmail.com wrote:
3 1 2 2 1 1
1 3 1 1 2 2 2 1
On Apr 13, 12:32 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote:
* Sequence Puzzle
The below is a number puzzle. It should be read left to right, top to
thanks for sharing this question
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more
in fn,ptr first recieves the address of i,and then by ptr=val,it now stores
the address of val variable.
while in fn1,ptr first stores the address of i,and then by *ptr=100,value at
the address of i changes to 100.and hence it gives 100 as the answer.
On Thu, Apr 7, 2011 at 9:29 AM, rohit
In fn, ptr is a local variable passed by value. Changing ptr in the
function does not change anything in main.
Don
On Mar 31, 10:35 pm, navin navin.myhr...@gmail.com wrote:
see this c code.
#includestdio.h
void fn (int *ptr)
{
const int val=100;
ptr=val;}
void fn1(int
I fn we are simply changing the address in ptr means ptr will now points to
another variable i.e val
In fn1 we are changing the value of a variable to which ptr is pointing i.e
i so i will be changed.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
http://math.ucsd.edu/~wgarner/personal/puzzles/cube_puzzle_sol.htm
On Tue, Mar 1, 2011 at 8:46 AM, Vinay Pandey babbupan...@gmail.com wrote:
each pair of opposite faces can make 4 such triangles, so I think the
answer is 12
On Mon, Feb 28, 2011 at 5:47 AM, sourabh jakhar
@dave right..
its 40*40=1600
Thanks
Shashank
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
@all wake...up..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit
1,600: 40 choices counter-clockwise, 40 choices clockwise, then turn
the knob all the way around in the counter-clockwise direction to see
if any of the 40 numbers opens the safe.
Dave
On Mar 6, 9:34 am, bittu shashank7andr...@gmail.com wrote:
You are to open a safe without knowing the
How is E(s2) is calculated? Why E(S2)+1
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n
each pair of opposite faces can make 4 such triangles, so I think the answer
is 12
On Mon, Feb 28, 2011 at 5:47 AM, sourabh jakhar sourabhjak...@gmail.comwrote:
the answer would be more than 8 an it is 32 i think.
but i m sure it will be more than 8
On Wed, Feb 23, 2011 at 7:54 AM, Terence
the answer would be more than 8 an it is 32 i think.
but i m sure it will be more than 8
On Wed, Feb 23, 2011 at 7:54 AM, Terence technic@gmail.com wrote:
8C3 - 12 * 4C3 = 8
Any 3 vertices out of a rectangle only form a right triangles.
Then only 8 regular triangle left. (Cut out each of
The only way to get an acute triangle this way is to connect the
diagonals of three adjacent faces. You can select 3 adjacent faces of
a cube in (6*4*2)/(3*2*1) = 8 different ways.
Regards
Priyaranjan
http://code-forum.blogspot.com
On Feb 23, 12:10 am, jalaj jaiswal jalaj.jaiswa...@gmail.com
@priyaranjan
No,Your triangle will be right angle triangle.
In fact any triangle chosen will be right angle triangle.
Proof:
suppose there are 2 planes kept at parallel with each other.(top bottom)
join corresponding vertices of up to down and form cube.
Now 3 points chosen can be on same
@Priyaranjan: Suppose that the cube has side 1 and is placed in
standard position at the origin. Then the triangle with vertices
(0,0,0), (1,0,1), and (1,1,0) is equilateral with side sqrt(2), and
therefore is not a right triangle.
Dave
On Feb 24, 8:49 am, Vikas Kumar dev.vika...@gmail.com
@dave i never said it will be a right angled triangle ,it will be a
equilateral triangle and thus an acute angled triangle.
On Feb 24, 8:38 pm, Dave dave_and_da...@juno.com wrote:
@Priyaranjan: Suppose that the cube has side 1 and is placed in
standard position at the origin. Then the triangle
@vikash kumar please read my answer then give your comment..it will be
a equilateral triangle and not a right angled triangle i.e an acute
angled triangle.
On Feb 24, 7:49 pm, Vikas Kumar dev.vika...@gmail.com wrote:
@priyaranjan
No,Your triangle will be right angle triangle.
In fact any
@Priyaranjan. Right. I should have directed my comment to Vikas.
Sorry.
Dave
On Feb 24, 9:35 pm, awesomeandroid priyaranjan@gmail.com wrote:
@dave i never said it will be a right angled triangle ,it will be a
equilateral triangle and thus an acute angled triangle.
On Feb 24, 8:38 pm,
@Vikas: Suppose that the cube has side 1 and is placed in standard
position at the origin. Then the triangle with vertices (0,0,0),
(1,0,1), and (1,1,0) is equilateral with side sqrt(2), and therefore
is not a right triangle.
Dave
On Feb 24, 8:49 am, Vikas Kumar dev.vika...@gmail.com wrote:
Is it not 8C3 = 56
On Feb 22, 9:55 pm, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote:
Think of the 8 vertices of a given cube. You are allowed to join three
vertices to form a triangle. How many such unique acute triangles can you
make ??
--
With Regards,
*Jalaj Jaiswal* (+919019947895)
answer is 8 ,,, duno how
On Wed, Feb 23, 2011 at 12:31 AM, Sundi sundi...@gmail.com wrote:
Is it not 8C3 = 56
On Feb 22, 9:55 pm, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote:
Think of the 8 vertices of a given cube. You are allowed to join three
vertices to form a triangle. How many
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
E(t): denotes the maximum no of meetings conducted where 0 = time = t.
E(f1) = e1
E(f2) = max(E(s2) + 1),
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
sorry.
did not go thru it thoroughly earlier.
got it now.
On Feb 9, 7:35 pm, Tushar Bindal tushicom...@gmail.com wrote:
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time
didn't quite get it, can you please elaborate.
thanks
On Feb 8, 10:38 pm, Ujjwal Raj ujjwal@gmail.com wrote:
Use dynamic programming:
1) Sort the events in order of finishing time.
f1, f2, f3, f4, ... fn
E(fn) = E(sn) + 1;
Solve the above recursion
sn is start time of event n
On Wed,
Make 2 piles of 10 and 42 cards.
Suppose in the first pile there are A facing up cards, in the second one B =
10 - A.
Then flip all cards in the first pile. So it will contain 10-A facing up
cards, the same number as in the second pile.
Problem solved :)
--
You received this message because
Hi,
The puzzle needs to be rephrased as:
If the rank of the student who comes out of the classroom is better
than ranks of all students who came out before him/her, then he/she
gets a lollipop.
Rephrased this way, this is a famous puzzle, and the answer is
log(69).
On Nov 22, 12:44 pm, shiva
Any explanation of how it works and how you got log(69) as answer.
Thanks in advance.
On Nov 22, 2:27 pm, Salil Joshi joshi.sali...@gmail.com wrote:
Hi,
The puzzle needs to be rephrased as:
If the rank of the student who comes out of the classroom is better
than ranks of all students who
Well,
Since the students are mixed randomly (as mentioned in the problem), the
chances (probability) that the 'i' th student who comes out is ranked best
so far is directly (1/i). Since this is an independent Random Variable, the
answer thus becomes sum_1^n {1/i} which for large value of n can be
If all the person got his rank increased except the first(he is last
know) then
1. if the previous first ranked person stand front in queue then 69
lollipop need to be distributed.
2. other case 68 lollipop need to be distributed.
On Nov 21, 9:46 pm, Shiv Shankar Prajapati
I am not sure if Center of Gravity calculations should be put into
this solution before accepting it as a solution.
Doesn't erappy's solution sound better and fool proof?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
Let me elaborate,please refer the below diagram, FBH is corner of
inner square and CAD is of the outer square.:
A D__
|\ /
| \e
|/_ \B_H
C| |
| |
F
CD, EB is the proposed position of the planks, i.e. CD is one plank,
EB is another.
BC = L (distance as
Nice way to put it erappy, here is another way.
A block of length L can be place at the corner of the outer square
such that it makes a triangle so that two sides of the triangle is the
corner sides of the square and the base of the triangle is the block.
Now, on this block another block can be
awesome :)
On Wed, Jul 7, 2010 at 9:07 AM, Dave dave_and_da...@juno.com wrote:
There are 6 cases to consider (we can list them but we don't know
which one applies):
1. Initially, all 4 coins are tails.
2. Initially, all 4 coins are heads.
3. Initially, 3 of the coins are heads, 1 is tails.
There are 6 cases to consider (we can list them but we don't know
which one applies):
1. Initially, all 4 coins are tails.
2. Initially, all 4 coins are heads.
3. Initially, 3 of the coins are heads, 1 is tails.
4. Initially, 3 of the coins are tails, 1 is heads.
5. Initially, 2 diagonal coins are
May not be only rotation, maybe rotation, flipping etc, just a
orthogonal/orthonormal transformation matrix
On Sat, May 8, 2010 at 9:19 AM, Afroz Mohiuddin afrozena...@gmail.comwrote:
I have a set of n-dimensional vectors, lets say, v1, v2, v3, ... vm
vi, vj means the dot product of vi and
Have you tried Google? This kinds of problems are usually given as
assignments, and there's plenty of information on the web. Here's one
for example:
http://www.cs.rpi.edu/academics/courses/fall00/ai/assignments/assign3heuristics.html
On Jan 9, 11:33 pm, monu [EMAIL PROTECTED] wrote:
Hi guys!
Check out any AI bookA good dynamic algo is illustrated in Horwitz
Sahani book Fundamentals of Algorithms
On Jan 10, 2008 10:03 AM, monu [EMAIL PROTECTED] wrote:
Hi guys!
i am working on 8puzzle problem, but i am not getting any Heuristic
function to solve the problem.
Can anyone
Cyril,
This is a good resource for any problem...
http://www.cs.sunysb.edu/~algorith/
...and specifically for yours...
http://www.cs.sunysb.edu/~algorith/files/vertex-coloring.shtml
Hope this helps.
Zach
Cyril misc wrote:
Thank you very much for all your help.
I wish you a very Happy
Yes, this is very different from what I was imagining. You use the
word permutation many times when I think you mean combination. A
permutation assigns some sort of meaning to the order in which they
elements are chosen.
I think you pretty much have a solution in the bag. A recursive
I will send you a total explaination of this HUGE problemOn 12/21/05, elzacho [EMAIL PROTECTED] wrote:
Yeah, it seems that the problem may be poorly thought out or stated.If there are extra pieces to the puzzle that are not needed then
(ignoring the 10 piece minimum) isn't one single piece a
And hopefully, a nail gun, to nail down all the loose ends! grin
These word problems...!!!
adak
By definition, your problem is impossible.
You state that each piece is unique, and there are 8 million pieces.
A puzzle is solved only when all the pieces are fitting together,
properly. You have an impossibility, not a problem, and it can't be
solved.
Not to mention that a minimum is a
101 - 173 of 173 matches
Mail list logo