## Search found 206 matches

- Fri Jul 04, 2014 12:59 am UTC
- Forum: Coding
- Topic: Python puzzles
- Replies:
**20** - Views:
**5320**

### Re: Python puzzles

Is the code given exactly what's allowed? For instance, there's no indentation missing (and so the code is all at the top level)? I'm having trouble seeing how you could do the first one in pure Python, without screwing with the output itself. Yes. The code given is exactly what's allowed, and ther...

- Thu Jul 03, 2014 8:12 pm UTC
- Forum: Coding
- Topic: Python puzzles
- Replies:
**20** - Views:
**5320**

### Re: Python puzzles

My solution doesn't redefine 0 or 1... but if you can do that and make Python print the 0 before crashing, more power to you! Multiple solutions are welcome.

Volcano99 got my intended solution for the second puzzle.

Volcano99 got my intended solution for the second puzzle.

- Thu Jul 03, 2014 6:44 pm UTC
- Forum: Coding
- Topic: Python puzzles
- Replies:
**20** - Views:
**5320**

### Python puzzles

Is this possible in Python? (Assume version 2.7.) (type whatever code you want here) x = 1 print x # this line prints 0 Redefining print isn't allowed. (And I don't know if that's even possible.) Anything else is fair game. How about this? (type whatever code you want here) def f(x): return f(x) pri...

- Thu Jul 03, 2014 5:40 pm UTC
- Forum: Logic Puzzles
- Topic: Lottery Ticket ................
- Replies:
**12** - Views:
**5608**

### Re: Lottery Ticket ................

Not an answer, but deserves a spoiler anyway: This is an open problem. It's called, appropriately enough, the "lotto design" problem. You can google "L(49,6,6,3)" for more info. With that out of the way, maybe the most fun way to handle this thread is for people to fi...

- Wed Jul 02, 2014 12:23 am UTC
- Forum: Coding
- Topic: What prose do you write with your code?
- Replies:
**22** - Views:
**9180**

### Re: What prose do you write with your code?

When I'm working on a large project, I put TODO lists in the home directory and in incomplete code files. Besides comments, that's about it.

- Thu Jun 05, 2014 8:56 pm UTC
- Forum: Logic Puzzles
- Topic: Meta-Puzzles
- Replies:
**6** - Views:
**4032**

### Re: Meta-Puzzles

Nitrodon wrote:Left puzzle: top right 0 with bottom left either 1 or 3 gives a unique solution, so the meta-puzzle solution is not unique.

Rats. And I checked that case specifically, too. Oh well. At least your solution to the second puzzle is the intended one.

- Thu Jun 05, 2014 6:57 pm UTC
- Forum: Logic Puzzles
- Topic: Meta-Puzzles
- Replies:
**6** - Views:
**4032**

### Re: Meta-Puzzles

I just tried making one of these, for Slitherlink. It's hard . Designing a meta-Slitherlink is like solving a meta-meta-Slitherlink. Here are two tiny puzzles as proof of concept. metaslitherlink.png (Slitherlink rules here ) EDIT: As Nitrodon points out, the first puzzle has two solutions &...

- Sat May 31, 2014 3:07 pm UTC
- Forum: Logic Puzzles
- Topic: The Blindfolded Poem and the Left Arrow Key
- Replies:
**14** - Views:
**6750**

### Re: The Blindfolded Poem and the Left Arrow Key

A hint to how much jedelmania got right. jedelmania got "My mother told me" and, on the next line, "A young" correct. If you get a few more words, and you're frustrated with the puzzle, you could probably Google the poem at that point. It is an existing poem; I didn't wri...

- Fri May 16, 2014 3:44 pm UTC
- Forum: Logic Puzzles
- Topic: The Blindfolded Poem and the Left Arrow Key
- Replies:
**14** - Views:
**6750**

### Re: The Blindfolded Poem and the Left Arrow Key

It's not a true story. In real life, my friend pressed the "g" key while my eyes were closed. So, it was pretty easy to figure out the original text. Later, I thought up the left arrow key idea, and decided to make it into this puzzle.

- Mon May 12, 2014 10:22 pm UTC
- Forum: Logic Puzzles
- Topic: The Blindfolded Poem and the Left Arrow Key
- Replies:
**14** - Views:
**6750**

### Re: The Blindfolded Poem and the Left Arrow Key

You can assume that, at every time step, there is an equal chance of either me typing the next character, or my friend typing ←. That's how I generated the mixed-up text. Every one of the Catalan-number many possibilities had an equal chance of being chosen. This information doesn't give you an uppe...

- Fri May 09, 2014 4:20 pm UTC
- Forum: Logic Puzzles
- Topic: The Blindfolded Poem and the Left Arrow Key
- Replies:
**14** - Views:
**6750**

### Re: The Blindfolded Poem and the Left Arrow Key

I'll give you some information about the poem to help you out. The original text contains two verses of the poem. Both verses have eight lines. As usual, lines are separated by one line break, and the two verses are separated by two line breaks. Every line starts with a capital letter. There are no ...

- Thu May 01, 2014 11:19 pm UTC
- Forum: Logic Puzzles
- Topic: The Blindfolded Poem and the Left Arrow Key
- Replies:
**14** - Views:
**6750**

### The Blindfolded Poem and the Left Arrow Key

Today, I bet my friend that I could type perfectly with my eyes closed. My friend didn't believe me, so she blindfolded me. She read aloud part of a poem, and I typed it. I thought I got everything perfect. But when I opened my eyes, I saw this: whfe aga alen.eel ght aowlcul iken eaT paothe sae ne a...

- Fri Apr 18, 2014 3:19 pm UTC
- Forum: Logic Puzzles
- Topic: Decrypt Cyphertext
- Replies:
**1** - Views:
**2055**

### Re: Decrypt Cyphertext

Code puzzles are usually more interesting if you tell us something about the nature of the code. For example, is it like a transposition cipher, with maybe a few special letters/digraphs for things like 'the' and 'double the next letter'? The only interesting thing I can see about the ciphertext is ...

- Sun Mar 16, 2014 1:52 am UTC
- Forum: Logic Puzzles
- Topic: Test-solve my puzzles, please
- Replies:
**174** - Views:
**58863**

### Re: Test-solve my puzzles, please

I think I got it. My break-in was realizing that the 13 had to handle the upper-left corner. After some back-and-forth, that got me the top part of the puzzle. From then on, I basically slogged clockwise around the side. http://imageshack.com/a/img703/369/p0h9.png I'm trying to change my design proc...

- Sat Feb 08, 2014 8:05 pm UTC
- Forum: Mathematics
- Topic: One divided by Zero (1/0)
- Replies:
**44** - Views:
**8031**

### Re: One divided by Zero (1/0)

One nice thing about math is, mathematicians can define things however we want to. If we all wanted to, then we could define x+y to equal 42 if x=y and the normal result of addition otherwise. Nobody defines x+y like that, because it's not useful or interesting at all. Adding ∞ to the real numbers i...

- Fri Jan 31, 2014 4:54 pm UTC
- Forum: Mathematics
- Topic: Need help understanding the usual topology on R
- Replies:
**23** - Views:
**5596**

### Re: Need help understanding the usual topology on R

Farabor, yep! The open sets still have to satisfy these conditions: i) The empty set and the whole space are both open sets. ii) The intersection of finitely many open sets is an open set. iii) The union of any collection of open sets in an open set. For example, you can define a topology on R by sa...

- Mon Dec 30, 2013 10:00 pm UTC
- Forum: Coding
- Topic: iterating through a strange tree structure?
- Replies:
**4** - Views:
**3198**

### Re: iterating through a strange tree structure?

Duplicating nums before you start changing it is the normal way to go, I think.

Hmm, maybe you have a copy/reference bug?

i can duplicate nums, but it seems wherever i do so will change nothing.

Hmm, maybe you have a copy/reference bug?

Code: Select all

`a = [1,2,3]`

b = a

a[0] = 6

print b[0] # prints 6

- Thu Dec 12, 2013 1:41 am UTC
- Forum: Mathematics
- Topic: Making up probabilities when you know the outcome
- Replies:
**5** - Views:
**2568**

### Re: Making up probabilities when you know the outcome

Some analysis: If I'm reading this right, your condition is "If a person hears you say 'the probability is X', then according to them, there's an X chance of success." In other words, P(success | you say X) = X and P(failure | you say X) = 1-X. ==> (cond...

- Tue Dec 10, 2013 5:48 pm UTC
- Forum: Mathematics
- Topic: Putnam 2013
- Replies:
**4** - Views:
**2907**

### Putnam 2013

This year's problems: link.

What do you think of the problems? Have any nice solutions? Have any solution at all for A6?

And if you took it, how'd you do?

I think A2 and A5 are particularly nice. But B2 can die in a fire.

What do you think of the problems? Have any nice solutions? Have any solution at all for A6?

And if you took it, how'd you do?

I think A2 and A5 are particularly nice. But B2 can die in a fire.

- Sun Dec 08, 2013 1:37 am UTC
- Forum: Logic Puzzles
- Topic: Find a set of numbers containing mine
- Replies:
**32** - Views:
**10341**

### Re: Find a set of numbers containing mine

I mean, if you have someone who can lie once, before being forced to tell the truth, and they choose either the number 0 or 1, can you make them reveal which number they chose? No. On odd-numbered questions, Alice answers as if she had 0, and on even-numbered questions, she answers as if she had 1....

- Fri Dec 06, 2013 6:17 pm UTC
- Forum: Logic Puzzles
- Topic: Find a set of numbers containing mine
- Replies:
**32** - Views:
**10341**

### Re: Find a set of numbers containing mine

We are left with the following obvious question: what is the least s such that Bob can find a set of s numbers one of which must be Alice's? Is it 512? Any thoughts? About that. Isn't it obvious from your solutions that it's 2^k where k is the number of consecutive lies Alice is allowed to make? Bo...

- Fri Dec 06, 2013 12:41 am UTC
- Forum: General
- Topic: Rule 34 for conspiracy theories?
- Replies:
**10** - Views:
**14670**

### Re: Rule 34 for conspiracy theories?

Regarding what the OP originally intended, I can't help but think of the funniest short story I've ever read. How many conspiracy theories can one person possibly combine?

- Sun Dec 01, 2013 4:36 am UTC
- Forum: Mathematics
- Topic: P vs NP is independent of the axioms of ZFC
- Replies:
**26** - Views:
**6599**

### Re: P vs NP is independent of the axioms of ZFC

To clarify one point: formally, part of a problem's definition is how the input is encoded. You could define the SUBSET-SUM problem as "Does the list {{insert list of integers, written in base 2, separated by commas}} contain a subset that sums to 0?" But as Xanthir said, usually people le...

- Fri Nov 29, 2013 2:05 pm UTC
- Forum: Mathematics
- Topic: P vs NP is independent of the axioms of ZFC
- Replies:
**26** - Views:
**6599**

### Re: P vs NP is independent of the axioms of ZFC

While anything that can be computed, can be computed by a Turing Machine... this does not mean that the properties of a Turing machine are universal. ... A Turing Machine is an arbitrary architecture and does not represent all possible architectures (as noted above - being able to compute all possi...

- Fri Nov 29, 2013 2:23 am UTC
- Forum: Mathematics
- Topic: P vs NP is independent of the axioms of ZFC
- Replies:
**26** - Views:
**6599**

### Re: P vs NP is independent of the axioms of ZFC

P and NP aren't arbitrary labels. As you say, P has to do with the number of steps in an algorithm needed to solve a question. However, these "steps" are not at all arbitrary. Here's a precise definition of P. P is a subset of functions f:{0,1}* -> {0,1}. A function f:{0,1}* -> {0,1} is in...

- Sat Nov 23, 2013 6:58 pm UTC
- Forum: Movies and TV Shows
- Topic: My Little Pony: Friendship is MAGIC!
- Replies:
**1371** - Views:
**332329**

### Re: My Little Pony: Friendship is MAGIC!

Season 4. YEEEEEEEEEEEEEEEEEEEEEESSSS (Spoiler: episodes 1 & 2) AWESOME. After all the havoc in episode 1, I thought for sure the mane 6 would need at least two deus ex machinas to solve everything. But the ending (1) made sense, (2) developed Twilight's new relationship with...

- Tue Nov 19, 2013 8:15 pm UTC
- Forum: What If?
- Topic: What-If 0072: "Loneliest Human"
- Replies:
**17** - Views:
**8360**

### What-If 0072: "Loneliest Human"

Loneliest Human What is the furthest one human being has ever been from every other living person? Were they lonely? Bryan J. McCarter Surely this one is easier than Randall makes it out to be. Just take the first human being 1 . Then the answers are (1) infinity, and (2) probably not. The astronau...

- Sun Nov 10, 2013 6:00 pm UTC
- Forum: Mathematics
- Topic: Integrating the Gaussian pdf over a half-space
- Replies:
**14** - Views:
**2463**

### Re: Integrating the Gaussian pdf over a half-space

P is probability. The integral of the Gaussian distribution over the space {x: x T w+b>0}, is equal to the probability that when you pick a random x from the Gaussian distribution, it satisfies x T w+b>0. Do you know how to do this problem if all n variables are independent? (Useful fact: the n-dime...

- Tue Oct 29, 2013 1:37 am UTC
- Forum: Individual XKCD Comic Threads
- Topic: 1283: "Headlines"
- Replies:
**58** - Views:
**18406**

### Re: 1283: "Headlines"

For math nerds: One Weird Trick To Annihilate Your Kernel

This is a wonderful joke site. It includes the paper "N-Dimensional Polytope Schemes", a~~generalization of pyramid schemes~~ guaranteed way to double your money. No Banach-Tarski necessary.

This is a wonderful joke site. It includes the paper "N-Dimensional Polytope Schemes", a

- Tue Oct 22, 2013 12:56 am UTC
- Forum: Mathematics
- Topic: Determinant of Non-Square Matrix
- Replies:
**11** - Views:
**7112**

### Re: Determinant of Non-Square Matrix

Look up Cauchy-Binet. You can compute det(A A

^{T}), and if A has all real entries then this is positive iff A has full rank.- Sat Oct 19, 2013 2:05 am UTC
- Forum: Mathematics
- Topic: Can x+3 and x^2+3 both be perfect cubes?
- Replies:
**14** - Views:
**4758**

### Re: Can x+3 and x^2+3 both be perfect cubes?

x 2 +3 is never a cube. Suppose x 2 +3=y 3 . Let w be a cube root of unity. Work in Z[w], the Eisenstein integers. Then y 3 = x 2 + 3 = (x - (2w+1))(x + (2w+1)). gcd(x - (2w+1),x + (2w+1)) is a factor of 4w+2, which is not a multiple of any non...

- Tue Sep 24, 2013 12:57 am UTC
- Forum: Logic Puzzles
- Topic: Sum and Product Game
- Replies:
**37** - Views:
**11820**

### Re: Sum and Product Game

If you know the sum is 10, can you say "I know whether or not one of the numbers is 9" and also "I don't know whether or not one of the numbers is 8"? I think you need tighter restrictions on exactly what you can say.

- Sun Sep 01, 2013 2:59 am UTC
- Forum: Mathematics
- Topic: LaTeX advice?
- Replies:
**37** - Views:
**9581**

### Re: Latec advice?

If you want a what-you-see-is-what-you-get editor, try LyX or TexMacs. I personally find them easier to work with.

- Fri Aug 23, 2013 5:25 pm UTC
- Forum: Logic Puzzles
- Topic: Can you crack this?
- Replies:
**12** - Views:
**7631**

### Re: Can you crack this?

If it's easier, you could give us a plaintext/ciphertext pair. For example, you could tell us what "The quick brown fox jumps over the lazy dog." encodes to.

- Thu Aug 22, 2013 5:30 pm UTC
- Forum: General
- Topic: The End of xkcd -- may it never happen.
- Replies:
**6** - Views:
**3874**

### Re: The End of xkcd -- may it never happen.

The only reason the previous 41 parts are even there is so that we can subvert them all with a gigantic anticlimax!pkcommando wrote:except the ending

Okay, maybe I've been reading too much XKCDSW lately.

I was inspired by this, if you must know.

- Thu Aug 22, 2013 2:14 am UTC
- Forum: General
- Topic: The End of xkcd -- may it never happen.
- Replies:
**6** - Views:
**3874**

### Re: The End of xkcd -- may it never happen.

I hope xkcd never ends. But if it must... Out of nowhere, a multi-part series of strips begins. " Finality ". The Black Hat Guy is trying to take over the whole Internet to use as his personal StrongAI@Home server. The White Hat Guy keeps accidentally throwing a wacky spanner in the works...

- Thu Aug 08, 2013 1:55 am UTC
- Forum: Individual XKCD Comic Threads
- Topic: 1247: "The Mother of All Suspicious Files"
- Replies:
**70** - Views:
**32982**

### Re: 1247: "The Mother of All Suspicious Files"

Nice comic. By the way, here's a link to a cool YouTube video: wmw.7.hothitler.bz/go_viral.swf

**Spoiler:**

- Tue Jul 30, 2013 5:29 pm UTC
- Forum: Logic Puzzles
- Topic: Sandra & Woo crypto challenge
- Replies:
**4** - Views:
**5246**

### Re: Sandra & Woo crypto challenge

Sorry for the double post, but this is unrelated + long. Some commenters under the strip have useful information. First, best of all, a text transcription, adding &=>$# to get all 31 symbols: lehvrn svrnzrn mnsn vzmn: iuoypj $ypjwpj ge#n >ufdwfem ivhn. h=mzr= svrn ibrnzr= uadwpjwke v & >nsvt...

- Tue Jul 30, 2013 4:57 pm UTC
- Forum: Logic Puzzles
- Topic: Sandra & Woo crypto challenge
- Replies:
**4** - Views:
**5246**

### Re: Sandra & Woo crypto challenge

Judging by these guys' previous challenge , this should be fun. I don't believe it's a mathy cipher ala Vigenere, since (1) It's a manuscript that Woo wrote, and (2) There are too many repeated patterns. Rather, I would say this is an actual writing system. Whether it's just a character-by-character...

- Sun Jul 28, 2013 3:00 am UTC
- Forum: Computer Science
- Topic: md5(x) = x [and other properties of md5]
- Replies:
**39** - Views:
**27129**

### Re: md5(x) = x [and other properties of md5]

If you want to find a solution to md5 n (x) = x, the birthday problem tells us that you'd need about N 1/2 queries on average, where N is the size of MD5's range. This is equal to 2 64 =O( :( ). But you can find a solution without using up all that memory, and still taking O(N 1/2 ) time. Use the to...