Reasons Unbeknownst

January 27, 2007

The Rise of the Benevolent Dictators, Davos, and the Federal Reserve

Davos is the annual meeting of the most powerful people in the world. It’s sort of a post-polytheistic Mount Olympus. From Wikipedia:

“According to its supporters, the World Economic Forum is an ideal place for dialogue and debate regarding the major social and economic problems of the planet, since representatives of both the most powerful economic organisations and the most powerful political organisations are present, since intellectuals also participate, and since there is a generally informal atmosphere encouraging wide-ranging debate.”

Interestingly, but probably not surprisingly, the economic consensus seems fairly optimistic.

“Executive Director Stephen Lussier told Reuters in Davos that demand for diamond jewelry around the world was strong over the critical Christmas period and that growth in the United States, where the economy is supposed to be slowing, was around five percent.”

Because the best way to judge the strength of the middle and lower class is diamond sales.

And from the Detroit Free Press:

“Home foreclosure filings surged to record levels across metro Detroit in 2006. In Macomb County, the number of foreclosure filings nearly tripled, from 2,755 in 2005 to 8,192 last year, translating to one home for every 39 in the county.”

“In Oakland County, Michigan’s wealthiest county, the number jumped from 3,754 in 2005 to 7,282, meaning one of every 68 homes. In Wayne County, the number of filings more than doubled, from 18,176 to 40,220, translating to one of every 21 homes.”

“Oakland County’s number translates into an average of more than 100 homes per week going to auction, the largest number county officials ever have seen and more than twice the number in 2004.”

Who are you going to believe? Blood diamond sales representative or the foreclosure numbers?

The question is whether the powerful are also optimistic about the prospects for the poor. I assume yes because if you can’t keep the poor happy then Democracy doesn’t work. So you have two options.

A:> Dictatorship. This would piss off the poor to no end.
B:> Benevolent Dictatorship disguised as a Democracy.

Option A is a non-starter. B on the other hand would be set up to prevent the populace from car-jacking democracy in an attempt to reduce the liberties of others due to religious beliefs or greed. With a growing wealth divide resulting from the exponential growth of technology (job killing ATMs) the problem is going to get worse. Try explaining Austrian Economic theory to the average Joe who just wants a car as nice as his neighbor. It doesn’t work. But 30 year+ mortgages and increasing, job killing productivity growth are mutually exclusive.

So what does the Federal Reserve do then? Money printing sure. But if you know how the timing of inflation works then it appears to be a wealth transfer from the poor to the rich. Regressive taxation to offset our progressive tax bracketry. The rich give a lot more money to the poor than the middle class so if the middle class dies off quicker they don’t mind. The rich are going to do a better job taking care of the poor than the needy middle class or the incompetent government, and that should make everybody happy.

Rifkin’s The end of Work is probably correct, he’s just not taking into account the fact that technology is going to make boredom obsolete.

January 22, 2007

The Terminator, Gravy

Filed under: Random Thoughts — Kirk @

Somehow a conversation about The Terminator broke out in my car. Some friends were discussing what would happen if the Terminator was bound by Asimov’s laws of robotics and was unable to kill a human.

My suggestion was that a more subtle approach would be needed, like encouraging poor eating habits, offering cigarettes, and hiding profalactics from its victims. Or instead of candied apples in caramel it would dunk them in gravy, depending on whether the victim had diabetes or clogged arteries. The digital readout embedded in its robo-eyes would scan bar codes at the supermarket to determine degree of lethality.

January 15, 2007

Digital Rights Management – Devilish Advocacy

Filed under: Culture,Economics,Film,Law,Media,Random Thoughts — Kirk @



Caught in the Act

Originally uploaded by D.James.

From ARS Technica today “In a nutshell: DRM’s sole purpose is to maximize revenues by minimizing your rights so that they can sell them back to you.”

Sounds simple enough right? That sentence’s elegant simplicity had me at nutshell. Evil capitalism vs. the unstoppable force of digital freedom. But I was scratching my receding hair line and marveling that I can fit a prairie vole’s entire DNA sequence on my key chain memory stick and wondered: How would the common assumption about digital freedom be interpreted when applied to cloning? If data wants to be free then what’s wrong with grabbing some hair from your roommate’s brush and surreptitiously overclocking your hair genes in a Rogaine branded centrifuge?

The ARS quote above could easily be applied to Blockbuster’s digital-freedom-robbing habit of making me return 1s and 0s in the form of DVDs through a squeaky aluminum hole in their wall. They’re missing a fundamental point about price and products. They’re assuming that we’re too stupid to demand a lower price in exchange for our freedom. If late fees aren’t DRM I don’t know what is. Are DVD rentals an unethical digital liberty abyss? No. So why the assumption that I will pay for a product suffocated by restrictions? If the product, including DRM, sucks, people will not buy it. Fair use isn’t something that needs to be legislated. If the movie industry pisses us off we’ll buy video games instead. There are so many alternatives today that they cannot simply crush our liberties with a campaign contribution any more.

It’s a bit ridiculous to assume that the industry doesn’t care about piracy when every movie ever made will fit on a keychain sized device in the near future. And piracy will eventually win because at some point living room walls will be smaller than TVs with DPI reaching a level of diminishing returns. And the keychains will just catch up. We’re at the point with 8Gig flash drives that you’ll be able to decrypt and carry a two hour DVD around for less than $50 by the end of this year.

Now the industry has historically been pretty stupid. The attempted outlaw of VCRs springs to mind. But digital is entirely different as anyone who has watched a 14th generation VHS dupe of some leaked celebrity home movie can tell you. With home theaters rivaling movie theaters in terms of sound and visual quality the opportunity to generate cash to pay for Beowulf render farms which in turn bring Ring Lords to life are dying a exponentially un-slow death. Flash memory sticks are going to kill DVD revenue in short order. Home theater systems will finish off the movie theater business. Even HD-DVD and Blue Ray are no match for these tiny USB terrors.

And so in 2010 we will see Lord of the Rings IIX rendered on a pair of aging E-Machines with a 10BaseT hub interconnect. Well maybe not that bad but movie budgets will plummet. I’m a huge fan of Clerks which was financed with a Visa if I’m not mistaken but I imagine it wouldn’t have sucked with color and a few explosions. Musicians can always sell concert tickets. I’m just not sure I’m ready for Rocky 12 on Broadway.

January 13, 2007

The Next Goldwater? A Reason to Vote?

The lone Libertarian in congress is considering a run for president in ’08. Ron Paul, a Perot-esque man with two first names, is one of a handful in congress who actually knows how the Federal Reserve works. From the NYTimes

Paul is well-known on Capitol Hill for his frequent lone “no” votes on many spending bills and other legislation, much of which wins overwhelming support among both Republicans and Democrats alike.

This a voting pattern that has earned the obstetrician-turned-politician the nickname of “Dr. No.” Paul explains that he votes only for measures he views as specifically authorized by the Constitution.

In 2006, Paul voted against the Bush administration’s stated position 64 percent of the time, more than any House Republican. His highest-profile departure from President Bush is on the Iraq war, which the congressman vigorously opposes.

In 2002, Paul was among just six House Republicans who voted against giving Bush authority to wage war in Iraq. Paul opposed the resolution for numerous reasons — including his position that it was an unconstitutional transfer, from Congress to the executive branch, of the power to declare war.

That’s right, Dr. No is an OB-GYN. And just for a sense of contrast here is Bush’s only quote I could find about OB-GYNs.

“Too many OB-GYNs aren’t able to practice their love with women all across this country”

You can read more about Ron Paul at his Wikipedia article.

January 8, 2007

Math Discovery

Filed under: Culture,Philosophy,Random Thoughts — Kirk @

Knock on..
Originally uploaded by Splat Worldwide.

It was the ’90s. I was sitting in class in 8th grade, bored out of my gourd. I started fiddling with my calculator and found something weird. If you take a number, lets say 789654, and subtract the reverse (456987) and divide the result by nine you get an answer 36963 that is the same backwards or forwards. A numerical anagram, like radar. It struck me as weird that this little trick only worked for some numbers. Then the other day I posted my little find to the comments section of Reddit and found that I’d stumbled upon what are known as Lychrel numbers The discussion in response to my comment is below. A coder competition to calculate Lychrel numbers using Erlang breaks out. It’s possibly the geekiest, most interesting thing I’ve ever witnessed.

Along the same lines: take a natural number and add its reverse. After a few iterations, you get a palindromic number. For example:

* 7326 + 6237 = 13563
* 13563 + 36531 = 50094
* 50094 + 49005 = 99099 <--- A Palindrome

89 takes an unusually large 24 iterations (the most of any number under 10,000 that resolves into a palindrome) to reach the palindrome 8813200023188.

Numbers that do not form a palindrome through the process of reversing and adding their digits have been named "Lychrel numbers".

The first known number starting from 0 that does not apparently form a palindrome is a three digit number. And here we have again a mysterious number for which we not now if it is just incidental, or that there is some deeper mathematical reason why it is exactly this number. It is 196.
permalink parent reply
reply cancel


sblinn 1 point 4 hours ago*

I wrote some Python to do bits of lychrel computation recursively — it was a bad idea as eventually I reached:

RuntimeError: maximum recursion depth exceeded in cmp

Probably bad code, anyway:

import sys

def reverse_int(i):
return int(str(i)[::-1])

def is_palindrome(i):
s = str(i)
return s == s[::-1]

def lychrel(min,max,depth):

print_each_fail = 0
print_each_success = 1

num_lychrel = num_not_lychrel = 0

for i in xrange(min,max):
j = do_lychrel(i,depth)
if j == 0:
num_lychrel += 1
if print_each_success:
print "%d is lychrel at depth %d" % (i,depth)
else:
num_not_lychrel += 1
if print_each_fail:
print "%d is not lychrel at depth %d" % (i,j)

print "in the xrange %d to %d at depth %d there are %d lychrel and %d non-lychrel numbers" % (min,max,depth,num_lychrel,num_not_lychrel)

def do_lychrel(i,depth,j=1):

palindrome_i = reverse_int(i)
palindrome_sum = i + palindrome_i
if is_palindrome(palindrome_sum):
return j
elif (j+1) >= depth:
return 0
else:
return do_lychrel(palindrome_sum,depth,(j+1))

if __name__ == "__main__":
lychrel(int(sys.argv[1]),int(sys.argv[2]),int(sys.argv[3]))

It was easy enough to re-write the recursive part as a loop so it would actually run:

def do_lychrel(i,depth):

j = 1
while (j<=depth):
palindrome_i = reverse_int(i)
palindrome_sum = i + palindrome_i
if is_palindrome(palindrome_sum):
return j
i = palindrome_sum
j += 1
return 0

Results are things like:

# python lychrel.py 10 2000 2000
196 is lychrel at depth 2000
295 is lychrel at depth 2000
394 is lychrel at depth 2000
493 is lychrel at depth 2000
592 is lychrel at depth 2000
689 is lychrel at depth 2000
691 is lychrel at depth 2000
788 is lychrel at depth 2000
790 is lychrel at depth 2000
879 is lychrel at depth 2000
887 is lychrel at depth 2000
978 is lychrel at depth 2000
986 is lychrel at depth 2000
1495 is lychrel at depth 2000
1497 is lychrel at depth 2000
1585 is lychrel at depth 2000
1587 is lychrel at depth 2000
1675 is lychrel at depth 2000
1677 is lychrel at depth 2000
1765 is lychrel at depth 2000
1767 is lychrel at depth 2000
1855 is lychrel at depth 2000
1857 is lychrel at depth 2000
1945 is lychrel at depth 2000
1947 is lychrel at depth 2000
1997 is lychrel at depth 2000
in the xrange 10 to 2000 at depth 2000 there are 26 lychrel and 1964 non-lychrel numbers

Whee. It could probably be written much better with some reduce or whatever functional mumbo-jumbo. No matter what I tried, I couldn’t get the recursive version to be “properly” tail recursive without manually writing the loop.
permalink parent reply
reply cancel


BioGeek 1 point 3 hours ago*

sblinn, you seem to have enjoyed yourself with these Lychrel numbers :)

Now, with your code in hand, you should easily be able to solve question 55 at projecteuler.net:

How many Lychrel numbers are there below ten-thousand?
permalink parent reply
reply cancel

sblinn 1 point 3 hours ago*

Heh, it is not answerable without some proviso as to what I’m calling the Lychrel “depth”. I could answer “how many lychrel numbers are there at a depth of 200 below ten-thousand”:

$ python lychrel_loop.py 1 10000 200
in the xrange 1 to 10000 at depth 200 there are 249 lychrel and 9750 non-lychrel numbers

But nobody can say yet whether even 196 is “really” a Lychrel number or not, right?
permalink parent reply
reply cancel

sblinn 1 point 3 hours ago*

Some Erlang code for lychrel calculations (probably very, very bad code!):

$ cat lychrel.erl

-module(lychrel).

-export([is_lychrel/1]).
-export([is_lychrel/2]).

is_lychrel(N) -> is_lychrel(N,infinity).

is_lychrel(N,D) -> is_lychrel(N,D,1).

%% if we've reached iteration such that we've exceeded depth, it is a lychrel number at depth:
is_lychrel(_N,D,I) when I >= D -> true;

%% main guts
is_lychrel(N,D,I) ->
Nrev = reverse_int(N),
Nsum = N + Nrev,
Bpal = is_palindrome(Nsum),
if
Bpal -> false;
true -> is_lychrel(Nsum,D,I+1)
end.

reverse_int(N) ->
list_to_integer(lists:reverse(integer_to_list(N))).

is_palindrome(N) ->
N == reverse_int(N).

$ erlc lychrel.erl

$ erl

Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.5.2 (abort with ^G)
1> c(lychrel).
{ok,lychrel}
2> lychrel:is_lychrel(89,12).
true
3> lychrel:is_lychrel(89,24).
true
4> lychrel:is_lychrel(89,25).
false
5> lychrel:is_lychrel(8).
false
6> lychrel:is_lychrel(86).
false
7> lychrel:is_lychrel(89).
false
8> lychrel:is_lychrel(10911).
false
9> lychrel:is_lychrel(1186060307891929990).
false
10> lychrel:is_lychrel(196).

That last one won’t return — EVER — if the conjecture is true.

edit: little update that saves the resulting palindrome and iteration count:

%% main guts
is_lychrel(N,D,I) ->
Nrev = reverse_int(N),
Nsum = N + Nrev,
Bpal = is_palindrome(Nsum),
if
Bpal -> {false,I,Nsum};
true -> is_lychrel(Nsum,D,I+1)
end.

erl:

2> lychrel:is_lychrel(196,2000).
true
3> lychrel:is_lychrel(10911).
{false,55,4668731596684224866951378664}
4> lychrel:is_lychrel(1186060307891929990).
{false,261,
44562665878976437622437848976653870388884783662598425855963436955852489526638748888307835667984873422673467987856626544}

Any help making this properly tail-recursive would be awesome.
permalink parent reply
reply cancel


degustideathstar 10 points 1 day ago

Dividing by nine (or, actually, dividing by n-1 in a base-n system) has some kind of funny properties. This is probably related to how the digits in multiples of nine add up to multiples of nine.
permalink parent reply
reply cancel

sblinn 6 points 9 hours ago*

Fun. I wrote a little python program to calculate it (called it lychrel9 as I have no idea what the proper term would be):

in the xrange 0 to 100 there are 100 lychrel9 palindromic and 0 lychrel9 non-palindromic numbers

in the xrange 0 to 1000 there are 1000 lychrel9 palindromic and 0 lychrel9 non-palindromic numbers

in the xrange 0 to 10000 there are 6745 lychrel9 palindromic and 3255 lychrel9 non-palindromic numbers

The lowest is 1011. Breaking it down by 1000s yields surprisingly uniform results:

in the xrange 1000 to 2000 there are 633 lychrel9 palindromic and 367 lychrel9 non-palindromic numbers

in the xrange 2000 to 3000 there are 639 lychrel9 palindromic and 361 lychrel9 non-palindromic numbers

in the xrange 3000 to 4000 there are 643 lychrel9 palindromic and 357 lychrel9 non-palindromic numbers

in the xrange 4000 to 5000 there are 645 lychrel9 palindromic and 355 lychrel9 non-palindromic numbers

in the xrange 5000 to 6000 there are 645 lychrel9 palindromic and 355 lychrel9 non-palindromic numbers

in the xrange 6000 to 7000 there are 643 lychrel9 palindromic and 357 lychrel9 non-palindromic numbers

in the xrange 7000 to 8000 there are 639 lychrel9 palindromic and 361 lychrel9 non-palindromic numbers

etc. Going for only slightly larger numbers seems to be about the same distribution:

in the xrange 10000 to 20000 there are 6350 lychrel9 palindromic and 3650 lychrel9 non-palindromic numbers

But once we get to 6-digit numbers, the majority do not fit:

in the xrange 100000 to 200000 there are 42415 lychrel9 palindromic and 57585 lychrel9 non-palindromic numbers

in the xrange 100000 to 1000000 there are 385252 lychrel9 palindromic and 514748 lychrel9 non-palindromic numbers

in the xrange 1000000 to 2000000 there are 424210 lychrel9 palindromic and 575790 lychrel9 non-palindromic numbers

etc.

The interesting bit to me is that all numbers minus their reverse are evenly divisible by 9. Also interesting (perhaps) is that the set of “lychrel9″ and “non-lychrel9″ numbers is expensively computable (and determinable — unlike a lychrel number which cannot be proven to be such a number one way or another) and are perhaps useful in algorithms.
permalink parent reply
reply cancel


sblinn 2 points 6 hours ago*

For the curious, the horrible awfulness that is my python code for it:

import sys

def reverse_int(i):
return int(str(i)[::-1])

def is_palindrome(i):
s = str(i)
return s == s[::-1]

def lychrel9(min,max):
print_each_fail = 0
print_each_success = 0
num_palindromic = num_not_palindromic = 0

for i in xrange(min,max):
j = abs(i - reverse_int(i))
k = j / 9
if is_palindrome(k):
num_palindromic += 1
if print_each_success:
print "%d is lychrel9 palindromic" % i
else:
num_not_palindromic += 1
if print_each_fail:
print "%d is not lychrel9 palindromic" % i

print "in the xrange %d to %d there are %d lychrel9 palindromic and %d lychrel9 non-palindromic numbers" % (min,max,num_palindromic,num_not_palindromic)

if __name__ == "__main__":
lychrel9(int(sys.argv[1]),int(sys.argv[2]))

permalink parent reply
reply cancel


sblinn 2 points 6 hours ago*

Neat, another palindrome curiousity, this time with primes:

http://primes.utm.edu/curios/page.php/229.html

The smallest prime that remains prime when added to its reverse.

Replacing each digit of prime 229 with its square, respectively its cube, results in two new primes: 4481 and 88729, with a palindromic difference of 84248. Coincidentally, 229 + 4481 + 88729 is palindromic as well.

And there’s a cipher paper out there using palindromic differences (PDF):

http://csrc.nist.gov/pki/HashWorkshop/2006/UnacceptedPapers/MACHADO_caligo.pdf

January 7, 2007

Kirkfuscius Say

Filed under: Economics,Philosophy,Predictions — Kirk @



Knock on..
Originally uploaded by Nels1.

I constantly annoy my relatives with economic predictions. In retaliation they started calling me Kirkfuscius. So I was reading some more quotes by the National Association of Realtors’ chief economist and came up with a saying. But first the quote.

“It appears we’ve hit bottom, the price drops are necessary to stir sales. It is working.” (Globe and Mail Dec 29th 06)

David Lereah has been calling the bottom of the housing market on a monthly basis as the statistics deteriorate. So I came up with:

“He who calls the empty glass half full is not an optimist, he just has a drinking problem.”

Powered by WordPress