Logic/math questions from the interview

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Logic/math questions from the interview

Post by Pint0 Xtreme »

So I got back from my five and half hour interview and I felt compelled to share a few logic/math questions they grilled me on (which I managed to answer all correctly in a reasonable amount of time :P). If you have the answer, PM me so it isn't spoiled for everyone else. But of course, feel free to ask any questions for further clarification. To be honest, they're quite easy but fun otherwise. :)

1.) There is a triangle with an ant on each vertex. Hence, three ants each on a vertex. Each ant is about to traverse on the edge of the triangle to another vertex. So each ant can choose one of two paths to traverse. What is the probability that the ants will not collide with each other?

2.) There is a rectangular cake. Some freeloader has cut a piece of the cake, which happens to be rectangular as well. The rectangular cut can be of any arbitrary size, in any arbitrary position and in any arbitrary orientation. With a single straight slice, how would you determine where and how to cut the cake so that you separate the cake into two equal halves?

3.) There are four people who need to cross a bridge at night and there is one flashlight. Only two can cross the bridge at a time and the flashlight is required to cross it. Person A takes 1 minute to cross it, Person B takes 2 minutes to cross it, Person C takes 5 minutes to cross it and Person D takes 10 minutes to cross it. When two people are crossing the bridge simultaneously, the time it takes to cross the bridge is determined by the slowest person. For example, if B and D crosses at the same time, it would take them 10 minutes to cross the bridge since D takes 10 mins while B only takes 2 minutes. The question is how would you get all four people across the bridge in 17 minutes or less?

Enjoy. (If one of the mods feel this should be moved to somewhere else more appropriate, feel free to do so)
Image
User avatar
Darth Servo
Emperor's Hand
Posts: 8805
Joined: 2002-10-10 06:12pm
Location: Satellite of Love

Post by Darth Servo »

1) One third.
2) You have to cut the hole from the missing piece in half with the cake as well I think.
3) Clarification: the flashlight needs to be used to cross the bridge but can two people, one with the light one without cross going different directions?
"everytime a person is born the Earth weighs just a little more."--DMJ on StarTrek.com
"You see now you are using your thinking and that is not a good thing!" DMJay on StarTrek.com

"Watching Sarli argue with Vympel, Stas, Schatten and the others is as bizarre as the idea of the 40-year-old Virgin telling Hugh Hefner that Hef knows nothing about pussy, and that he is the expert."--Elfdart
User avatar
Bob the Gunslinger
Has not forgotten the face of his father
Posts: 4760
Joined: 2004-01-08 06:21pm
Location: Somewhere out west

Post by Bob the Gunslinger »

3)Send 1 min and 2 min across. 1 brings back the flashlight. Send 5 and 10 across. 2 brings back the light. 1 and 2 cross the bridge. Done.



I'm not sure I understand #2. Do you get to chose where the rectangle piece is removed from or do you have to come up with an answer for any arbitrary rectangle?
"Gunslinger indeed. Quick draw, Bob. Quick draw." --Count Chocula

"Unquestionably, Dr. Who is MUCH lighter in tone than WH40K. But then, I could argue the entirety of WWII was much lighter in tone than WH40K." --Broomstick

"This is ridiculous. I look like the Games Workshop version of a Jedi Knight." --Harry Dresden, Changes

"Like...are we canonical?" --Aaron Dembski-Bowden to Dan Abnett
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

Darth Servo wrote:1) One third.
Incorrect. Try again.
2) You have to cut the hole from the missing piece in half with the cake as well I think.
You need to be more specific than that.
3) Clarification: the flashlight needs to be used to cross the bridge but can two people, one with the light one without cross going different directions?
No. The light can only be used to cross in one direction. People on the other side of the bridge cannot cross simultaneously in the other direction.
Image
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

Bob the Gunslinger wrote:3)Send 1 min and 2 min across. 1 brings back the flashlight. Send 5 and 10 across. 2 brings back the light. 1 and 2 cross the bridge. Done.
Dammit guys. I said PM me the answers!
I'm not sure I understand #2. Do you get to chose where the rectangle piece is removed from or do you have to come up with an answer for any arbitrary rectangle?
You have to come up with an answer for any arbitrary rectangular cut.
Image
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

To clarify #2, it's basically a rectangular cake with a rectangular hole in it. The hole can be of any size, any position and of any orientation. Hope that helps.
Image
R. U. Serious
Padawan Learner
Posts: 282
Joined: 2005-08-17 05:29pm

Post by R. U. Serious »

You extend a straight line from the two center points of the rectangles (the big, cake one, and the "hole"), cutting on that line will cut both, the cake and the hole, in half.

Of course the easier solution mathematically is to cut it horizontally, but that's rather dificult, and who likes to eat only the bottom of a cake...
Privacy is a transient notion. It started when people stopped believing that God could see everything and stopped when governments realized there was a vacancy to be filled. - Roger Needham
User avatar
Surlethe
HATES GRADING
Posts: 12267
Joined: 2004-12-29 03:41pm

Re: Logic/math questions from the interview

Post by Surlethe »

Pint0 Xtreme wrote:1.) There is a triangle with an ant on each vertex. Hence, three ants each on a vertex. Each ant is about to traverse on the edge of the triangle to another vertex. So each ant can choose one of two paths to traverse. What is the probability that the ants will not collide with each other?
Each ant has two choices. Hence, the total number of possible paths (e.g., (1-2,2-3,3-1)) is eight. Out of those choices, we need to determine how many result in ants not colliding. Clearly, given one ant's choice and the assumption that the ants won't collide, the other ants' choices are completely determined. Thus, since each ant has two choices, we have 2/8 = 0.25.

(Note that this is the rotational subgroup of S_3, which is isomorphic to the group of rigid motions (rotations and flips) of a triangle. Another way of phrasing the problem is to ask, "How many ways are there to cut a triangle out of a piece of paper and replace it without flipping it at all? Obviously, the answer is two: two directions of rotation. Since there are eight possible paths the ants could all take (note that some will not be in S_3 -- e.g., (1-2,2-1,3-2)) we arrive at the answer.

2.) There is a rectangular cake. Some freeloader has cut a piece of the cake, which happens to be rectangular as well. The rectangular cut can be of any arbitrary size, in any arbitrary position and in any arbitrary orientation. With a single straight slice, how would you determine where and how to cut the cake so that you separate the cake into two equal halves?
Cut the cake in half horizontally.
3.) There are four people who need to cross a bridge at night and there is one flashlight. Only two can cross the bridge at a time and the flashlight is required to cross it. Person A takes 1 minute to cross it, Person B takes 2 minutes to cross it, Person C takes 5 minutes to cross it and Person D takes 10 minutes to cross it. When two people are crossing the bridge simultaneously, the time it takes to cross the bridge is determined by the slowest person. For example, if B and D crosses at the same time, it would take them 10 minutes to cross the bridge since D takes 10 mins while B only takes 2 minutes. The question is how would you get all four people across the bridge in 17 minutes or less?
AD: 10 min.
(throw flashlight back across bridge)
CB: 5 min.
That's 15 min. ;)
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass
User avatar
Wyrm
Jedi Council Member
Posts: 2206
Joined: 2005-09-02 01:10pm
Location: In the sand, pooping hallucinogenic goodness.

Re: Logic/math questions from the interview

Post by Wyrm »

Surlethe wrote:
3.) There are four people who need to cross a bridge at night and there is one flashlight. Only two can cross the bridge at a time and the flashlight is required to cross it. Person A takes 1 minute to cross it, Person B takes 2 minutes to cross it, Person C takes 5 minutes to cross it and Person D takes 10 minutes to cross it. When two people are crossing the bridge simultaneously, the time it takes to cross the bridge is determined by the slowest person. For example, if B and D crosses at the same time, it would take them 10 minutes to cross the bridge since D takes 10 mins while B only takes 2 minutes. The question is how would you get all four people across the bridge in 17 minutes or less?
AD: 10 min.
(throw flashlight back across bridge)
CB: 5 min.
That's 15 min. ;)
Better way:

CD: 10 min.
(throw flashlight back across bridge)
AB: 2 min.
Total: 12 min. ;)
Darth Wong on Strollers vs. Assholes: "There were days when I wished that my stroller had weapons on it."
wilfulton on Bible genetics: "If two screaming lunatics copulate in front of another screaming lunatic, the result will be yet another screaming lunatic. 8)"
SirNitram: "The nation of France is a theory, not a fact. It should therefore be approached with an open mind, and critically debated and considered."

Cornivore! | BAN-WATCH CANE: XVII | WWJDFAKB? - What Would Jesus Do... For a Klondike Bar? | Evil Bayesian Conspiracy
User avatar
Darth Servo
Emperor's Hand
Posts: 8805
Joined: 2002-10-10 06:12pm
Location: Satellite of Love

Post by Darth Servo »

Pint0 Xtreme wrote:
Darth Servo wrote:1) One third.
Incorrect. Try again.
Damn it, I added the possibilities instead of multiplying them. :oops:
"everytime a person is born the Earth weighs just a little more."--DMJ on StarTrek.com
"You see now you are using your thinking and that is not a good thing!" DMJay on StarTrek.com

"Watching Sarli argue with Vympel, Stas, Schatten and the others is as bizarre as the idea of the 40-year-old Virgin telling Hugh Hefner that Hef knows nothing about pussy, and that he is the expert."--Elfdart
User avatar
Max
Jedi Knight
Posts: 780
Joined: 2005-02-02 12:38pm
Location: Minneapolis, MN

Post by Max »

May I ask what the interview was for? I may have missed it...
Loading...
Image
User avatar
Gil Hamilton
Tipsy Space Birdie
Posts: 12962
Joined: 2002-07-04 05:47pm
Contact:

Re: Logic/math questions from the interview

Post by Gil Hamilton »

Surlethe wrote:AD: 10 min.
(throw flashlight back across bridge)
CB: 5 min.
That's 15 min. ;)
I'd assume since the mean time for crossing the bridge is 4.5 minutes that the bridge is sufficiently long that it precludes throwing the flashlight. Besides, it's pitch black out, how would you even catch it?

The solution is:
AB crosses (t = 2 min)
A returns (3 min)
CD cross (13 min)
B returns (15 min)
AB cross again (17 minute)

Dingbats. :)
"Show me an angel and I will paint you one." - Gustav Courbet

"Quetzalcoatl, plumed serpent of the Aztecs... you are a pussy." - Stephen Colbert

"Really, I'm jealous of how much smarter than me he is. I'm not an expert on anything and he's an expert on things he knows nothing about." - Me, concerning a bullshitter
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

CLARIFICATION: You cannot cut the cake horizontally because that would leave the bottom half with no topping! :P
Image
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

Max wrote:May I ask what the interview was for? I may have missed it...
A programming position at USC.
Image
User avatar
KrauserKrauser
Sith Devotee
Posts: 2633
Joined: 2002-12-15 01:49am
Location: Richmond, VA

Post by KrauserKrauser »

For #2, since the cake was cut but not removed just cut it in half normally.
VRWC : Justice League : SDN Weight Watchers : BOTM : Former AYVB

Resident Magic the Gathering Guru : Recovering MMORPG Addict
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

KrauserKrauser wrote:For #2, since the cake was cut but not removed just cut it in half normally.
Incorrect. The cut was removed. There is a rectangular hole in it.
Image
User avatar
SilverWingedSeraph
Jedi Knight
Posts: 965
Joined: 2007-02-15 11:56am
Location: Tasmania, Australia
Contact:

Post by SilverWingedSeraph »

KrauserKrauser wrote:For #2, since the cake was cut but not removed just cut it in half normally.
I believe, while not implicitly stated, it's implied that the piece which was cut was also removed. Cutting it in half horizontally is the way to go.
  /l、
゙(゚、 。 7
 l、゙ ~ヽ
 じしf_, )ノ
User avatar
KrauserKrauser
Sith Devotee
Posts: 2633
Joined: 2002-12-15 01:49am
Location: Richmond, VA

Post by KrauserKrauser »

Pint0 Xtreme wrote:
KrauserKrauser wrote:For #2, since the cake was cut but not removed just cut it in half normally.
Incorrect. The cut was removed. There is a rectangular hole in it.
Adding that to the question would be key as proper reading comprehension allows for my answer to be correct.
VRWC : Justice League : SDN Weight Watchers : BOTM : Former AYVB

Resident Magic the Gathering Guru : Recovering MMORPG Addict
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

SilverWingedSeraph wrote:I believe, while not implicitly stated, it's implied that the piece which was cut was also removed. Cutting it in half horizontally is the way to go.
Again, that is not correct because the bottom piece would be left with no topping. This question was not designed for you to look for a loophole but for you to apply basic geometric reasoning to solve the problem.
Image
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

Hint/Clarification: It just occurred to me that I should clarify that when splitting the cake in half, the two halves do not have to be exactly identical in shape. They just have to be equal in terms of the amount of cake.
Image
User avatar
Darth Fanboy
DUH! WINNING!
Posts: 11182
Joined: 2002-09-20 05:25am
Location: Mars, where I am a totally bitchin' rockstar.

Post by Darth Fanboy »

Pint0 Xtreme wrote:Hint/Clarification: It just occurred to me that I should clarify that when splitting the cake in half, the two halves do not have to be exactly identical in shape. They just have to be equal in terms of the amount of cake.
OH!

Well in that case wouldn't you just create a line using the exact cetners of both rectangles, the two rectangles being the cake and the piece removed from the cake?
"If it's true that our species is alone in the universe, then I'd have to say that the universe aimed rather low and settled for very little."
-George Carlin (1937-2008)

"Have some of you Americans actually seen Football? Of course there are 0-0 draws but that doesn't make them any less exciting."
-Dr Roberts, with quite possibly the dumbest thing ever said in 10 years of SDNet.
User avatar
Pint0 Xtreme
Jedi Council Member
Posts: 2430
Joined: 2004-12-14 01:40am
Location: The City of Angels
Contact:

Post by Pint0 Xtreme »

Darth Fanboy wrote:OH!

Well in that case wouldn't you just create a line using the exact cetners of both rectangles, the two rectangles being the cake and the piece removed from the cake?
Precisely. :)
Image
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Re: Logic/math questions from the interview

Post by Durandal »

Pint0 Xtreme wrote:2.) There is a rectangular cake. Some freeloader has cut a piece of the cake, which happens to be rectangular as well. The rectangular cut can be of any arbitrary size, in any arbitrary position and in any arbitrary orientation. With a single straight slice, how would you determine where and how to cut the cake so that you separate the cake into two equal halves?
Cut the cake through a plane running parallel to the surface the cake is sitting on positioned at half the cake's height.
Damien Sorresso

"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
darthbob88
Jedi Knight
Posts: 884
Joined: 2006-11-14 03:48pm
Location: The Boonies

Re: Logic/math questions from the interview

Post by darthbob88 »

Durandal wrote:
Pint0 Xtreme wrote:2.) There is a rectangular cake. Some freeloader has cut a piece of the cake, which happens to be rectangular as well. The rectangular cut can be of any arbitrary size, in any arbitrary position and in any arbitrary orientation. With a single straight slice, how would you determine where and how to cut the cake so that you separate the cake into two equal halves?
Cut the cake through a plane running parallel to the surface the cake is sitting on positioned at half the cake's height.
Already been disqualified, and the real answer found.
This message approved by the sages Anon and Ibid.
Any views expressed herein are my own unless otherwise noted, and very likely wrong.
I shave with Occam's Razor.
User avatar
Braedley
Jedi Council Member
Posts: 1716
Joined: 2005-03-22 03:28pm
Location: Ida Galaxy
Contact:

Post by Braedley »

Since no one else is using the PM, I guess I won't either (dammit, I was going to get #3 :evil: )

Anyways, #1 is easy and basically solved but not posted so:

There are only two possible events where the ants will not collide. 1-if they all take the left route, 2-if they all take the right route. There are a total of 2^3=8 possibilities. 2/8=0.25=25%
Image
My brother and sister-in-law: "Do you know where milk comes from?"
My niece: "Yeah, from the fridge!"
Post Reply