## Search found 143 matches

- Mon Jan 26, 2009 5:38 am UTC
- Forum: Coding
- Topic: Haskell - "Parse error on input"
- Replies:
**15** - Views:
**13513**

### Re: Haskell - "Parse error on input"

I'm guessing the second 'empty' was indented, making it think you wanted something with type "Digraph v e empty".

- Mon Jan 26, 2009 4:24 am UTC
- Forum: Coding
- Topic: Haskell - "Parse error on input"
- Replies:
**15** - Views:
**13513**

### Re: Haskell - "Parse error on input"

You have to pass || as (||) for parameters. There's also a standard function for what you are trying to do. Made some changes: -- A module for creating and handling directed graphs module Digraph where --my 2 cents: export all by default unless you ready need to import Data.List type AdjList = [(Ver...

- Mon Jan 26, 2009 3:52 am UTC
- Forum: Coding
- Topic: Haskell - "Parse error on input"
- Replies:
**15** - Views:
**13513**

### Re: Haskell - "Parse error on input"

v and e cannot denote types; Types, Constructors and Modules must start with Upper Case.

The code

will give an error because this says 'graph' accepts two type arguments (otherwise put: graph has kind *->*->*).

The code

Code: Select all

`insertVertex v (graph Char Int) =`

will give an error because this says 'graph' accepts two type arguments (otherwise put: graph has kind *->*->*).

- Tue Jan 06, 2009 7:38 pm UTC
- Forum: Coding
- Topic: Coding Resolutions
- Replies:
**57** - Views:
**4530**

### Re: Coding Resolutions

Write a text editor in Haskell. I wouldn't call it a 'resolution' though.

- Thu Dec 18, 2008 5:49 am UTC
- Forum: News & Articles
- Topic: Store refuses to customize cake (Adolf Hitler Campbell)
- Replies:
**112** - Views:
**10395**

### Re: Grocery store refuses to customize kid's cake

They can indeed open up a store and refuse to sell Hanukkah cakes if they want, but they can't refuse to sell cakes to Jews. The difference is that refusing to sell Hanukkah cakes is simply deciding not to carry X-product, while refusing to sell to Jews is discriminating against a person based on a...

- Thu Nov 27, 2008 1:06 am UTC
- Forum: Computer Science
- Topic: Simon's Algorith and Hidden Subgroup Problems
- Replies:
**3** - Views:
**1741**

### Re: Simon's Algorith and Hidden Subgroup Problems

According to the link, that's a graduate level take on group theory. You should be looking at undergraduate level if you haven't had it before. The basics for group theory will only take a couple chapters or so, depending on what you need. The subject is fairly standard, most books are going to be e...

- Fri Nov 21, 2008 8:41 pm UTC
- Forum: Mathematics
- Topic: Are there sets in ZFC that don't belong to any definable set
- Replies:
**30** - Views:
**2271**

### Re: Are there sets in ZFC that don't belong to any definable set

Can you explain why that doesn't work so everyone else can understand this discussion?

- Mon Sep 15, 2008 12:51 pm UTC
- Forum: Computer Science
- Topic: XOR crypting
- Replies:
**22** - Views:
**12697**

### Re: XOR crypting

Yes, it's just a hypothetical to increase my understanding. The point though is that if x is unknown then the situations are identical from an attacker's point of view. i.e. releasing the pair of ciphers q+p1+x q+p2+x is identical to releasing the pair p1+x' p2+x'. And, to compare, the reason we say...

- Sat Sep 13, 2008 10:41 pm UTC
- Forum: Computer Science
- Topic: XOR crypting
- Replies:
**22** - Views:
**12697**

### Re: XOR crypting

Well, if it is really possible to deduce some or all of p1 and p2 from p1+p2 due to plain text being nonrandom and whatnot (which is the claim that using a pad twice is insecure, e.g. having two cipher texts: p1+x and p2+x) then x is necessary. It's there to protect q, since deducing p1 or p2 would ...

- Sat Sep 13, 2008 3:05 am UTC
- Forum: Computer Science
- Topic: XOR crypting
- Replies:
**22** - Views:
**12697**

### Re: XOR crypting

So should you reject pads where the first half of the pad is nearly the same as the second half? Using such a pad is like using the same pad twice. What happens when I have two fake plain texts p1 and p2, one real plain text q, and one pad x. Using + for XOR, suppose I create two cipher texts: q+p1+...

- Sat Aug 23, 2008 4:31 am UTC
- Forum: Computer Science
- Topic: Crypto Key Weakness, Philosophical/Psychological Weirdness
- Replies:
**22** - Views:
**3688**

### Re: Crypto Key Weakness, Philosophical/Psychological Weirdness

Doh, you are right, the information is very different after you switch. I was also wrong about switching at N/2! If you've had your current key for less than N/2 turns then picking a new key is less likely to give you a 'safe' key than an 'unsafe' key. There's an oversight here. While this is true, ...

- Fri Aug 22, 2008 3:32 am UTC
- Forum: Computer Science
- Topic: Crypto Key Weakness, Philosophical/Psychological Weirdness
- Replies:
**22** - Views:
**3688**

### Re: Crypto Key Weakness, Philosophical/Psychological Weirdness

To win you have to change your key to a key that has already been attacked. If you've had your current key for less than N/2 turns then picking a new key is less likely to give you a 'safe' key than an 'unsafe' key. Once half the keys have been attacked it is advantageous to switch. But after you sw...

- Fri Aug 22, 2008 3:19 am UTC
- Forum: Computer Science
- Topic: Static Program
- Replies:
**11** - Views:
**2690**

### Re: Static Program

Guess I didn't think simple enough

- Wed Aug 20, 2008 10:59 pm UTC
- Forum: Computer Science
- Topic: Static Program
- Replies:
**11** - Views:
**2690**

### Re: Static Program

I was trying to think of something like this to understand P =? NP. I wanted to come up with a problem and a method of solution and somehow say "this solution is the only way to solve it". However I never could construct an example of a problem - of any complexity - and prove that it had a...

- Tue Aug 19, 2008 9:10 am UTC
- Forum: Computer Science
- Topic: 3d graphics not based on polygons?
- Replies:
**14** - Views:
**3427**

### Re: 3d graphics not based on polygons?

How hard would it be though if you wanted to use non-polygonal surfaces anyway? Could you do something simple in real time?

- Mon Aug 18, 2008 11:15 pm UTC
- Forum: Computer Science
- Topic: 3d graphics not based on polygons?
- Replies:
**14** - Views:
**3427**

### Re: 3d graphics not based on polygons?

Can GPUs rasterize a non-polygonal surface?

- Mon Aug 18, 2008 5:01 am UTC
- Forum: Computer Science
- Topic: 3d graphics not based on polygons?
- Replies:
**14** - Views:
**3427**

### Re: 3d graphics not based on polygons?

Yea, exactly. But aren't those tessellated by polgyons before being rasterized?

- Mon Aug 18, 2008 4:45 am UTC
- Forum: Computer Science
- Topic: 3d graphics not based on polygons?
- Replies:
**14** - Views:
**3427**

### 3d graphics not based on polygons?

Watching my paint program rasterize a cubic curve made me wonder why 3d graphics are always based on polygons. I figured polygons are faster to rasterize than arbitrary surfaces. On the other hand, surfaces can look a whole lot better than polygons. And I bet surfaces would give a unique "look&...

- Sun Jun 01, 2008 3:54 am UTC
- Forum: Mathematics
- Topic: poor e
- Replies:
**40** - Views:
**5176**

### Re: poor e

The appearance of pi in weird places becomes less mystifying when you realize it's mostly because so many definite integrals evaluate to something with pi in them. Connections to area/volume with pi shouldn't be surprising. And of course e^x is likely to appear anytime you have differential equation...

- Wed May 21, 2008 8:17 pm UTC
- Forum: Mathematics
- Topic: squares mod a power of 2
- Replies:
**10** - Views:
**2561**

### Re: squares mod a power of 2

For the odd prime power case I came up with something using the fact that the units of Z / p^kZ form a cyclic group in this case: Assume n is relatively prime to p^k. It is necessary that n is a square mod p. Now suppose n is a square mod p, and write n = t^r where t is a generator of the units of Z...

- Tue May 20, 2008 7:46 pm UTC
- Forum: Mathematics
- Topic: squares mod a power of 2
- Replies:
**10** - Views:
**2561**

### squares mod a power of 2

I'm looking for a good description of when an odd number is a square mod 2^k. Anyone know of one?

- Sun Apr 27, 2008 5:08 am UTC
- Forum: Mathematics
- Topic: Favorite math jokes
- Replies:
**1452** - Views:
**485686**

### Re: Favorite math jokes

But when you say it verbally it sounds better to have the 6,7,8 and 9 appear sequentially.

- Sun Apr 27, 2008 3:36 am UTC
- Forum: Mathematics
- Topic: Test for randomness of a permutation
- Replies:
**15** - Views:
**2263**

### Re: Test for randomness of a permutation

This is for example famously the trick of Rupert Sheldrake to convince you that people can sense whether they're being observed : he gives a sequence of 1/0 (watch/don't) numbers that indeed neatly average .5, but a 0 follows a 1 more than 50% (so "say the opposite of what the last result was&...

- Wed Apr 23, 2008 5:33 am UTC
- Forum: General
- Topic: Do you actually enjoy your job?
- Replies:
**76** - Views:
**7388**

### Re: Do you actually enjoy your job?

I'm not really sure how to answer the poll. I've thought about changing my career path but even though I would be happy in anything related to a technical field (computers, math, science etc.), I couldn't seem to find any jobs that pay above average but don't require you to put in extraordinary amou...

- Fri Apr 18, 2008 4:22 am UTC
- Forum: Individual XKCD Comic Threads
- Topic: 0412: "Startled"
- Replies:
**127** - Views:
**32186**

### Re: "Startled" Discussion

So the reason Black Hat is generally an ass is because he is actually Wile E Coyote? Actually that would explain the sub, and maybe other things.

- Fri Apr 18, 2008 4:10 am UTC
- Forum: Mathematics
- Topic: Modern Algebra Question: Groups, Direct Products, and stuff.
- Replies:
**7** - Views:
**1695**

### Re: Modern Algebra Question: Groups, Direct Products, and stuff.

No, you want to be able to solve every elementary problem with an elementary solution.

- Mon Apr 07, 2008 9:37 pm UTC
- Forum: Mathematics
- Topic: Your favorite paradox
- Replies:
**159** - Views:
**21889**

### Re: Your favorite paradox

Thanks skeptical scientist, that was very clear.

- Sat Apr 05, 2008 8:39 pm UTC
- Forum: Mathematics
- Topic: Your favorite paradox
- Replies:
**159** - Views:
**21889**

### Re: Your favorite paradox

Well it's not easy to say it would be trivial with an arbitrarily large piece of paper. In fact I gather that the opposite is true: allowing any size paper doesn't free you from certain limits on folding. The answer is somewhere in the mathematics, and whenever this feat is referenced the math is ca...

- Sat Apr 05, 2008 4:40 pm UTC
- Forum: Mathematics
- Topic: Your favorite paradox
- Replies:
**159** - Views:
**21889**

### Re: Your favorite paradox

No, it doesn't do it. I don't see any derivations.

- Sat Apr 05, 2008 5:18 am UTC
- Forum: Mathematics
- Topic: Your favorite paradox
- Replies:
**159** - Views:
**21889**

### Re: Your favorite paradox

Why am I the only one who is going to complain that you can't fold paper 40 times? You can only fold it...what...7 times? You can actually reach 11/12 (using paper) as you can see from this page Britney Gallivan has solved the Paper Folding Problem For the single direction folding case the exact li...

- Sun Mar 30, 2008 1:27 am UTC
- Forum: General
- Topic: Google homepage?
- Replies:
**59** - Views:
**4114**

### Re: Google homepage?

Qoppa wrote:Click 'Classic Home' in the top right. Or add stuff. Either way, the search still works.

Classic home is Google's default page.

- Sun Mar 30, 2008 12:15 am UTC
- Forum: General
- Topic: Google homepage?
- Replies:
**59** - Views:
**4114**

### Re: Google homepage?

I actually would still prefer a classic google page even on the days when they only change the logo.

Qoppa wrote:iGoogle

**Spoiler:**

- Sat Mar 29, 2008 11:57 pm UTC
- Forum: General
- Topic: Google homepage?
- Replies:
**59** - Views:
**4114**

### Google homepage?

Google often changes their main page to reflect special days and holidays. Apparently today is a some holiday all about turning my damn homepage pitch black. Is there a way to get a classic google homepage that doesn't change for daily nonsense?

- Sat Mar 29, 2008 12:21 am UTC
- Forum: Mathematics
- Topic: Coincidences
- Replies:
**19** - Views:
**2012**

### Re: Coincidences

There's a quote by mark twain that I really want to say here, right now. It's about coincidences, noticing the hits, not noticing the misses, etc. But I have no clue what it is and quote sites are letting me down. (btw, I'm pre-emptively ninjaing anyone who finds it! But I'll do it with a quote and...

- Sat Mar 15, 2008 6:26 am UTC
- Forum: Mathematics
- Topic: Calculus class door poster
- Replies:
**3** - Views:
**1336**

### Re: Calculus class door poster

If I were doing a poster I would try to convey something mathematical, like a picture of a circle approximated by a polygon. I don't really care for those boring images they put in calculus books showing rockets tacking off and such.

- Wed Mar 05, 2008 3:37 am UTC
- Forum: Mathematics
- Topic: Instead of counting sheep at night, I invent math problems.
- Replies:
**14** - Views:
**1834**

### Re: Instead of counting sheep at night, I invent math problems.

For question 1, let us say a point X is satisfiable if there exists an angle T so that (X, T) has the constant-population-under-rotation property. Clearly, it is possible for there not to exist any satisfiable points and it is possible for there to exist exactly one satisfiable point. What about mul...

- Sat Mar 01, 2008 4:10 am UTC
- Forum: Mathematics
- Topic: An Elegant solution to Integration?
- Replies:
**15** - Views:
**2405**

### Re: An Elegant solution to Integration?

(ninja'd) No. There is the definition of an integral as a limit of partial sums, but it won't give you an answer without a limit often. However, when restricting oneself to just integration problems that you will be asked to do in calculus it is quite feasible to write up a simple finite set of ...

- Sat Mar 01, 2008 4:01 am UTC
- Forum: Mathematics
- Topic: fun with equations with exponents
- Replies:
**9** - Views:
**1705**

### Re: fun with equations with exponents

This type of problem is generally very difficult... However, I can tell you that there are exactly two real solutions. I know this because: 1. 16 n is a convex function. 2. Any line intersects the graph of a convex function either 0, 1, 2, or an infinite number of times. 3. Since n = 5/4 is a solut...

- Sat Mar 01, 2008 3:49 am UTC
- Forum: Science
- Topic: A question on the speed of light
- Replies:
**42** - Views:
**4675**

### Re: A question on the speed of light

I think we should be more careful talking about hypothetical objects moving faster than the speed of light. Mathematically the equations say they move backwards in time but if we do not know of any such particles would it really contradict any observations if they did not? On a completely unrelated ...

- Sat Mar 01, 2008 3:24 am UTC
- Forum: Science
- Topic: Cheese Science
- Replies:
**7** - Views:
**1465**

### Re: Cheese Science

How is it that other harmful bacteria don't ruin the cheese?

Edited.

Edited.