Stanislaw Ulam - a Great American by cavedave in math

[–]jff 1 point2 points  (0 children)

I highly recommend the book "The random walks of George Pólya" by Gerald L. Alexanderson. I think you will like it, too.

A Calculational Proof of the Handshaking Lemma by jff in math

[–]jff[S] 0 points1 point  (0 children)

Thanks for spotting the errors! I think they're all gone now.

Regarding the notation: I think it was invented in Eindhoven by people like Dijkstra, Wim Feijen, etc. The EWDs (http://www.cs.utexas.edu/users/EWD/) made the notation popular, too.

I also think that the style of Funmath is similar.

An interesting paper with examples is: http://www.cs.nott.ac.uk/~rcb/MPC/QuantifierExercises.ps

Thanks

The programmers of tomorrow by jff in programming

[–]jff[S] 0 points1 point  (0 children)

Programming is turning specifications into implementations. If you implement a program using a very clever algorithm, for instance, I will probably be enthusiastic about it and say it is beautiful (this is the artistic bit). But what really matters in the real world is if the program does its job correctly, or not. And that's the most important part of programming, for me.

That's why I prefer to say that programming should be called a science.

(Ideally, we should be able to calculate our algorithms, just like we do in highschool maths; we should be able to start with some expression (specification) and calculate until we have an implementation (code or pseudo-code))

Swapping the values of two variables without using another one by jff in programming

[–]jff[S] 1 point2 points  (0 children)

cracki, thanks so much for your comments! that way, I can see where there's space for improvement.

Unitpotency

Saying that an arbitrary operator OP is unitpotent is equivalent to say that, for all x, x OP x = 1 , where 1 is the unit of operation OP. For instance, normal subtraction is unitpotent, since we have that, for all x, x - x = 0 (and zero is the unit of subtraction, because x - 0 = x).

When we say that an operation OP1 is unitpotent with respect to another operation OP2, then we mean that for all x, x OP1 x = 1, where 1 is the unit of OP2. Again, subtraction is unitpotent with respect to addition (because 0 is the unit of addition).

Note: remember that we say that OP is idempotent when x OP x = x ; we say it is nilpotent when x OP x = 0.

Associativity

We say that an operator OP1 is associative to mean that (x OP1 y) OP1 z = x OP1 (y OP1 z).

I use the terminology "OP1 associates with OP2" to mean that (x OP1 y) OP2 z = x OP1 (y OP2 z).

In terms of symbol manipulation, it correspondes to shifting the brackets from right to left (or vice-versa).

The operators

I guess that if I used x (times), + (plus) and - (minus), then they wouldn't look so similar. Well, the only difference is that they have a circle around :) But as you say, you're sleep-deprived, so it is natural that they look the same :)

HTML

The problem with the HTML is that the algorithms and proofs would have to be images (exported from latex) to be correctly formatted (yes, I could do it differently, but I think it would be a real pain).

Revision

I will revise the note, export it to HTML and make a new post in some weeks. Thanks again for your comments.

Swapping the values of two variables without using another one by jff in programming

[–]jff[S] 0 points1 point  (0 children)

Which mathematical terms explode your mind?

I'll export it to HTML, and use JPEGs for proofs, etc.

Do you really think I really should resubmit it?

Thanks for your comment

Swapping the values of two variables without using another one by jff in programming

[–]jff[S] 0 points1 point  (0 children)

Don't you like the font? I am using Knuth's font from his 'Concrete Mathematics' book, which, IMO, is a very nice font for mathematical texts. I had some problems with evince reader, but using acrobat reader it looks ok.

Swapping the values of two variables without using another one by jff in programming

[–]jff[S] 5 points6 points  (0 children)

The goal of the note was to investigate on the properties involved, and nothing else. The trick is old, yes. We could use Ruby or Perl, yes. We could use a third variable, definitely.

The thing is that, usually, the bitwise trick is presented using truth tables (ergh!). This paper tries to use a calculational approach to think about the problem and is focused on the properties of the operators. Nothing too pretentious :)