## Archive for xkcd

## compression artifacts

Posted in Books, Kids, Travel with tags because it's Friday, comics, solar system, space, space exploration, video compresion, Voyager, xkcd on January 22, 2021 by xi'an## “a rare blend of monster raving egomania and utter batshit insanity”

Posted in Books, pictures, University life with tags Bill Gates, book exchange, book review, Carnegie Mellon University, cellular automata, Cosma Shalizi, game of life, john Conway, Mathematica, Mathematical Reviews, Pittsburgh, Stephen Wolfram, xkcd on November 12, 2020 by xi'an

“I don’t object to speculation or radical proposals, even to radical, grandiose speculative proposals; I just want there to be arguments to back them up, reasons to take them seriously. I don’t object to scientists displaying personality in their work, or staking out positions in vigorous opposition to much of the opinion in their field, and engaging in heated debate; I do object to ignoring criticism and claiming credit for commonplaces, especially before popular audiences who won’t pick up on it.”

**A** recent post by Andrew on Stephen Wolfram’s (mega) egomania led to a much older post by Cosma Shalizi reviewing the perfectly insane 5.57 pounds of a New Kind of Science. An exhilarating review, trashing the pretentious self-celebration of a void paradigm shift advanced by Wolfram and its abyssal lack of academic rigour, showing anew that a book recommended by Bill Gates is not necessarily a great book. (Note that A New Kind of Science is available for free on-line.)

*“Let me try to sum up. On the one hand, we have a large number of true but commonplace ideas, especially about how simple rules can lead to complex outcomes, and about the virtues of toy models. On the other hand, we have a large mass of dubious speculations (many of them also unoriginal). We have, finally, a single new result of mathematical importance, which is not actually the author’s. Everything is presented as the inspired fruit of a lonely genius, delivering startling insights in isolation from a blinkered and philistine scientific community.”*

When I bought this monstrous book (eons before I started the ‘Og!), I did not get much further into it than the first series of cellular automata screen copies that fill page after page. And quickly if carefully dropped it by my office door in the corridor. Where it stayed for a few days until one of my colleagues most politely asked me if he could borrow it. (This happens all the time: once I have read or given up on a book I do not imagine reopening again, I put it in the coffee room or, for the least recommended books, on the floor by my door and almost invariably whoever is interested will first ask me for permission. Which is very considerate and leads to pleasant discussions on the said books. Only recently did the library set shelves outside its doors for dropping books free for the taking, but even there I sometimes get colleagues wondering [rightly] if I was the one abandoning there a particular book.)

*“I am going to keep my copy of A New Kind of Science, sitting on the same shelf as Atlantis in Wisconsin, The Cosmic Forces of Mu, Of Grammatology, and the people who think the golden ratio explains the universe.” *

In case the review is not enough to lighten up your day, in these gloomy times, there is a wide collection of them from the 2000’s, although most of the links have turned obsolete. (The Maths Reviews review has not.) As presumably this very post about a eighteen-years-old non-event…

## probability comparisons

Posted in Books, Kids, pictures, Statistics with tags calibration, comics, frequentism, scaling, xkcd on November 6, 2020 by xi'an## Fermat’s Riddle

Posted in Books, Kids, R with tags Fermat's theorem, int2bits, optimisation, prime factor decomposition, R, R package, riddle, small margin, The Riddler, tio.run, xkcd on October 16, 2020 by xi'an**·A** Fermat-like riddle from the Riddler (with enough room to code on the margin)

An arbitrary positive integer N is to be written as a difference of two distinct positive integers. What are the impossible cases and else can you provide a list of all distinct representations?

Since the problem amounts to finding a>b>0 such that

both *(a+b)* and *(a-b)* are products of some of the prime factors in the decomposition of *N* and both terms must have the same parity for the average *a* to be an integer. This eliminates decompositions with a single prime factor 2 (and N=1). For other cases, the following R code (which I could not deposit on tio.run because of the packages R.utils!) returns a list

library(R.utils) library(numbers) bitz<-function(i,m) #int2bits c(rev(as.binary(i)),rep(0,m))[1:m] ridl=function(n){ a=primeFactors(n) if((n==1)|(sum(a==2)==1)){ print("impossible")}else{ m=length(a);g=NULL for(i in 1:2^m){ b=bitz(i,m) if(((d<-prod(a[!!b]))%%2==(e<-prod(a[!b]))%%2)&(d<e)) g=rbind(g,c(k<-(e+d)/2,l<-(e-d)/2))} return(g[!duplicated(g[,1]-g[,2]),])}}

For instance,

> ridl(1456) [,1] [,2] [1,] 365 363 [2,] 184 180 [3,] 95 87 [4,] 59 45 [5,] 40 12 [6,] 41 15

Checking for the most prolific N, up to 10⁶, I found that N=6720=2⁶·3·5·7 produces 20 different decompositions. And that N=887,040=2⁸·3²·5·7·11 leads to 84 distinct differences of squares.

## babbage in, babbage out?!

Posted in Books, Kids, Statistics with tags Charles Babbage, computer science, difference engine, garbage in garbage out, statistical inference, wikipedia, xkcd on May 25, 2020 by xi'an**W**hen checking for the origin of “garbage in, garbage out” on Wikipedia, I came upon this citation from Charles Babbage:

“On two occasions I have been asked, “Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?” … I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.”

following earlier quotes from him on this ‘Og.