Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Tavern of the Rising Sun > Thread: Let's talk about Maths!!!
Thread: Let's talk about Maths!!! This thread is 55 pages long: 1 10 20 30 ... 34 35 36 37 38 ... 40 50 55 · «PREV / NEXT»
ihor
ihor


Supreme Hero
Accidental Hero
posted May 01, 2010 05:12 PM

Q7. Liars and Knights.

Okay since now all of dimis puzzles were solved and he asked me also to post some similar puzzles, I'll do it now. If you don't mind dimis, I'll continue your numeration:

Q7. There is an island with 100 inhabitants. Some of them are knights, who always tell truth and the others are liars, who always lie. Each of the inhabitants worship exactly one of three Gods (Sun, Moon, Earth). You asked three questions to each inhabitant:
1)Do you worship God of Sun?
2)Do you worship God of Moon?
3)Do you worship God of Earth?

And you got 60 "yes" on the 1) question, 40 "yes" on the 2) and 30 on the 3).
How many liars are there on this island?

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted May 01, 2010 06:05 PM

Alright, we have many interesting solutions! Let's have more participants!
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
del_diablo
del_diablo


Legendary Hero
Manifest
posted May 03, 2010 04:25 PM

I got no idea of the logic, but what if there are 30 liars?
____________



 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
friendofgunnar
friendofgunnar


Honorable
Legendary Hero
able to speed up time
posted May 04, 2010 08:42 AM
Edited by friendofgunnar at 09:04, 04 May 2010.

The knights will give one yes response

K = Yes's from Knights

The liars will give two yes responses.

2L = Yes's from Liars

K + 2L = 130

Knights + Liars = 100 people on the island
K + L = 100
K = 100 - L

(100 - L) + 2L = 130
Liars = 30
Knights = 70


Now let's see if we can break it down...

60 yes responses for god of sun is equal to the Knights of Sun's yes responses plus the Liar's of Moon's yes responses plus the Liar's of Earth's yes responses.  Likewise with the other groups:

LM + LE + KS = 60
LS + LE + KM = 40
LS + LM + KE = 30

Let's add the first two equasions and do some substituting:

LM + LS + 2LE + KS + KM = 100
LM + LS + 2LE + KS + KM = K + L
(LM + LS + LE) + LE = K - (KS + KM) + 30
30 + LE = KE + 30
LE = KE

add the second pair of equasions and do some substituting:

2LS + LE + LM + KM + KE = 70
2LS + LE + LM + KM + KE = K
2LS + LE + LM  = K - (KM + KE)
LS + (LS + LE + LM) = KS
LS + 30 = KS

add the first and last equasion:

2LM + LE + LS + KS + KE = 90
LM + KS + KE = 60
LM + (70 - KM) = 60
LM + 10 = KM

The solution works for 10 sun liars, 10 moon liars, 10 earth liars, 40 sun knights, 20 moon knights, and 10 earth knights.

However, I couldn't figure out how to get to that conclusion. What am I missing? ^2

EDIT:
silly me, it works for any solution where the liars add up to 30 total

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 09:58 AM

You got it right, but you missed a bit simpler way of solving.

You got:
Quote:
LM + LE + KS = 60
LS + LE + KM = 40
LS + LM + KE = 30


Add all!
2(LS + LM + LE) + (KS + KM + KE) = 130

100 people on the island ->
(LS + LM + LE) + (KS + KM + KE) = 100

And finally subtract:
(LS + LM + LE) = 30
But this value is what we needed to find.
Answer: 30.

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
del_diablo
del_diablo


Legendary Hero
Manifest
posted May 04, 2010 10:09 AM

But again, they are liers. Why would they give away 2 answers? Why not just lie, say yes on all, saying no on all,etc.
This task does fail logic.
____________



 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 04, 2010 10:52 AM

We were only told that they always lied. Not that they don't want you to know which god they worship; a liar will answer "yes" twice and "no" once so you instantly know that they worship the god they said they didn't worship.
Therefore the person who collected the data could have known right away how many liars the island has. Apparently a lot of information was lost in the process.
That might be what makes the problem seem odd to you.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
del_diablo
del_diablo


Legendary Hero
Manifest
posted May 04, 2010 11:12 AM

Well, this is common after all. We must assume there is no variations in some way for it to be calculated.
But this method would not work in real life for the exact reason.
____________



 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 12:26 PM

C'mon, where in real life do you find a person who always lies or always tell truth . This is just a verbal decoration of mathematical problem.

Okay, to finally study out the logic under knights and liars I'll give another puzzle. It is logic, not math puzzle, and it could be solved by anyone. I will not name it Q8, lets say it's continuation of Q7. So:

Knigths and Liars (Part 2)
There are 2 cities: city of knights and city of liars. Knights always tell truth, liars always lie. You are in one of these cities. What question should you ask a person to know exactly where are you? The problem is knights often visit their friends liars and vice versa, so you certainly don't know if the person you refer to a liar or knight.

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
del_diablo
del_diablo


Legendary Hero
Manifest
posted May 04, 2010 12:34 PM

Ask: "What is the color of my jacket, and where do you live?"
____________



 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ohforfsake
ohforfsake


Promising
Legendary Hero
Initiate
posted May 04, 2010 12:37 PM
Edited by ohforfsake at 12:39, 04 May 2010.

What city would your opposite say this is?

Person | City  | Answer
Liar     | Liar  | Knight
Knight | Liar   | Knight
Liar     | Knight | Liar
Knight | Knight| Liar

So if the answer is Liar city, you're in Knight city.
If the answer is Knight city, you're in Liar city.

There's probably a smarter, avoiding the term 'opposite', way to ask to create answers that are unique for the given city and not the given person that's asked, but I'm certain it'd require the answer being formulated in a way that the answer is different from each persons perspective.

Edit: This is under the assumptions you only have one question.
____________
Living time backwards

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Badasti
Badasti


Hired Hero
posted May 04, 2010 12:37 PM
Edited by Badasti at 12:38, 04 May 2010.

Quote:
C'mon, where in real life do you find a person who always lies or always tell truth . This is just a verbal decoration of mathematical problem.

Okay, to finally study out the logic under knights and liars I'll give another puzzle. It is logic, not math puzzle, and it could be solved by anyone. I will not name it Q8, lets say it's continuation of Q7. So:

Knigths and Liars (Part 2)
There are 2 cities: city of knights and city of liars. Knights always tell truth, liars always lie. You are in one of these cities. What question should you ask a person to know exactly where are you? The problem is knights often visit their friends liars and vice versa, so you certainly don't know if the person you refer to a liar or knight.


I walk up to them, ask if I'm male or female, the one that says male is the one that tells the truth no? Unless the other knows something that I don't .

If you can't accept the answer as straight forward as that then the situation is more complex than simple truth and honesty.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 12:46 PM
Edited by ihor at 12:47, 04 May 2010.

@del_diablo and badasti
You can ask only 1 question and simple one.

@Ohforf
Thats quite complicated but seems correct, but if you add condition that they all know about liar/knights thing. What if they don't or they are not enough intelligent to think out the logic of opposite?

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
ohforfsake
ohforfsake


Promising
Legendary Hero
Initiate
posted May 04, 2010 12:56 PM

Maybe changing "Opposite" with: "Person who would say the opposite of you".

That's then under the assumption the person who's asking knows that the only people that can be met are either liars or knights, and then it shouldn't matter if liars and knights know about eachother.
____________
Living time backwards

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Badasti
Badasti


Hired Hero
posted May 04, 2010 01:00 PM

Quote:
What city would your opposite say this is?

Person | City  | Answer
Liar     | Liar  | Knight
Knight | Liar   | Knight
Liar     | Knight | Liar
Knight | Knight| Liar

So if the answer is Liar city, you're in Knight city.
If the answer is Knight city, you're in Liar city.

There's probably a smarter, avoiding the term 'opposite', way to ask to create answers that are unique for the given city and not the given person that's asked, but I'm certain it'd require the answer being formulated in a way that the answer is different from each persons perspective.

Edit: This is under the assumptions you only have one question.


I've been up since 5am with only 5 hours sleep so please bare with me if this is a stupid question. But assuming knights always tell the truth and working from your table you are saying:

A Knight in a Liar city says he is in the Knight city? Unless I'm reading your table wrong that means they are all liars...

If you say the table works in opposites that means they will contradict eachother yet again and you are still guessing?

The table is kinda confusing but I don't see how you can determine who is the liar from the knight and which city you are in from that. O.o Esp with 1 question...
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 01:02 PM

Yes, I understood what you meant by opposite, but try to get rid of this asumption too.
The answer of the person could only depend on his logic, not the logic of opposites.
Imagine they all even don't know about the thing that there are liars and knights. They lie or tell truth because their inner nature says them to do so .

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
ohforfsake
ohforfsake


Promising
Legendary Hero
Initiate
posted May 04, 2010 01:05 PM
Edited by ohforfsake at 13:08, 04 May 2010.

@Badasti
You can't determine who's the knight and who's the liar, but that's not the purpose, as I understand. Only to find what city we're in.

The trick is, to try to create an answer that depends on the city and not the person you ask.

If you can make a question so that no matter if it is a liar or a knight who replies that you'll always get told the same city, depending on the city you're in, you can figure out what city you're in.

Also about the knight saying it's knight city.

The knight see it this way:
The liar would tell that liar city is knight city, the person asks me, what would my opposite (a liar) tell, and he'd tell it's knight city, eventhough it's liar city.

The knight did not lie, he told what someone who always lied would tell, as was what was asked.

It's similar to the 2 angels, one way, one question problem, except with the 2 angels, you know at least they'd know about eachother.

Quote:
Yes, I understood what you meant by opposite, but try to get rid of this asumption too.
The answer of the person could only depend on his logic, not the logic of opposites.
Imagine they all even don't know about the thing that there are liars and knights. They lie or tell truth because their inner nature says them to do so .


And that's why I changed it to "person who says the opposite of you"

Or if you want, if a person were to answer the exact opposite of yourself, what would that person answer, or something like that.

I think that removes the assumption about liars and knights knowing about eachothers nature, as the opposite is now not refering to someone else, but the opposite of what they, themselves, would do.
____________
Living time backwards

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 01:05 PM

@badasti

Ohforf meant
If you ask "Knight"(Person) in "Liar"(city) city the question "What city would your opposite say this is?" then he will think:
Hmm my opposite is Liar and since we are in Liar city he would say "Knight"(Answer). See table.

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
ohforfsake
ohforfsake


Promising
Legendary Hero
Initiate
posted May 04, 2010 01:15 PM

About intelligence, well, then they wouldn't be lying/telling the truth and thereby goes the known condition in my opinion.
____________
Living time backwards

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ihor
ihor


Supreme Hero
Accidental Hero
posted May 04, 2010 01:20 PM

Don't try to convince me that your solution is 100% correct .
I already said: Imagine, they lie or tell truth because their inner nature says them to do so.

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 55 pages long: 1 10 20 30 ... 34 35 36 37 38 ... 40 50 55 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1367 seconds