Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Riddles - Dwarf style  (Read 7887 times)

Shades

  • Bay Watcher
    • View Profile
Re: Riddles - Dwarf style
« Reply #30 on: January 10, 2011, 07:35:41 am »

Is this one 35, 45, 56, 69 btw?

Yes, very good. Would you care to explain why?

It's an every positive integer one.

1 (+2) 3 (+4) 7 (+5) 12 (+6) 18 (+8) 26 (+9) 35 (+10) 45 (+11) 56 (+13) 69

The next additions are +14 to +17 then +19 etc, 18 is skipped as it's already in the list, like 1, 3, 7 and 12 were.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Riddles - Dwarf style
« Reply #31 on: January 10, 2011, 07:39:46 am »

Indeed.
It shares characteristics with a fractal, in that this string "shapes itself"
Let's call the string "[string x]

basically, [string x] starts at 1, and adds to that the next positive integer number from the [string off all positive integers, without those positive integers that are already present in [string x]]

Amazingly, if you want a computer to produce this string, it seems you need a logic formula of about 2 pages.
« Last Edit: January 10, 2011, 07:41:59 am by martinuzz »
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: Riddles - Dwarf style
« Reply #32 on: January 10, 2011, 07:50:37 am »

Heh, that was really good. How did a Dwarf who "isn't good with numbers" figure this out anyway? :o
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Riddles - Dwarf style
« Reply #33 on: January 10, 2011, 07:53:21 am »

Heh, that was really good. How did a Dwarf who "isn't good with numbers" figure this out anyway? :o
He didn't, this story is open-ended
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: Riddles - Dwarf style
« Reply #34 on: January 10, 2011, 07:58:46 am »

Heh, that was really good. How did a Dwarf who "isn't good with numbers" figure this out anyway? :o
He didn't, this story is open-ended
Well, yeah. It wouldn't be much of a riddle if it wasn't. So does Shades get to come up with the next riddle then?
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Falc

  • Bay Watcher
    • View Profile
Re: Riddles - Dwarf style
« Reply #35 on: January 10, 2011, 08:02:03 am »

Amazingly, if you want a computer to produce this string, it seems you need a logic formula of about 2 pages.

Erm... No, you don't.

Python code:
Code: [Select]
>>> t = range(1,100)
>>> r = [0]
>>> for i in t:
        if i not in r:
                r.append(r[-1] + i)
>>> r
[0, 1, 3, 7, 12, 18, 26, 35, 45, 56, 69, 83, 98, 114, 131, 150, 170, 191, 213, 236, 260, 285, 312, 340, 369, 399, 430, 462, 495, 529, 565, 602, 640, 679, 719, 760, 802, 845, 889, 935, 982, 1030, 1079, 1129, 1180, 1232, 1285, 1339, 1394, 1451, 1509, 1568, 1628, 1689, 1751, 1814, 1878, 1943, 2009, 2076, 2144, 2214, 2285, 2357, 2430, 2504, 2579, 2655, 2732, 2810, 2889, 2969, 3050, 3132, 3216, 3301, 3387, 3474, 3562, 3651, 3741, 3832, 3924, 4017, 4111, 4206, 4302, 4399, 4498]
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Riddles - Dwarf style
« Reply #36 on: January 10, 2011, 08:09:09 am »

I meant, without the help of any pre-defined operations.
Not code, but underlying logic formula. As in "From the collection of all positive integer numbers, you can form a string of numbers that makes up a collection of positive integer numbers which is used to form a string that is used to form the string bl etcbla"

Btw Python is great. I should learn it.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

QuakeIV

  • Bay Watcher
  • Cant resist... must edit post.
    • View Profile
Re: Riddles - Dwarf style
« Reply #37 on: January 11, 2011, 01:40:23 am »

Eh, python is simple looking at first, then it gets all screwy as things get more complicated.
Logged
GENERATION 9: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
I wish my grass was emo, then it would cut itself.
Quote from: Jesus
Quote from: The Big Fat Carp
Jesus, you broke the site!
Sorry, Bro.
link to quote

Maklak

  • Bay Watcher
    • View Profile
Re: Riddles - Dwarf style
« Reply #38 on: January 11, 2011, 05:46:21 pm »

For the first riddle I'd go for a "brute force" approach. I just need a way of marking a dwarf (rise a hand, lie down, step away from others, whatever), and a question that has an obvious answer known to any dwarf, like "what rock am I holding in my hand", "Is magma hotter than ice", that sort of thing.

Line them up, and ask the question to everyone. Mark those who lied. We are left with either 3 of four dwarfs. Repeat procedure, untill left with one or 2. If 2 are left ask the same dwarf two such obvious questions. If he lies to one, the other one speaks the truth, and if he answers truthfully, ash him how to get out of forest.

This solution is as unimaginative as they get, but it would work in O(2D) questions, and that seems acceptable.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

expwnent

  • Bay Watcher
    • View Profile
Re: Riddles - Dwarf style
« Reply #39 on: January 11, 2011, 08:53:46 pm »

I meant, without the help of any pre-defined operations.

Trivially, you can't do ANYTHING without pre-defined operations. At some point, there need to be primitive computations you can do.
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Riddles - Dwarf style
« Reply #40 on: January 12, 2011, 09:11:54 am »

For the first riddle I'd go for a "brute force" approach. I just need a way of marking a dwarf (rise a hand, lie down, step away from others, whatever), and a question that has an obvious answer known to any dwarf, like "what rock am I holding in my hand", "Is magma hotter than ice", that sort of thing.

Line them up, and ask the question to everyone. Mark those who lied. We are left with either 3 of four dwarfs. Repeat procedure, untill left with one or 2. If 2 are left ask the same dwarf two such obvious questions. If he lies to one, the other one speaks the truth, and if he answers truthfully, ash him how to get out of forest.

This solution is as unimaginative as they get, but it would work in O(2D) questions, and that seems acceptable.

That solution won't work, for you can only ask a total of 2 questions, to a single dwarf, as by the story. You cannot repeatedly ask the same questions to multiple dwarves.
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

expwnent

  • Bay Watcher
    • View Profile
Re: Riddles - Dwarf style
« Reply #41 on: January 12, 2011, 08:01:45 pm »

I believe I can solve the first riddle with just one question.

I assume that the dwarves are cursed to answer questions alternating between true answers and false answers, regardless of the knowledge or intelligence of the dwarf being questioned.

The question is:

If, after asking you this question, I ask you "how do we get out?", what answer could you not give me due to truth-speaking restrictions?

Truth-speaker reasoning:
Next time, I will have to answer the question falsely.
So I cannot answer the next question with the truth.
So for that question, I could not answer with the correct way out.
I am a truth-speaker right now, so I must answer truthfully and say the correct way out.

False-speaker reasoning:
Next time, I will have to answer the question truthfully.
I cannot answer the next question with falsehood.
If I answer this question with an incorrect way out, then I have answered it with the truth, because if I am asked that question next, I cannot answer with falsehood.
If I answer this question with the correct way out, then I have answered it with falsehood, because if I am asked that question next, I can, and must, answer it with the correct way out.
Therefore, I must answer the question with the correct way out.

So ask any one of the dwarves that question, then do what he/she says about how to get out.

If dwarves explode under these circumstances, because they don't know the correct way out and thus don't know if they're telling the truth, then instead ask a random dwarf

If, after asking you this question, I ask you "which of you knows the way out?", what answer could you not give me due to truth-speaking restrictions?

Then ask the dwarf who knows the way out the first question of this post.
Logged
Pages: 1 2 [3]