top_left top_right
bottom_left
Next Event: Unknown | Forum Rules | QGL Website | Event Registration
openFolder AusForums.com
iconwatfolderLineopenFolder LANs
iconwatfolderLineopenFolder QGL
iconwatfolderLineopenFolder QGL Forum
Author
Topic: Brain Teaser
Dilbert
Posts: 1327
Location: Brisbane, Queensland
There are 100 closed lockers in a school. Standing in front of each locker is a student. A bell will ring 100 times. At the first ring, all students will toggle their locker (from closed to opened). At the second ring, every other student will toggle his or her locker. At the third ring, every third student will toggle his or her locker, and so on, until the 100th ring where only the 100th student will toggle his/her locker. After the 100th ring, how many lockers will be open?
system
--
Cailean
Posts: 2612
Location: New South Wales
By toggling you do mean from open to closed aswell right? cause otherwise they'd all be open.
scrub
Posts: 402
Location: Brisbane, Queensland
Thats a progression I do not want to work out. U have to keep track of the state of every locker to work out if it will end up open or closed. Someone gonna knock up a boolean array with a hundred elements and work it out?
DeAtHwAlKeR
Posts: 684
Location: Brisbane, Queensland
i think i might have missed something or you have worded it wrong because you say ALL students toggle them then EVERY OTHER student toggle them. :S
Cailean
Posts: 2613
Location: New South Wales
yeh wierd.

i can't figure it out properly because of the wording.
either all, none or 50 (maybe 49 or 51)
Opec
Posts: 195
Location: Brisbane, Queensland
97 I reckon.
Dilbert
Posts: 1328
Location: Brisbane, Queensland
Ok the first bell rings everyone opens there locker, the second bell ring, every second person closes there locker, the third bell ring, every third person toggles there locker so if its closed they will open it and if its open they will close it

it has everything to do with the factors of each number
its quite simple
Scuzzy
Posts: 8073
Location: Brisbane, Queensland
Simple maybe, but just re-reading your initial post caused some confusion.
plok
Posts: 196
Location: Brisbane, Queensland
This was a fun one! I'll save my reasoning so the other squares can have a chance of getting it! :)

Anyway, 10 will be open.
Dilbert
Posts: 1330
Location: Brisbane, Queensland
plok is right well done
scrub
Posts: 403
Location: Brisbane, Queensland
while(firstvalue, <=100,firstValue++)
{
for (secondValue = firstValue,<=100, secondvalue = secondValue + firstValue, )
{
if array(secondValue) == true
{
array(secondValue) = falae
}
else
{
array(secondValue) = true
}
}end for loop
}end while loop
add up the trues and there is the answer. What a nerdy thing to do

(insert correct syntax for your fav programming language)
Opec
Posts: 196
Location: Brisbane, Queensland

plok is right well done


Now please explain how you'd calculate that? :)
Dilbert
Posts: 1331
Location: Brisbane, Queensland
ok
every number has factors, consider each ring to be a test for a factor, if that ring is a factor the student toggles a door. All factors come in pairs, like 1 and itself, or 4*5 or whatever. An even number of factors will lead to a door being opened and closed again. But if a number has an odd number of factors then the door will remain open after all the factors have been tried. So the only numbers left are the squares

1, 4, 9, 16, 25, 36, 49, 64, 81 and 100.
Finite
Posts: 42
Location: Sydney, New South Wales
tricky
Reverend Evil
Posts: 3894
Location: Brisbane, Queensland
I reckon there will be 10 left open.

Let's see what everyone else gets.
plok
Posts: 197
Location: Brisbane, Queensland
trunc(n^1/2)

:)

SPOILER

The final state of a locker depends on how many times it is toggled. If it's an odd number of times it'll be open, otherwise closed.

The lockers are enumerated and it isn't hard to see that a locker is toggled when the Nth whistle is a denominator of that locker number. For example, locker 10 will be toggled one the first blow (1), the second, fifth and tenth blows, ie all the denominators of 10 (1,2,5,10).

Now, obviously denominators come in pairs (eg 2 * 5 = 10, 1 * 10 = 10) so we would expect to always have closed lockers. There is of course one special case, that of a square number, where the denominator is multiplied by itself and doesn't have a pair. In this case the total number of unique denominators will be an odd number (all of the pairs plus the square root) and the locker will end up open.

There are 10 square numbers from 1..100 inclusive, hence the answer.
Opec
Posts: 197
Location: Brisbane, Queensland
Interesting :) Any more questions like these?
Br@dli
Posts: 6
Location: Brisbane, Queensland
1. We were born of the same mother, on the same day, at the same hour and in the same year. Yet we are not twins. How do you explain this?

2. Can you find something which has keys that open no locks, with space but no room, and allows you to enter but not to go in? (Pretty simpe)

3. I am never the first to speak but I am always the last to be heard. Who am I?
Dilbert
Posts: 1332
Location: Brisbane, Queensland
3 an echo?
2 a piano?
Br@dli
Posts: 7
Location: Brisbane, Queensland
Number 3 is right, Number 2 isn't
maxe
Posts: 5597
Location: Brisbane, Queensland
answer hidden below to prevent spoilers

Number 2 is a computer keyboard
Tael
Posts: 2014
Location: Brisbane, Queensland
1. They're two children from a set of triplets.
Fish
Posts: 481
Location: Other International
We were born of the same mother, on the same day, at the same hour and in the same year. Yet we are not twins. How do you explain this?

simple, you must be a skitzo. :D
but the more likely answer is that they are triplets.

edit: dang, Tael just beat me to it
Grosby
Posts: 469
Location: Brisbane, Queensland
Easy one.

I am the beginning of eternity and the end of time. What am I?
Spook
Posts: 2452
Location: Brisbane, Queensland
are u the letter e?
d0mino
Posts: 291
Location: Brisbane, Queensland
number 2 is a keyboard !
Grosby
Posts: 470
Location: Brisbane, Queensland
yay Spook :D

Greater than God,
More evil than the devil,
The poor have it,
The rich need it
And if you eat it, you will die.
Spook
Posts: 2453
Location: Brisbane, Queensland
you are nothing;
Grosby
Posts: 471
Location: Brisbane, Queensland
i swaer you googled that :P~
Opec
Posts: 198
Location: Brisbane, Queensland

Greater than God,
More evil than the devil,
The poor have it,
The rich need it
And if you eat it, you will die.


you are nothing;


? eh I don't get it?? Please explain

Spook
Posts: 2454
Location: Brisbane, Queensland
nothing is greater than god
nothing is more evil than the devil
poor people have nothing
rich people need nothing
if u eat nothing you will die
Grosby
Posts: 472
Location: Brisbane, Queensland
Nothing is great than god
nothing is more evil thant he devil
The poor have nothing
The rich need nothing (more)
And if you eat nothing, you die.
Spook
Posts: 2455
Location: Brisbane, Queensland
JINX
u owe me a coke;
Grosby
Posts: 473
Location: Brisbane, Queensland
PERSONAL JINX!
Grosby
Posts: 474
Location: Brisbane, Queensland
http://www.backlinah.com/n00b.jpg
that's to hold your coke with. The coke will be sent, via email, later :P~
Spook
Posts: 2457
Location: Brisbane, Queensland
my answer was better coz it was up first and didnt have typos :D

and yor pic is a blank page
Grosby
Posts: 475
Location: Brisbane, Queensland
mine was in the correct order :P~
Spook
Posts: 2458
Location: Brisbane, Queensland
so is mine . .. . . .
Grosby
Posts: 476
Location: Brisbane, Queensland
nice edit :P~
Opec
Posts: 199
Location: Brisbane, Queensland
Ok I've got one:


My grandson is about as many days as my son is weeks, and my grandson is as many months as I am in years. My grandson, my son and I together are 100 years. Can you tell me my age in years?
Spook
Posts: 2460
Location: Brisbane, Queensland
u r 60
Opec
Posts: 200
Location: Brisbane, Queensland
Spook, correct!. Would you care to show us how you worked this out?
Spook
Posts: 2463
Location: Brisbane, Queensland
i used maths
Dilbert
Posts: 1335
Location: Brisbane, Queensland
well done
GumbyNoTalent
Posts: 1190
Location: Brisbane, Queensland
My grandson is about as many days as my son is weeks

Therfore my son is 7 * older than my grandson.
my grandson is as many months as I am in years.

Therefore I'am 12 * older than my grandson.

(12*X)+(7*X)+X = 100

or

100/20 = X = 5

60 + 35 + 5 = 100
Opec
Posts: 202
Location: Brisbane, Queensland

i used maths


Hahha :) Also Gumby, yes your equation is correct :)

Ok then smarty pants, how about this one:


The son of a rich bullion merchant left home on the death of his father. All he had with him was a gold chain that consisted of 130 links. He rented a place in the city center with a shop at the lower level and an apartment at the upper level. He was required to pay every week one link of the gold chain as rent for the place.

The landlady told him that she wanted one link of the gold chain at the end of one week, two gold links at the end of two weeks, three gold links at the end of three weeks and so on.

The son realized that he had to cut the links of the gold chain to pay the weekly rent. If the son wished to rent the place for 130 weeks, what would be the minimum number of links he would need to cut?

eYe_kAnDy
Posts: 4820
Location: Brisbane, Queensland
Is it 120 million apple pies?
GumbyNoTalent
Posts: 1191
Location: Brisbane, Queensland
130 links of gold = 130 weeks of rent.
He was required to pay every week one link of the gold chain as rent for the place.


but after 15 weeks 1+2+3+4+5+6 etc he would have payed 120links and would be left with 10links.
The landlady told him that she wanted one link of the gold chain at the end of one week, two gold links at the end of two weeks, three gold links at the end of three weeks and so on.


So he would have to pay 130links in 15.66666 weeks to rent the 1 link/week apartment and shop for 130 weeks. So he would have to cut the links like 1 piece for 1st week then into 2 pieces for the next then 3 pieces for the 3rd week etc etc.
so the 130links would eventually be 8515pieces. :)
Sandman
Posts: 1070
Location: Brisbane, Queensland
I just had fricking 5 lessons of maths today, so I might just leave this thread now. :P
Spook
Posts: 2466
Location: Brisbane, Queensland
maths rox
Sandman
Posts: 1071
Location: Brisbane, Queensland
yes, but not when you have 5 lessons of it in one day. (Including a test.)
Opec
Posts: 204
Location: Brisbane, Queensland
Gumby, incorrect but, please try again :)
Spook
Posts: 2467
Location: Brisbane, Queensland
u should consider yourself lucky to have access to sooo much maths

i envy u
GumbyNoTalent
Posts: 1192
Location: Brisbane, Queensland
Gumby, incorrect but, please try again :)


@ 1 link a week for 130 weeks = 130links

@ 1 piece the first week the 2 the second etc etc = 8515pieces = 130links
GumbyNoTalent
Posts: 1193
Location: Brisbane, Queensland
what would be the minimum number of links he would need to cut


oops wording, awnser 129links
Opec
Posts: 205
Location: Brisbane, Queensland

@ 1 link a week for 130 weeks = 130links

@ 1 piece the first week the 2 the second etc etc = 8515pieces = 130links


I think you've misinterpret the question, it's asking for the "minimum" amount he has to cut the chain.

The answer is:

The minimum number of cuts needed to be made is 4 for a chain with 115 links.

If the links are numbered serially from 1 to 115, then the cuts would be made on the following links:
6, 17, 38, and 79.

This would result in 4 one-link pieces, one 5-link piece, one 10-link piece, one 20-link piece, one 40-link piece, and one 36 piece.





Week:1 23 4 56 789 10 1112
Gold links given:1 1+11+1+1 1+1+1+155+1 5+1+15+1+1+15+1+1+1+1 1010+1 10+1+1


The table above indicates that:
at the end of the fifth week, the 5-link piece is given and the 4 one-link pieces are taken back;
at the end of the tenth week, the 10-link piece is given and the 4 one-link pieces as well as the 5-link piece are taken back.



And no I didn't worked the answer out myself, I'm not that smart :)
Sandman
Posts: 1072
Location: Brisbane, Queensland
u should consider yourself lucky to have access to sooo much maths

i envy u


Shut up :P
teen
Posts: 9798
Location: Brisbane, Queensland
more brain teasers, less math questions, thanks.
GumbyNoTalent
Posts: 1195
Location: Brisbane, Queensland
arrrh said the blind man to the deak dog, "I see now!"

I hate it when the question takes longer to comprehend than the solution.
Fish
Posts: 486
Location: Other International
Here's one:
"I'm a fortess with no doors (no windows either) and halls of marble, but thieves still break-in and steal the gold inside. What am I?"
teen
Posts: 9815
Location: Brisbane, Queensland
I know what it is, but that's more of a far-fetched metaphor than a riddle.
Hybr|d
Posts: 207
Location: Brisbane, Queensland
rofl i do these all the time in one of my classes called Personal Enrichment ;)

anyways heres two (dunno if they have been done)

1)
Bobbie and Gena are lying dead on the floor of their apartment. Their is only one door which is locked from the inside and one window which is open, although nothing has ever been able to get up to their window whiich is 74 floors up the side of their building, how did they die ?

2) Lisa and sandra are walking through the bush. They come across a cabin. They look through a window and everyone in the cabin is dead. How did they die ?

all of these can have different solutions..but they must be sensible


Now for both of these u can ask questions, but i can only give a yes or no answer...

gl :)
clint BEASTwood
Posts: 366
Location: Brisbane, Queensland
1) Old age
2) Plane crash
WhoopAss
Posts: 2549
Location: Brisbane, Queensland
those are more like character questions, depending on what answer you give says something about you. You could say old age & that'd probably say ur a calm person who lets nature take it's course or whatever or you could say mass murder suicide, saying that you lean towards a violent outcome to all things. Not really brain teasers.
Hybr|d
Posts: 208
Location: Brisbane, Queensland
clint

1) No
2) very good :)
tension
Posts: 6775
Location: Melbourne, Victoria
i toggle every day
teen
Posts: 9832
Location: Brisbane, Queensland
Hybrid, is there glass and water on the floor of the apartment as well ;) ? (if there is, you should have said that)
teen
Posts: 9833
Location: Brisbane, Queensland
there is a pool 12ft across (widest part) and on a leaf, dead in the centre is a frog.
Now, if a frog can leap in two foot bounds, can the frog get out of the pond in three jumps?
eYe_kAnDy
Posts: 4832
Location: Brisbane, Queensland
Yes, because the leaf would float about.
teen
Posts: 9834
Location: Brisbane, Queensland
ok let's pretend it's a rooted lilly pad, and it doesn't move around.
Hybr|d
Posts: 209
Location: Brisbane, Queensland
no teen there isnt a glass of water on the floor ;) but there is water on the floor :D
teen
Posts: 9836
Location: Brisbane, Queensland
i DIDN'T SAY GLASS OF WATER, i said glass and water.
I think the wind blew into the window and knocked a fish tank over. The dead couple were suffocated goldfish.
Hybr|d
Posts: 210
Location: Brisbane, Queensland
very good :) my bad on not reading it properly :D
system
--
Not a new post since your last visit.
New Post Since your last visit
Back To Forum
Advertise with Us | Privacy Policy | Contact Us
© Copyright 2001-2026 AusGamers Pty Ltd. ACN 093 772 242.
Hosted by Mammoth Networks - Australian VPS Hosting
Web development by Mammoth Media.