pouët.net

Any demoscener from Mensa?

category: residue [glöplog]
And other problem:

We define the operation mul_digits(n) as the multiplication of all decimal digits of n.

The multiplicative persistance of a natural number n in base 10, m.p.(n), is:

- 0 when n<=9 (n being 1 base 10 digits)
- m.p.(mul_digits(n)) in other case.

Some examples:

- 10 has m.p. 1. (1*0=0)
- 1378 has m.p. 4. (1*3*7*8=168, 1*6*8=48, 4*8=32, 3*2=6)
- 37 has m.p. 2. (3*7=21, 2*1=2)

Well, search for the biggest number of m.p. 3 (do not confuss with mpeg 1 layer 3 format).

*Note: you will probably need a computer to do it.
added on the 2006-11-30 07:16:46 by texel texel
Sorry Anes. Maybe I didn't wrote correctly the problem. You can ask two questions, every one to only one of they guys you choose.
added on the 2006-11-30 07:18:00 by texel texel
I forgot something important in the m.p. problem. The number can not contain 1 digits. (else the problem is stupid)
added on the 2006-11-30 07:34:08 by texel texel
I mean "can not contain any digit being 1"
added on the 2006-11-30 07:34:55 by texel texel
Texel: You point to one door and ask one of the guys "is this the right door if and only if you are telling the truth now?". If he says yes, you're pointing to the right door.

You don't need the second question.
added on the 2006-11-30 09:34:43 by doomdoom doomdoom
Doom, maybe it works for the guy who always tell the truth and not sure but maybe also for the guy who also always lie, but what about if you are asking to the guy who answer arbitrariously? With that question (or more, with any question), you may get yes or not without any reason... just arbitrariously
added on the 2006-11-30 09:42:04 by texel texel
You said he tells the truth or lies arbitrarily. That's not the same as saying yes or no arbitrarily.

But anyway, "Is this the right door if and only if you are answering this question truthfully?" or some similar stupid wording, in case he only decides at the very last second.

The point of using iff is that the correct answer to the combined question is yes if "is this the door" and "are you telling the truth" are both either true or false.

So:

- If it's the right door and the guy is telling the truth then the correct answer is yes and he'll say yes.
- If it's the wrong door and the guy is telling the truth then the correct answer is no and he'll say no.
- If it's the right door and the guy is lying then the correct answer is no, so he'll say yes.
- If it's the wrong door and the guy is lying then the correct answer is yes, so he'll say no.

You won't know if he's lying about the whole question, but you'll find the right door.

Of course, hard to know if they'll understand the question, but you have to assume they do, right? First time I heard this puzzle they were three gods, not guys, probably for that reason, and you had to identify all of them, not just pick a door. Also they replied with yes/no, but in a language you didn't understand. But then you had three questions. And yeah, you had to ask some fucked up questions. But that's how these things go.
added on the 2006-11-30 10:07:30 by doomdoom doomdoom
so isn't the arbitrary guy allowed to give paradoxial answers? don't be so harsh to him.
Alternatively, using two questions, you could ask no. 1, "would you say this is the door if you were the guy who lies arbitrarily?"

If he says yes or no, he's the guy who lies arbitrarily and you ask no. 2 "would no. 3 say that this is the right door?" same as in The Labyrinth. A reply of "Yes" will mean you're pointing to the wrong door.

If he's not the guy who lies arbitrarily, he won't be able to answer, so you ask him again, "is this the right door if and only if you are the guy who always tells the truth?". "Yes" will mean you've got the right door.

But really one question should be enough.
added on the 2006-11-30 10:27:56 by doomdoom doomdoom
The alternative solution also works if the arbitrary guy just arbitrarily says yes or no.
added on the 2006-11-30 10:34:15 by doomdoom doomdoom
Quote:
you ask no. 2 "would no. 3 say that this is the right door?"

they don't know which guys other two are. but yes, they could learn after the first question anyway.
and isn't "a -> b" true if a is false?
texel: Is there a larger one than 222222?
added on the 2006-11-30 11:15:41 by Adok Adok
How should I read "a -> b"? A implies B? iff has nothing to do with cause or implication. It simply states that the truth value of both operands is equal, as in "A iff B" = NOT (A XOR B). The opposite would be "except if", i guess.
added on the 2006-11-30 11:30:07 by doomdoom doomdoom
Adok: 999 999 -> 531 441 -> 240 -> 0

For example.
added on the 2006-11-30 11:41:29 by doomdoom doomdoom
It would be a piece of cake to write a program that, for a given number n, returns the largest number with n digits that has a certain m.p. The problem is just to prove that such a number is the largest one of all.

But I guess that if there's a number n such that f(n) exists and f(n+1) doesn't, then f(n) is the number we're searching for. (Just a guess, not proven...)
added on the 2006-11-30 11:57:11 by Adok Adok
ok Doom. The fucking guy say yes or no without ANY reasoning, or logic, and without even listening to your question. Just ARBITRARY he answer, so he picks yes or no whatever he wants. Ok?
added on the 2006-11-30 11:58:52 by texel texel
no Adok. Well Adok, it is a piece of cake you say... then I don't ask you for a demostration then, just for the number... let see how good are you coding :D
added on the 2006-11-30 12:00:23 by texel texel
Pseudocode:
Code:check_n(n, mp) { optimum result = 0; for all numbers with n digits, starting with the smallest one { compute mp of this number; // this can be done using a recursive function if the mp is the one we want, then overwrite the optimum result with the current number; } return optimum result; } main { i = 6; // we know that there is a solution with 6 digits so... while(check_n(i, 3)) { i++; } check_n(i - 1,3) is the solution; }
What's the problem?
added on the 2006-11-30 12:18:05 by Adok Adok
Texel: If he says yes or no completely at random, then the solution is the second one i posted:

Ask no. 1, "would you say this is the door if you were the guy who says yes or no at random?"

If he says either yes or no, he's the arbitrary guy. So you're left with one who always lies and one who always tells the truth, and then it's easy.

If no. 1 is not the arbitrary guy, there is no way to answer the first question. Both the truthful guy and the lying guy would have to know the answer in order to give it either truthfully or falsely, and we've just determined that arbitrary guy doesn't even know the answer himself.

So if you don't get an answer to your first question, no. 1 is either truthful guy or lying bastard, and both would answer "yes" to the question "is this the right door if and only if you are the guy who always tells the truth?" if and only if you were indicating the right door.
added on the 2006-11-30 12:48:15 by doomdoom doomdoom
You can ask any question, really, like "I am thinking of a number - is it 5?". If Truth Guy and/or False Guy can read your mind, or if they'll just guess in case you ask a question they can't answer, then I think it's worth mentioning in the puzzle :P
added on the 2006-11-30 12:54:28 by doomdoom doomdoom
doom "a->b" is "b if a". any of them can answer any if'ed question. you have to ask only "yes-no" questions anyway.
Or, you could ask a question like "Is why to when for eight unless never to catch it with bacon?". Two of the guys will look puzzled, but the third isn't paying attention.
added on the 2006-11-30 13:05:43 by doomdoom doomdoom
kb: indeed, I think the only way to have a well behaved orientation in 3D is by keeping two vectors (u,w) for the description of the orientation, not only one.

Actually, I believe the niceset solution is to use not (u,w) but (u,v), both in a plane perpendicular to the orientation vector w. And this sounds much like those "bivector" of geometric algebra to me... (the new buzzword of 3D programmers?).
added on the 2006-11-30 13:11:12 by iq iq
Adok, the number is a bit big. This is just an example: Suppose you get the conclusion that 42 is the number of digits of that number. Then you have to search for the biggest 42 digits number with mp3, isn't it? It will be slow even if you have passed the first 10^41 number fast using your method. And well... the number we are searching for is a bit bigger than 42 digits...
added on the 2006-11-30 13:20:52 by texel texel

login