Author Topic: Logic Puzzles  (Read 75476 times)

0 Members and 1 Guest are viewing this topic.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
Re: Logic Puzzles
« Reply #150 on: March 04, 2013, 09:08:02 AM »
Nice puzzle, and a curious bit of psychology :)

Quote from: spoiler just in case this spoils it
Make it a serious crime to serve circles to red cards and ask again (:

The social setting is quite strong here, because of the legal implications. So while it is a question of logic, people will simply memorise each case in the bar situation for fear of the consequences. The cards are unimportant, unless you actually have the job in (1) and could get fired for screwing up. So while logically-minded people like us on LF will (should?) get this, sadly most people either can't apply the logic or just don't care enough to think it through.

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Logic Puzzles
« Reply #151 on: April 13, 2013, 05:37:41 AM »
Question that came up recently on Skype:

I flip a coin 100 times. All 100 times, the coin comes up heads. On the 101st flip, is the probability of heads coming up:

1) more than 50%
2) exactly 50%
3) less than 50%

Lemmings forum you people are very good at problems like this, make me proud  :thumbsup:
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Logic Puzzles
« Reply #152 on: April 13, 2013, 07:08:14 AM »
Technically you never said anything about the coin being fair.  Therefore as a betting man, given the information as provided here, I'd argue it is more likely than not that your coin is crocked and thus the 101st flip is more likely than not to also come up heads. ;P

Yes, I know what the "real" answer is, but don't say you didn't see this coming. ;p

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Logic Puzzles
« Reply #153 on: April 13, 2013, 07:29:42 AM »
Quote from: spoiler just in case this spoils it
Yep, exactly correct. One of those things that bothers me way too much as a statistician is the perfect of the populous who picks 3) because "tails is due OBVIOUSLY DUUUUH"  :(
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline GuyPerfect

  • Posts: 363
    • View Profile
Re: Logic Puzzles
« Reply #154 on: April 13, 2013, 01:54:13 PM »
Along those statistics lines...

The game Earthbound (aka Mother 2) has a few rare items that have a 1/128 chance to drop after defeating particular enemies. Heck, it has some common items that are also that likely to drop from certain enemies. But the most notorious of these items is the Sword of Kings, the only weapon Poo can equip that won't lower his stats.

The Sword of Kings can be found only by defeating an enemy called Starman Super, and at a 1/128 rate at that. Starman Super only appears in one dungeon in the game, and they're gone forever after you complete that dungeon. So, unsurprisingly, people spend a lot of time in that dungeon to get that sword.

Last time I played the game, I counted how many Starman Supers I defeated. I went through exactly 256 of them and did NOT get my Sword of Kings. What is the likelihood, as a percentage, of that happening?

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Logic Puzzles
« Reply #155 on: April 13, 2013, 06:45:59 PM »
The number of Starman Supers required to get the Sword of Kings is geometrically distributed with P(X >= x) = 1 - (1-p)^x. given p = 1/128, the odds of requiring 256 or more Starman Supers is 13.43% or so. Geometric drop rates have no memory and can be very cruel sometimes  :'(
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline GuyPerfect

  • Posts: 363
    • View Profile
Re: Logic Puzzles
« Reply #156 on: April 13, 2013, 08:24:27 PM »
Okay, Mr. Mathy Pants. (-:

Let's say that I wanted to have a less than 1% chance of leaving that dungeon empty-handed. How many Starman Supers would that take?

Offline Proxima

  • Posts: 4562
    • View Profile
Re: Logic Puzzles
« Reply #157 on: April 13, 2013, 09:10:54 PM »
The chance of not getting the sword after n attempts is (127/128)^n.

This equals .01 when n = ln .01 / ln (127/128) = 587.156. Since you can only try an integer number of times, take the next higher integer, 588.

Offline GuyPerfect

  • Posts: 363
    • View Profile
Re: Logic Puzzles
« Reply #158 on: April 15, 2013, 02:42:11 PM »
Another correct answer! In case you're wondering why I'm using math questions, it's because there are many real-world situations that you'll need to know how to solve. Often times, this means math. It doesn't matter how clever you may be; sometimes the only way to know something is to calculate it.

Here's one I came up with last night, and this one I don't already know the answer to, so surprise me!

I'm currently working on hacking the GBA Pokémon games and a brief statistical curiosity comes to mind. Within the data structure for individual Pokémon is an encrypted 48-byte section comprised of four 12-byte chunks. The order of the chunks is determined by examining another value in the data structure, which is entirely random.

Let's call the four data chunks A, B, C and D. They can appear in any order, such as ABCD, ABDC, ACBD, ACDB, ADBC, etc. There are 24 such combinations. The order is determined by taking that randomly-generated field from elsewhere in the data structure, and taking the remainder of its division by 24. Or "modulus 24", despite that actually being the wrong word for the operation. (-: Since the value that determines the chunk order is entirely random and generated when a Pokémon is encountered in the wild, there's effectively a 1/24 chance of a Pokémon having any particular chunk order. (This isn't entirely true, because the randomized value is 32 bits and 4294967296 doesn't divide evenly by 24, but let's just pretend that it does)

As part of my practical testing, I'm going to go into the game and keep catching Pokémon until I have at least one with every one of those 24 chunk orderings. The problem in its simplest form is that I have a 1-in-X chance of getting something, and I want to get X of them. Pretending I could start out with 0 Pokémon and begin catching from there, about how many would I have to encounter to get all 24 orders? Let's use a 99% likelihood as the target.

Offline Proxima

  • Posts: 4562
    • View Profile
Re: Logic Puzzles
« Reply #159 on: April 15, 2013, 04:59:10 PM »
That's a tough one. For each individual order, the chance of not catching it in n attempts is (23/24)^n, so as a first approximation, the chance of catching all 24 is 1 - 24 x (23/24)^n. But then you've double-counted all the scenarios in which you miss out on two orders, but if you subtract those, you're triple-counting all the scenarios in which you miss out on three orders, and so on.

I don't know of a simple way to calculate the exact answer, so I'll be lazy and use the first approximation.

1 - 24 x (23/24)^ n = .01 =>

n = ln .0004 / ln (23/24) = 183.837

Let's check the accuracy of this approximation. Let n = 183, then:

24 x (23/24)^183 = 0.00994828
24C2 x (22/24)^183 = 0.00003354
24C3 x (21/24)^183 = 0.00000005

The terms become small very quickly, so it looks like the total will still be under 0.01.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Logic Puzzles
« Reply #160 on: July 16, 2013, 11:43:19 AM »
I haven't done the following myself yet. I don't know how difficult this is, but it looks harder than the previous triplet-freeness problem.

Thue-Morse Sequence

Construct a sequence (an) for n natural, an taking values only in the two distinct symbols A and B, in the following way. Begin with a0 = A. Repeat the following forever: Take the already constructed initial word, duplicate it, and append that to the end of itself. Flip all values of the inserted block, i.e., all A become B, all B become A.

The construction process thus starts with A, AB, ABBA, ABBABAAB, ABBABAABBAABABBA, ...

Prove that the entire sequence (an) is triplet-free. A triplet is a substring anywhere in the sequence together with two repetitions of itself immediately following it. So, ABABAB is a triplet, but BBAB is not.

-- Simon
« Last Edit: June 09, 2021, 05:28:48 AM by Simon »

Offline chaos_defrost

  • Posts: 908
  • the artist formerly known as Insane Steve
    • View Profile
Re: Logic Puzzles
« Reply #161 on: August 18, 2014, 03:13:28 AM »
bump for a simplish but kind of interesting maths puzzle

I am thinking of an integer > 10, which I will call x.

Let a be the conversion of x expressed as a number in base 10 to hexadecimal.
Let b be the conversion of x expressed as a number in hexadecimal back to base 10.

x is the geometric mean of a (expressed as a string of digits in base 10) and b.

Solve for x. There should be 2 solutions (thanks, Simon!).

To clarify, if, for example, you thought x = 24:

a = the representation of 24 in base 16, which is 0x18 (or 18).
b = the representation of 24, as a number in base 16, as a number in base 10, which is 36.

We want x to equal the geometric mean of 18 and 36, both expressed in base 10. Since 24 is not the geometric mean of 18 and 36, this is not the answer.

EDIT: @Simon's last puzzle, this is definitely not a rigorous solution but strikes me as the major block here:

The conjecture is true iff every step ends with a string of two different letters. The string starts with AB, so no appending will add two of the same letter to the end of the previous block. The string appended will always end with the pattern AB, BA, AB, BA, AB, BA, etc. satisfying the first statement.

Rigor can bite me  :P
"こんなげーむにまじになっちゃってどうするの"

~"Beat" Takeshi Kitano

Offline mobius

  • Posts: 2747
  • relax.
    • View Profile
Re: Logic Puzzles
« Reply #162 on: September 13, 2014, 04:23:46 PM »
Here's a quick one I found in my local newspaper:

which of the following does not belong?

a - large green square
b - large red circle
c - large green circle
d - small green circle
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Logic Puzzles
« Reply #163 on: September 13, 2014, 04:50:33 PM »
I guess c (large green circle), for it shares each property with another item, unlike the other items.

This of course has no logical solution and we can only guess what the problem author wants.

-- Simon

Offline mobius

  • Posts: 2747
  • relax.
    • View Profile
Re: Logic Puzzles
« Reply #164 on: September 13, 2014, 04:56:55 PM »
correct!

You don't consider this a logical puzzle? Strictly speaking; C  can only be correct as all the others 'do belong' since they share things. But I guess it's more of a lateral puzzle
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain