**This post is undergoing final editing and will appear soon.
Thank you for your patience.**

## The National Debt Is Off By 5.1 Trillion USD

18 March 2019

## The Future, The Present, The Past

17 December 2018

**T****he Past is not immutable**: We are constantly changing it.

**The future is not unknowable**: We anticipate it, we carefully sculpt it.

**The present: **We act in the present carefully sculpting the future and those actions change the past as we act.

**The past is: **Our future memories that we create as we carefully sculpt our future by our actions in the present.

Every single use of the words ‘**we**‘ and ‘**our**‘

are not there for the taking

and replacing them with ‘**I**‘ and ‘**My**‘

There is no ‘**I**‘ there is only ‘**We**‘

There is no ‘**My**‘ there is only ‘**The**‘, and ‘**Our**‘

There is no ‘**go back**‘

There is no ‘**skip forward**‘

There is only ‘**now**‘

*When you’re too scared to look ahead,
and it hurts to much to look behind,
look beside you and I’ll be there.*

## Self Extinction Events

6 December 2018

**GREAT FILTERS**

We as a global culture and civilization face what many call “A Great Filter” in our future (This century and the next).

In the past “Great Filters” have littered the fossil record of our planet with extinction events. Climate Change brought on by asteroid strikes and so forth.

**ONE OF THE FIRST GREAT FILTERS**

One of the very first “Great Filters” was of a species of bacteria (anaerobic) that took in carbon dioxide and as a waste product produced oxygen. It bloomed all over the planet when atmospheric carbon dioxide was the more prominent than oxygen as an atmospheric gas. That bacteria wiped itself out with just a few examples remaining. This species executed a “**SELF-EXTINCTION-EVENT**“

**A CURRENT GREAT FILTER**

There is another species doing this by digging-up, pumping-up sequestered hydrocarbons and turning them into energy and producing carbon dioxide in great quantities as a waste product. This is leading to climate change that could very likely take this species extinct along with many others. This species is in the process of attempting a “**SELF-EXTINCTION-EVENT**“.

The above is an argument against why we as a species must without delay move away from our ‘Hydrocarbon Economy”. We know how to do it. We have the tools and the technology. All that remains is a global cooperative effort to do it.

**GUN VIOLENCE AND MODERN CIVILIZATION**

Additionally this second species now has a population and technology big enough to demand a global cooperative society. However there are certain members of the species who resist that global cooperative civilization and cling to their evolutionary excess baggage in the form of tribal behaviors. They drag down the very important move toward global civilization.

We all know what species we are talking about here.

I’m an ‘old-man’ and I got my fill of guns back in 1968-1969 in Southeast Asia.

There is NO PLACE for devices designed to kill other humans in a modern civilized society.

And we all know how tribal behaviors manifest themselves. The above is an argument against why we as a species do not need devices to kill each other.

## What Are The Odds You Already Have My Phone Number

21 November 2018

### 09 NOV 2018

538 Riddler Express

What Are The Odds

You Already Have My Phone Number

**Assume the phone company assigns seven digit phone numbers in a random way. What are the chances that when you get a second phone then the number it will be assigned will contain the same digits as your first phone number, including any repetitions of digits. Such numbers are said to be ‘scrambles’ of each other.**

**An example of a ‘scramble’ is the pair 608-2338 and 830-2386. Also suppose that all the phone numbers from 000-0000 up to and including 999-9999 are are up for grabs. (Note there are many different seven digit numbers that the phone company actually never assigns, and we ignore this).**

**NOTE: if your first phone’s number is like 000-0000 or 111-1111 or other number with all seven digits the same then you would be guaranteed to get a number that is not a ‘scramble’ of your first phone when you get the number for your second phone since all ‘scrambles’ of such numbers come out the same. There is only ONE of each of these types. So your chances of getting a scramble would be: ZERO. So we do not consider these.**

**So here is how to figure this out: Think of a line of buckets each filled with numbers each number in a any bucket is a scrambles of any other in that bucket. If you pick two numbers from any of those buckets you will be guaranteed they will be scrambles of each other.**

**What are the chances that after randomly picking a ball from one of ‘m’ buckets. You again choose a bucket at random and that is the same bucket you picked your first ball from.**

**Easy: 1/m — you have ‘one-chance-in-m’ of getting the same bucket.**

**Here is the interesting part: How many buckets are there?**

**For each number from 000 0000 all the way to 999 9999 take that number and reduce it to a number whose digits are ‘in-order’.**

**For example the number 608 2338 would be reduced to 023 3688. Scratch that number on the bucket and toss in the original number. Do this and track that numbers from 000 0000 to 999 9999 when the number you come up with after ordering the digits already exist then just toss your number in the bucket. If there is no bucket just scratch the ordered number on the bucket and toss it in.**

**Some buckets have a few numbers and some buckets have a lot of numbers. The buckets with the fewest numbers in them have only 7 numbers in them. The buckets with the most numbers in them have 5,040 numbers in them. And the total number of buckets is 11,430 buckets.**

**So grab a number from a bucket then you have a 1 in 11,430 chance of putting your hand in the same bucket. But if you do then you get a ‘scramble’. **

**Here is one way to count the number of buckets:**

import sys import random n_dct = {} def set_itm_val_in_dct(n_raw): """ Update The Dictionary: Using the input number 'n_raw' create a new value/pair for the dictionary 'n_dct' or increment the value part of an existing value/pair """ n_str = str(n_raw) n_lst = list(n_str) n_len = len(n_lst) for _ in range(7-n_len): n_lst.insert(0,"0") n_lst.sort() """ Ignore Numbers That Have All The Same Digits """ if n_lst[0] == n_lst[6]: return n_lst = "".join(n_lst) if n_lst in n_dct: n_dct[n_lst] += 1 else: n_dct[n_lst] = 1 def n_dct_fill(n_max): """ Build The Dictionary Create n_dct using the values 0 ... n (n_max-1) """ for n in range(1, n_max): set_itm_val_in_dct(n) def dct_print(): """ Print The Dictionary """ print len(n_dct) count = 0 n_tup = n_dct.items() n_tup.sort(key=lambda elem: elem[1]) for tup in n_tup: count += 1 if count % 10 == 0: print("") prt_str = '{: >7}:{: >5}'.format(tup[0], tup[1]) print (prt_str), print count # Create The Dictionary if __name__ == "__main__": """ From 000-0000 to 999-9999 """ n_dct_fill(10000000) dct_print()

## Is Today Your Birthday

19 August 2018

""" Is Today Your Birthday? Written By Zach Cox (http://www.zachdcox.name) On the occosion of the anniversary his nephew's birth. Happy Birthday James! Note: Sadly It was not finished for this year's anniversary But you can adjust command line argument "yyyy_mm_dd" To see what different inputs yield. """ import datetime import sys import os import traceback class Is_Today_Your_Birthday: usage_messages = ["Usage: python Is_Today_Your_Birthday.py yyyy-mm-dd", "Where: yyyy_mm_dd is the date of your birth", " 'yyyy' 'mm' 'dd' are each numeric character strings", " of length 4, 2, and 2 and seperated by the dash character.", " yyyy is the year, mm is the month and dd is the day of the month."] birthday_msgs = ["You Are One Decade Old!", "You Are Twenty Percent Dead!", "You Are Flirty Shirty Thirty ", "Lordy, Lordy, You Are Forty!", "You Are Nifty, Thrifty Fifty!", "You Are Sketchy, Sexy Sixty!", "You Are Sensibly, Steadily Seventy!", "You Are Weighty, Eighty Matey!", "You Are Shiny, Briny Ninety!", "Dang, Ain't You Dead Yet?", "Congradulations!"] arg_list = None # Today now = None # Date Of Birth dob = None # Birthday Anniversary bda = None def __init__(self): """ set up the today/now vars """ self.now = datetime.date.today() return def speak(self, message, do_speak): if do_speak: ret_val = os.system("say " + message) def print_usage(self,error_message,do_speak=False): """ Print Error Message And Usage Rules """ print error_message self.speak(error_message, do_speak) for msg in self.usage_messages: print msg self.speak(msg, do_speak) def check_command_line_arguments(self): """ set up the date of birth and this year's birthday vars return True when date check for a valid command line argument """ ret_value = False self.arg_list = sys.argv if len(self.arg_list) >= 2: # date of birth try: dtobj = datetime.datetime.strptime(self.arg_list[1], '%Y-%m-%d') except ValueError: self.print_usage("INVALID ARGUMENT") return(False) self.dob = dtobj.date() # this year's birthday anniversary self.bda = self.dob.replace(year=self.now.year) return True else: self.print_usage("MISSING CMD LINE ARGUMENT") return False def dob_vs_now(self): # Born On This Very Day (WOW!)? if self.now == self.dob: print("WOW! Today Is The Day Of Your Birth!") print("YOU ARE BRAND NEW!") print("Welcome To the 'outside' World!") return # Born Sometime In The Future? if self.dob > self.now: print("WOW! You Are From The FUTURE.") print("TIME TRAVEL! Who Knew?") return # Today Is Your Birthday if self.bda == self.now: print("Happy Birthday!") years_old = int(self.now.year)-int(self.dob.year) print("You Are %d Years Old Today" % (years_old) ) msg_idx = len(self.birthday_msgs)-1 if years_old > 90: msg_idx = len(self.birthday_msgs)-2 elif years_old % 10 == 0: msg_idx = (years_old / 10)-1 print(self.birthday_msgs[msg_idx]) return # You Have Already Had Or Will Have A Birthday This Year print("Today Is NOT Your Birthday") days = abs((self.now - self.bda).days) days_str = "Days" if days == 1: days_str = "Day" if self.bda > self.now: extra_msg = "Your Birthday Will Be %d %s From Now." % (days, days_str) print(extra_msg) years_old = int(self.now.year)-int(self.dob.year) message = "You Will Be %d Years Old That Day!" % (years_old) else: extra_msg = "Your Birthday Was %d %s Ago." % (days, days_str) print(extra_msg) years_old = int(self.now.year)-int(self.dob.year) message = "You Turned %d Years Old That Day!" % (years_old) print(message) def main(): """ Instanciate the object Invoke the check command line arguments method on the object Invoke the analysis of date of birth to today's date method on the object """ print " " is_today_your_birthday = Is_Today_Your_Birthday() bool_wtf = is_today_your_birthday.check_command_line_arguments() if bool_wtf: is_today_your_birthday.dob_vs_now() print " " """ Python Artifact """ if __name__ == '__main__': main() <span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">﻿</span>

## 538 Puzzles – The Maths Anarchists

13 April 2018

Here is the 538 Blog Riddle Page For Last Week:

When Will The Arithmetic Anarchists Attack

I started this yesterday and I think I successfully solved the riddle. However I got slightly different answers than the solution published today. I do not know where the error is. Was the solution published in the 538 Blog incorrect? Or is my solution incorrect?

Their solution was that there were 212 events and the longest gap was 1,096 days. Their solution tagged the most events for any one year to be 7 for the year 2012 which did match my solution.

My solution was:

**For Each Date From 01 JAN 2001 to 31 DEC 2099**

**Consider dd/mm/yy where dd*mm == yy**

**Then Answer The Following Questions:**

**[Q1] How Many Of These Events Are There?**

**[A1] There Are 210 Events In the 21st Century.**

**[Q2] Which Year Has The Most?**

**[A2] The Year 2024 Will Have 7 Events.**

**[Q3] What Is The Longest Gap Between Any Two?**

**[A3] The Longest Gap = 1097 Days And Occurs Between 03/19/2057 And 03/20/2060**

I figured this out using a Python script which is given below.

I’m still looking at my code in hopes of finding the problem (assuming it is my problem).

""" When Will The Maths Anarchists Attack For Each Year From 2000-2100: Consider "mm/dd/yy" When mm*dd == yy Then For That (mm, dd, yy) Combination An Attack Will Be Launched [1] How Many Statues Will Be Destoryed? [2] Which Year(s) Will Have The Most Statues Destroyed [3] What Will Be The Longest Gap Between Statue Destruction """ import datetime import calendar class Havoc_From_The_Maths_Anarchists: """ Answer Questions 1,2,3 Above """ def __init__(self): self.list_of_triples = [] self.q1 = "[Q1] How Many Of These Events Are There?" self.q2 = "[Q2] Which Year Has The Most?" self.q3 = "[Q3] What Is The Longest Gap Between Any Two?" self.a1 = "[A1] " self.a2 = "[A2] " self.a3 = "[A3] " def build_list_of_dates(self, debug=True): """ For each month number and each day of the month number When month number times day of the month number is not less than or equal to 99 skip and consider next date If this day of the month is greather than the number of days in this month skip and consier the next date If this year, month, day of the month already found skip and consider the next date Add this year, month, day of the month to the list dates and consider the next date """ self.list_of_triples = [] for idx in range(1,13): for jdx in range(1,32): this_mo = idx this_da = jdx this_yr = this_mo*this_da # SKIP IF YEAR NOT IN RANGE 01 ... 99 if this_yr > 99: continue # SKIP OUT OF RANGE DAYS if this_da > calendar.monthrange(this_yr,this_mo)[1]: if debug: print "[BIG_da] mo = ",this_mo," da = ", this_da, " yr = ",this_yr continue # ADD THIS DAY TO ALLOWED DAYS this_one = (2000+this_yr, this_mo, this_da) if debug: print "[NEW_da] mo = ", this_mo, " da = ", this_da, " yr = ",this_yr self.list_of_triples.append( this_one ) def find_answers(self, debug = True): self.list_of_triples.sort() current_year = 2001 current_list = [] list_of_years = [] list_of_dates = [] for idx in range(0, len(self.list_of_triples)): list_of_dates.append(datetime.date(self.list_of_triples[idx][0],self.list_of_triples[idx][1],self.list_of_triples[idx][2])) if self.list_of_triples[idx][0] != current_year: current_year = self.list_of_triples[idx][0] list_of_years.append(current_list) current_list = [] this_one = datetime.date(self.list_of_triples[idx][0],self.list_of_triples[idx][1],self.list_of_triples[idx][2]) current_list.append(this_one) # Find Answer 1 and Answer 2 total_dates = 0 max_events = 0 max_year = "" for a_list in list_of_years: if debug: for a_date in a_list: print a_date.strftime('%m/%d/%Y'), print this_years_events = len(a_list) total_dates += this_years_events if this_years_events > max_events: max_events = this_years_events max_year = a_list[0].strftime('%m/%d/%Y').split('/')[2] self.a1 += "There Are "+str(total_dates)+" Events In the 21st Century." self.a2 += "The Year "+max_year + " Will Have " + str(max_events) + " Events." # Find Answer 3 date_then = datetime.date(2000,12,31) date_now = date_then delta = int((date_now - date_then).days) max_gap = delta gap_dates = (date_now,date_then) for a_date in list_of_dates: date_then = date_now date_now = a_date delta = int((date_now - date_then).days) if delta > max_gap: max_gap = delta gap_dates = [date_now, date_then] if debug: print "MAX_GAP = " ,max_gap," Occured Between ",gap_dates[1].strftime('%m/%d/%Y')," and ",gap_dates[0].strftime('%m/%d/%Y') self.a3 += "The Longest Gap = "+ str(max_gap)+ " Days And Occurs Between "+gap_dates[1].strftime('%m/%d/%Y')+" And "+gap_dates[0].strftime('%m/%d/%Y') def print_answers(self, debug = True): print print print "For Each Date From 01 JAN 2001 to 31 DEC 2099" print "Consider dd/mm/yy where dd*mm == yy" print "Then Answer The Following Questions:" print print self.q1 print self.a1 print print self.q2 print self.a2 print print self.q3 print self.a3 def main(): answer_questions = Havoc_From_The_Maths_Anarchists() answer_questions.build_list_of_dates(False) answer_questions.find_answers(False) answer_questions.print_answers(False) if __name__ =='__main__':main()<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>

## Integer Multiplication Explained

29 March 2015

When I first left undergraduate school I took a job teaching 8th and 9th grade math. My 8th graders were introduced to integer multiplication for the first time at that level. They certainly knew natural number multiplication and even knew integer addition which includes subtraction by the time we took up integer multiplication.

When teaching integer addition I presented it as addition of vectors directed along the number line. So +2 + -4 would be an arrow starting at zero of length 2 pointing to the right then append an arrow of length 4 pointing to the left. The tip of the second arrow wound up at the point -2 on the number line.

To extend that idea to integer multiplication I introduced items I called ‘Number Line Frogs’. Each frog had a number associated with it and a direction. So a +2 frog could jump two places at a time and it pointed to the right. The number -3 was represented by a frog that could jump three places and pointed to the left.

I then asked the students to think of integer multiplication problems in two parts. The problem a x b was to be visualized as an ‘a-frog’ being asked to do something and that something was to perform ‘b’ jumps. The problem always started at the origin or ‘0’ on the number line. The sign of the number ‘b’ indicated which direction the frog was to jump. The absolute value of the number ‘b’ indicated how many jumps the frog was to take. The sign of the number ‘a’ indicated which direction the frog was pointing and the absolute value of the number ‘a’ indicated how far the frog could jump.

In this way of thinking about it the problem +2 x -3 was the same as saying ‘Allow a +2 frog to jump three jumps backward (-3)’. I stressed that the problem -3 x +2 was the same problem as could be verified by saying ‘Allow a -3 frog to take two jumps forward (+2)’ In both cases the end result was the number -6.

The rule for ‘positive-a times positive-b’ was to say ‘let a postive-a-frog take b-jumps-forward’ which came out to be the same problem as saying ‘let a positive-b-frog take a-jumps-forward’.

The rule for ‘positive-a times negative-b’ was to say ‘let a positive-a-frog take b-jumps-backward, while the rule for ‘negative-b times positive-a’ was to say ‘let a negative-b frog take a-jumps-forward’.

Finally the rule for ‘negative-a times negative-b’ was to say ‘let a ‘negative-a frog take ‘b-jumps-backward’.

When viewed this way and taking into account the ‘frog’ always started at zero the sign table for integer multiplication was justified. Additionally the commutative property of multiplication was illustrated by noting any number that could be decomposed into ‘b-groups of length a’ was equivalent to the observation that the same number could be decomposed into ‘a-groups of length b’.

I will say that the 8th grade group I had were sorted in an inhomogeneous manner with all the top students put into one class and that class was assigned to me. I did worry about this sorting process and felt that it was wrong on multiple levels but given there was nothing a first year math teacher could do to change the situation I made the most of it and presented many mathematical concepts using non standard methods (i.e. presented not-by-the-book). I think that math class did enjoy my presentations.