text:
## The National Debt Is Off By 5.1 Trillion USD

This post is undergoing final editing and will appear soon.

## The Future, The Present, The Past

The Past is not immutableWe are constantly changing it.

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

The presentWe 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

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

### 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

"""
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 Flirty Shirty Thirty ",
"Lordy, Lordy, You Are Forty!",
"You Are Nifty, Thrifty Fifty!",
"You Are Sketchy, Sexy Sixty!",
"You Are Weighty, Eighty Matey!",
"You Are Shiny, Briny Ninety!",
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
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
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()

## 538 Puzzles – The Maths Anarchists

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

[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:
"""
"""
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 )

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)

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."

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')

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():

if  __name__ =='__main__':main()

## Integer Multiplication Explained

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.

## Can I Get Your Digits! (Except for one of them)

I follow the blog “Math Jokes 4 Mathy Folks“.  A recent post gave a game/riddle you can play with kids or even post a set of questions on some social media site and play with your friends.  The post is “Can I Get Your Digits“.

So, here are the questions you can ask:

[Step-1] Pick a number with more than four digits (keep it secret).
[Step-2] Add the digits of the number together (keep it secret).
[Step-3] Subtract this sum from the original number (keep it secret).
[Step-4] From [Step-3] give me all the digits except for one of them (keep that digit secret).
[Step-5] I will ‘magically’ guess the missing (secret) digit!

The ‘magic-guess’ is: Add up the digits given to you and then add what ever number it takes to get to the nearest multiple of nine and that number is the missing digit.

So for example: the number 87694. When the digits are added you get 34.  When you subtract 36 from 87694 you get 87660.  Below is a table for each of the possible missing digits from number 87660.

Missing the ‘0’ … 8+7+6+6 = 27 (The missing digit is ZERO)
Missing the ‘6’ … 8+7+6+0 = 21 (The missing digit is SIX)
Missing the ‘7’ … 8+6+6+0 = 20 (The missing digit is SEVEN)
Missing the ‘8’ … 7+6+6+0 = 19 (The missing digit is EIGHT)

Now here is an explanation of why this always works.

The way numbers are represented is in what is called a ‘Place Value System’.  In this system a number can be thought of as a sum of the digits of the number times a power of 10 (for a base 10 number).  The power of 10 depends on the ‘Place’ of the digit.  The ‘least-significant’ digit (the on on the right end of a number) can be thought of as that digit times $10^{0}$.  The next ‘Place’ is called the 10’s place and can be thought of as that digit times $10^{1}$, with the next ‘Place’ being the 100’s place or the digit times $10^{2}$ and so forth.

So for example:

$87694\quad =\quad 8\times {10}^{4}+7\times {10}^{3}+6\times {10}^{2}+9\times {10}^{1}+4\times {10}^{0}$

And this representation is equivalent to the following one when you replace the powers of 10 with the corresponding addition problem:

$8\left( 1+9999 \right) +7\left( 1+999 \right) +6\left( 1+99 \right) +9\left( 1+9 \right) +4$

It is now clear how this ‘magic guess’ works. When you distribute each digit over the corresponding sum you get the following:

$8+8\left( 9999 \right) +7+7\left( 999 \right) +6+6\left( 99 \right) +9+9\left( 9 \right) +4$

Regrouping you get the following very suggestive formula:

$(8+7+6+9+4)\quad +\quad 8\left( 9999 \right) +7\left( 999 \right) +6\left( 99 \right) +9\left( 9 \right)$

This is clearly the sum of the digits of the original number plus another number that is clearly a multiple of nine:

$\sum { digits\_ of(87694) } \quad +\quad 9\left[ 8\left( 1111 \right) +7\left( 111 \right) +6\left( 11 \right) +9\left( 1 \right) \right]$

The main thing to realize here is that when you subtract $\sum { digits\_ of(87694) }$ from the original number you are left with a number that (whatever its actual digits are) is a multiple of nine.

Finally it is the case that any number that is a multiple of nine also has the property that the number resulting from summing its digits is also a multiple of nine. This final fact is what you use to find the missing digit. Leaving out a single digit will ‘disturb’ the sum so it is no longer a multiple of nine and you only need sum up what you are given and find that number that causes the sum to be a multiple of nine to deduce the missing digit.

Notice: When the dropped digit is either a ‘0’ or a ‘9’ your magic ‘guess’ should be: “You left out either a 9 or a 0.”

Notice: This explanation can be extended to an arbitrary number of digits and thus it would be a proof.

Notice: That a multiple of nine also has the properties that the sum of its digits is also a multiple of nine can be explained in exactly the same way as the explanation above goes. So assume some number is a multiple of nine:

$X\quad =\quad 9x$

Now write X as a sum of its digits with each one times its corresponding power of ten:

$X\quad =\quad \sum _{ i=0 }^{ n }{ { a }_{ i } } { 10 }^{ i }$

Notice that we can write each term of the sum as a digit of the the original number times the quantity $\left( 1+9\cdots 9 \right)$ where the symbol “$9\cdots 9$” is 9 or 99 or 999 or 9999 and so forth.

$X\quad =\quad { a }_{ 0 }+\sum _{ i=1 }^{ n }{ { a }_{ i } } \left( 1+9\cdots 9 \right)$

This way of writing the number makes it clear what happens when each digit is distributed over the its corresponding sum and the the sum regrouped so that the sum of the digits of the original number are distinct from the rest of the number.

$X\quad =\quad { a }_{ 0 }+\sum _{ i=1 }^{ n }{ { a }_{ i } } +\sum _{ i=1 }^{ n }{ { a }_{ i } } \left( 9\cdots 9 \right)$

Now it is clear that each term of the rightmost sum can be factored by the number nine giving the formula below. The symbol “$1\cdots 1$” is 1 or 11 or 111 or 1111 and so forth.

$X\quad =\quad { a }_{ 0 }+\sum _{ i=1 }^{ n }{ { a }_{ i } } +\quad 9\sum _{ i=1 }^{ n }{ { a }_{ i } } \left( 1\cdots 1 \right)$

Recalling that the original number is a multiple of nine we get the following:

$9x\quad =\quad { a }_{ 0 }+\sum _{ i=1 }^{ n }{ { a }_{ i } } +\quad 9\sum _{ i=1 }^{ n }{ { a }_{ i } } \left( 1\cdots 1 \right)$

Finally subtracting the rightmost sum from both sides of the formula and factoring out the number nine we get the following which does show that the sum of the digits of the original number is a multiple of nine.

$9\left[ x-\sum _{ i=1 }^{ n }{ { a }_{ i } } \left( 1\cdots 1 \right) \right] ={ a }_{ 0 }+\sum _{ i=1 }^{ n }{ { a }_{ i } } \quad$

## Fizz Buzz (Beep?)

I subscribe to a blog called Quora.  You can set filters on what sort of questions are presented. I’ve set them to show math, physics, and computer science posts.

Today I saw a post that asked if someone with an advanced degree in computer science could fail the “Fizz Buzz Test“.

I had no idea what this test was so I did a Google Search on the words “fizzbuzz test” and came up with a wikipedia page dedicated to the game which also mentions the test (here is the page).

After reading the article section named “Other Uses” and messing around with a python script today I can safely say I do fall into the category of someone who has used this game as a “Software Kata

Here is what I’ve done so far.  And, in my defense, I did start out with a VERY SIMPLE version of this game and it sort of “grew-like-topsy” to what you see below.

I’ve used the WordPress tags to embed the code below.  So this blog post not only talks about the Fizz Buzz Test but also gives a demonstration of how source code embedding works on WordPress.

# Fizz Buzz (beep) Script
import os

def sayIt( anIndex, aCount, phrase):
indexString = "The "+str(aCount)
if aCount >= 11 and aCount <= 20:
indexString += 'th'
elif aCount % 10 == 1:
indexString += 'st'
elif aCount % 10 == 2:
indexString += 'nd'
elif aCount % 10 == 3:
indexString += 'rd'
else:
indexString += 'th'
indexString += ' element is '+str(anIndex)+' and we say '+phrase
os.system("say " +indexString)

def findPhrase( index, fizzNumber, buzzNumber, beepNumber ):
newNumber = index
thePhrase = ''
if fizzNumber != 0:
while newNumber % fizzNumber == 0:
thePhrase += 'FIZZ '
newNumber = newNumber / fizzNumber
if buzzNumber != 0:
while newNumber % buzzNumber == 0:
thePhrase += 'BUZZ '
newNumber = newNumber / buzzNumber
if beepNumber != 0:
while newNumber % beepNumber == 0:
thePhrase += 'BEEP '
newNumber = newNumber / beepNumber
return thePhrase

def fizzBuzzBeep(maxCount, fizzNumber, buzzNumber, beepNumber):
count = 0
index = 1
while (count<maxCount):
aPhrase = findPhrase( index, fizzNumber, buzzNumber, beepNumber )
if len(aPhrase) != 0:
count +=1
print("{0:3d} - {1:3d} {2}".format(count, index, aPhrase))
sayIt( index, count, aPhrase)
index +=1

if __name__ == '__main__':
fizzBuzzBeep(100, 3, 5, 7)

## The Volume of A Pizza

We ordered ‘Mellow Mushroom‘ pizzas for supper last night and we still have about one pie left over in the frig, just waiting to be finished off.

Now: What is pizza? one way to say it is to assume the thickness of the pie is the value $'a'$ and the radius of the pie is the value $'z'$ then to say, “What is Pizza?” could be to ask, “What is the volume of a pizza?”

Thinking of a pizza as a very thin cylinder of height $'h'$ and radius $'r'$ we get.

[1] $V = \pi r^{2}h$

Substituting $'a'$ for the height $'h'$ and $'z'$ for the radius $'r'$ we get:

[2] $V = \pi z^{2}a$

Next  recall that the greek letter $\pi$ can be written in English as $Pi$ we get:

[3] $V = Pi z^{2}a$

Finally expanding the $z{2}$ to be $z z$ we get:

[4] $V = Pi z z a$


text:
< back

# Game Theory - Part I

AUTHOR: Chaoqi Yang

DATE: 2019 / 3 / 23

## 1. Preview

I am longing to learn Game Theory, which feels like pretty cool before I get a hand on it. Now, I get the chance and time to learn systematically following Yale Open Class Game Theory 24 Series.It is really a good resource, so that I decide to write the lessons here, as a way to record my studying process and also share it to all of you.

## 2. Grade Game (Series 1)

2.1 The Game: game theory is about "Game", so let's start with a small game. Suppose that wehave two players: Alice and Bob, and their final grades of this class will be decided by their actions. Alice can choose a number from $\alpha$ and $\beta$, and Bob can also choose one from $\alpha$ and $\beta$. Now rules are below:

• Alice chooses $\alpha$ and Bob chooses $\beta$, then Alice will get 'A' in this class, and Bob gets 'C'.
• If Alice chooses $\beta$ and Bob chooses $\alpha$, then things get changed. Alicegets 'C' and Bob wins 'A'.
• If Alice and Bob both choose $\alpha$, then they will get a same 'B-'.
• If Alice and Bob both choose $\beta$, then they should get 'B+'s.

2.2 Math Tools: since it is about math, let's use matrix to present this game for each side. Supposethat Alice is me, and Bob is my pair, from our perspective, we can get differentpayoffs from this game according to our actions.

Of course, in game theory senario, a better way is to use a hybrid matrix. Becausethe above two matrices are identical in x-axis and y-axis, the only different lieson this entries, we can combine them using the following way. I need to emphasizethat this hybrid matrix is very important and useful in future game theory study.

2.3 What is your Decision? (Analysis): suppose you will play this game withme, then I believe the best result should be that you choose $\alpha$, and I chooses $\beta$, consequently yeilding 'A' for you. Pretty happy ha, however, for me, I will nottake a risk and does you such a big favor, so I am also likely to choose $\alpha$, as a result, we both get a 'B-'. Nevertheless, if we agree to choose $\beta$ simultaneously, then we can both get a 'B+'. So do you trust me?Do you dare to choose a $\beta$? No really, everybody will pick $\alpha$, but why?

2.4 Formally Analysis: the reason why we will both pick $\alpha$ rather than $\beta$ even if two $\beta$ will yeild a better situation than two $\alpha$ is that for one player, picking an $\alpha$ strictly dominates the action of pickinga $\beta$, because strategy $\alpha$ will always yield a better result than $\beta$regardless what your rival has picked.

(Strictly Dominating) strategy $\alpha$ strictly dominates $\beta$ if payoffs from $\alpha$ is strictly higher than that from strategy $\beta$ regardless of others' choices.

(Weakly Dominating) strategy $\alpha$ weakly dominates $\beta$ if payoffs from $\alpha$ is higher than or at least the same as that from strategy $\beta$ regardless of others' choices.
• Lesson 1. We should never play a strictly dominated strategy.
• Lesson 2. Rational play by rational players can lead to bad outcomes. (wisdom!)
• Lesson 3. To figure out what actions you should choose in a game, a good first step is to figureout what are your payoffs (what do you care about) and what are other players' payoffs.
• Lesson 4. If you do not have a dominated strategy, put yourself in your opponents' shoes totry to predict what they will do. For example, in their shoes, you would not choose a dominated strategy.

2.5 Something Interesting. Only about 15% of the Yale Econ class chose $\beta$ in the grade game. In larger experiments with normal people, about 30% choose $\beta$, which means people are tend to be 'evil'.

## 3. Choose $\frac23$ of The Avg. (Series 2)

We have played a game before, so let's look at the basic ingredients of a gameusing the following example.

3.1 The Game: Suppose that you are in a class with ~100 people, now everyone has to choose a number range from 1 to 100. The winner of this gameis the man whose number is the closest to $\frac23$ of the overall average of the class.

Example. If we get 5 people in the class, assume the numbers chosenby each guy are listed as 34, 12, 1, 44, 98. Then the average $\frac{34+12+1+44+98}{5}$ is 37.8, then the man/woman who chooses 34 is the winner.

3.2 Basic Ingredient.

• (1) Players. We use notation like $i$ or $j$ to denote a player.
• (2) Strategies. We use $s_i$ to denote the strategy of player $i$ and $s_{-i}$ to denote the combined strategy of all the other players.
• (3) Payoffs. We use utility function over strategy to denote payoffs forplayer $i$, like $u_i(s_1, s_2, ..., s_n)$. Of course, payoffs of player $i$ can also be written as $u_i(s_i, s_{-i})$

3.3 Deletion: we can easily conclude that the biggest possiblesolution will be $\frac{100\times2}3$ = 66, where every other guy chooses 100. So wecan delete the choice (67, 100].

3.4 Stand on Others' Shoes: if everyone knows that no one willchoose a number from (67, 100], then what will happen? The upper boundary now is 66, so the biggest possible solution degrades to be $\frac{66\times2}3$ = 44.

3.5 Iterative Deletion: based on the notion stated in 3.3 and 3.4, we can narrow the possible solution scope from [0, 100] to [0, 66], from [0, 66]to [0, 44], from [0, 44] to [0, 29] ... finally the final solution should be 1, where everyone knows that if others are smart enough, and they (others) also knowthat others are smart from their respective view, then everyone will choose 1.

## 4. Stand on Others' Shoes (Series 2)

4.1 Problem. The question is quite simple as stated in thepayoff matrix. We have two players, the first player can move toward Top (T)or Bottom (B), while the second player can move towards Left (L), Center (C)or Right (R). Their payoffs according to action combination are shown below.

4.2 Analysis. We cannot find a dominating strategy for eitherplayer one or player two. However, when player 1 turn T, the best reaction of player 2 should be C; and when player 2 turn B, the best reaction of player 2is L, so that for player two, he/she will not turn R, Let us delete R!

4.3 Formal Notation.

(1). Player: 1, 2
(2). Strategies: s_1, s_2
(3). Payoffs: e.g., u_1(T, C)=11, u_2(B, L)=4
For player two, his/her strategy C(s_2) is strictly dominating strategy R(s_2'), because $\forall s_{-2}$, $u_2(s_2, s_{-2})$ > $u_2(s_2', s_{-2})$.

## 5. Median Voter Theorem (Series 3)

5.1 Problem. Suppose now there are two congressman who want torace for the president. And they can choose one position from 10 possible chairs.Now, all the voters can place their tickets on one place, and the congressman is able to win the vote if that place is closer to him. Also, votes are distributedevenly with respect to each position. If the vote to two congressman are of equaldistance, then they get half and half.

Example. if one congressman stands on Chair 2, and another standson Chair 6. Then the first congressman can get votes from Chair 1, Chair 2, Chair 3, and hald of Chair 4, and the second congressman can get votes from half of Chair 4, Chair 5, Chair 6, ... Chair 10. The race is about 3.5 : 6.5, then the second gentlemanwins.

5.2 Iterative Deletion: we can firstly compare several combination:

(1, 2):
for 1, payoff = 50%
for 2, payoff = 50%
(1, 2):
for 1, payoff = 10%;
for 2, payoff = 10% + 10% + ... + 10% = 90%
(1, 3):
for 1, payoff = 10% + 5% = 15%;
for 3, payoff = 5% + 10% + 10% + ... + 10% = 85%
...
(1, 9):
for 1, payoff = 10% + 10% + 10% + 10% + 5% = 45%
for 9, payoff = 5% + 10% + 10% + 10% + 10% + 10% = 55%
(1, 10):
for 1, payoff = 10% + 10% + 10% + 10% + 10% = 50%
for 10, payoff = 10% + 10% + 10% + 10% + 10% = 50%

5.3 Best Response: the strategy of standing on Chair 1 is a weakly dominated strategy! (Chair 10 is of the same mechaism)By knowing this, two congressmen will not choose Chair 1 or Chair 10, so that there are only 8 positionsleft. Iteratively, when we next delete Chair 2 and Chair 9, then delete Chair 3 and Chair 8 ... Only Chair 5 and Chair 6 will be left. In a nutshell, the center position is more favorable. This resultis found by Downs 1957 in "Political Science" and Hotelling 1929 in "Economics".

## 6. Nothing Dominated (Series 3)

6.1 Problem The problem is easily understood in matrix below. Please find the best Responsefor player 1 and player 2.

6.2 Best Reponse. For player 1, U is the best reponse against l and M is the bestreponse against r, but we cannot find an always winning strategy. We cannot expect our life to beguided under one strategy because it usually turns out just like this game, we cannot find a best action. For either player 1 or player 2, we need to take actions depended on the situations.

6.3 Expected Payoffs. Assume that player 2 do l and r in an equal frequency. For player 1, we can calculate his expected payoffs according to this matrix.

Expected Payoffs of U vs ($\frac12$, $\frac12$): $5\times\frac12 + 0\times\frac12 = \frac52$

Expected Payoffs of M vs ($\frac12$, $\frac12$): $1\times\frac12 + 4\times\frac12 = \frac52$

Expected Payoffs of R vs ($\frac12$, $\frac12$): $4\times\frac12 + 2\times\frac12 = \frac62$

However, in this sense, we still cannot say that R is the best reponse, we can only conclude that R is relatively better in player 2 ($\frac12$, $\frac12$) sistuation. The best way to solvethis issue is to list all the possiblility and pick the best combination if necessary.

format: plain


text:
# Properties

 Label 5040.2.f.f Level 5040 Weight 2 Character orbit 5040.f Analytic conductor 40.245 Analytic rank 0 Dimension 8 CM no Inner twists 2

# Related objects

## Newspace parameters

 Level: $$N$$ = $$5040 = 2^{4} \cdot 3^{2} \cdot 5 \cdot 7$$ Weight: $$k$$ = $$2$$ Character orbit: $$[\chi]$$ = 5040.f (of order $$2$$, degree $$1$$, not minimal)

## Newform invariants

 Self dual: no Analytic conductor: $$40.2446026187$$ Analytic rank: $$0$$ Dimension: $$8$$ Coefficient field: 8.0.7442857984.4 Coefficient ring: $$\Z[a_1, \ldots, a_{17}]$$ Coefficient ring index: $$2^{3}\cdot 3^{4}$$ Twist minimal: no (minimal twist has level 630) Sato-Tate group: $\mathrm{SU}(2)[C_{2}]$

## $q$-expansion

Coefficients of the $$q$$-expansion are expressed in terms of a basis $$1,\beta_1,\ldots,\beta_{7}$$ for the coefficient ring described below. We also show the integral $$q$$-expansion of the trace form.

 $$f(q)$$ $$=$$ $$q - q^{5} + ( 1 + \beta_{6} ) q^{7} +O(q^{10})$$ $$q - q^{5} + ( 1 + \beta_{6} ) q^{7} + ( -\beta_{5} - \beta_{6} ) q^{11} -\beta_{1} q^{13} + \beta_{2} q^{17} + ( \beta_{1} - \beta_{4} ) q^{19} + ( \beta_{1} - \beta_{5} - \beta_{6} ) q^{23} + q^{25} + ( -\beta_{1} + \beta_{5} + \beta_{6} ) q^{29} + ( \beta_{1} + \beta_{5} + \beta_{6} - \beta_{7} ) q^{31} + ( -1 - \beta_{6} ) q^{35} + ( -2 - \beta_{2} + \beta_{5} - \beta_{6} ) q^{37} + ( -\beta_{5} + \beta_{6} ) q^{41} + ( 2 - \beta_{2} ) q^{43} + ( 6 - \beta_{1} - \beta_{2} + 2 \beta_{3} - \beta_{5} + \beta_{6} ) q^{47} + ( 1 - \beta_{1} + \beta_{3} - \beta_{4} + \beta_{6} ) q^{49} + ( -\beta_{1} - \beta_{5} - \beta_{6} ) q^{53} + ( \beta_{5} + \beta_{6} ) q^{55} + ( \beta_{1} - 2 \beta_{3} ) q^{59} + ( \beta_{1} + \beta_{4} - \beta_{7} ) q^{61} + \beta_{1} q^{65} + ( -2 + \beta_{2} - 2 \beta_{5} + 2 \beta_{6} ) q^{67} + ( -\beta_{1} + \beta_{4} ) q^{71} + ( 2 \beta_{5} + 2 \beta_{6} + \beta_{7} ) q^{73} + ( 6 + \beta_{1} - \beta_{3} + \beta_{4} - \beta_{6} ) q^{77} + ( -2 - \beta_{1} - 2 \beta_{2} + 2 \beta_{3} + \beta_{5} - \beta_{6} ) q^{79} + ( -2 \beta_{5} + 2 \beta_{6} ) q^{83} -\beta_{2} q^{85} + ( -2 \beta_{2} - \beta_{5} + \beta_{6} ) q^{89} + ( \beta_{3} + \beta_{4} + \beta_{5} + \beta_{7} ) q^{91} + ( -\beta_{1} + \beta_{4} ) q^{95} + ( 3 \beta_{1} - \beta_{5} - \beta_{6} ) q^{97} +O(q^{100})$$ $$\operatorname{Tr}(f)(q)$$ $$=$$ $$8q - 8q^{5} + 4q^{7} + O(q^{10})$$ $$8q - 8q^{5} + 4q^{7} + 8q^{25} - 4q^{35} - 8q^{37} - 8q^{41} + 16q^{43} + 40q^{47} + 4q^{49} - 32q^{67} + 52q^{77} - 8q^{79} - 16q^{83} - 8q^{89} + 4q^{91} + O(q^{100})$$

Basis of coefficient ring in terms of a root $$\nu$$ of $$x^{8} + 26 x^{6} + 205 x^{4} + 540 x^{2} + 324$$:

 $$\beta_{0}$$ $$=$$ $$1$$ $$\beta_{1}$$ $$=$$ $$($$$$\nu^{7} + 20 \nu^{5} + 73 \nu^{3} - 198 \nu$$$$)/72$$ $$\beta_{2}$$ $$=$$ $$($$$$-\nu^{6} - 16 \nu^{4} - 21 \nu^{2} + 126$$$$)/24$$ $$\beta_{3}$$ $$=$$ $$($$$$\nu^{7} - 6 \nu^{6} + 20 \nu^{5} - 132 \nu^{4} + 73 \nu^{3} - 594 \nu^{2} - 198 \nu + 108$$$$)/144$$ $$\beta_{4}$$ $$=$$ $$($$$$\nu^{7} + 26 \nu^{5} + 187 \nu^{3} + 306 \nu$$$$)/36$$ $$\beta_{5}$$ $$=$$ $$($$$$\nu^{7} - 6 \nu^{6} + 20 \nu^{5} - 132 \nu^{4} + 73 \nu^{3} - 738 \nu^{2} - 54 \nu - 756$$$$)/144$$ $$\beta_{6}$$ $$=$$ $$($$$$\nu^{7} + 6 \nu^{6} + 20 \nu^{5} + 132 \nu^{4} + 73 \nu^{3} + 738 \nu^{2} - 54 \nu + 756$$$$)/144$$ $$\beta_{7}$$ $$=$$ $$($$$$5 \nu^{7} + 112 \nu^{5} + 665 \nu^{3} + 954 \nu$$$$)/72$$
 $$1$$ $$=$$ $$\beta_0$$ $$\nu$$ $$=$$ $$($$$$\beta_{6} + \beta_{5} - \beta_{1}$$$$)/2$$ $$\nu^{2}$$ $$=$$ $$($$$$\beta_{6} - \beta_{5} + 2 \beta_{3} - \beta_{1} - 12$$$$)/2$$ $$\nu^{3}$$ $$=$$ $$($$$$2 \beta_{7} - 13 \beta_{6} - 13 \beta_{5} - 2 \beta_{4} + 7 \beta_{1}$$$$)/2$$ $$\nu^{4}$$ $$=$$ $$($$$$-13 \beta_{6} + 13 \beta_{5} - 34 \beta_{3} + 8 \beta_{2} + 17 \beta_{1} + 120$$$$)/2$$ $$\nu^{5}$$ $$=$$ $$($$$$-38 \beta_{7} + 163 \beta_{6} + 163 \beta_{5} + 50 \beta_{4} - 73 \beta_{1}$$$$)/2$$ $$\nu^{6}$$ $$=$$ $$($$$$187 \beta_{6} - 187 \beta_{5} + 502 \beta_{3} - 176 \beta_{2} - 251 \beta_{1} - 1416$$$$)/2$$ $$\nu^{7}$$ $$=$$ $$($$$$614 \beta_{7} - 2113 \beta_{6} - 2113 \beta_{5} - 854 \beta_{4} + 895 \beta_{1}$$$$)/2$$

## Character values

We give the values of $$\chi$$ on generators for $$\left(\mathbb{Z}/5040\mathbb{Z}\right)^\times$$.

 $$n$$ $$2017$$ $$2801$$ $$3151$$ $$3601$$ $$3781$$ $$\chi(n)$$ $$1$$ $$-1$$ $$1$$ $$-1$$ $$1$$

## Embeddings

For each embedding $$\iota_m$$ of the coefficient field, the values $$\iota_m(a_n)$$ are shown below.

For more information on an embedded modular form you can click on its label.

Label $$\iota_m(\nu)$$ $$a_{2}$$ $$a_{3}$$ $$a_{4}$$ $$a_{5}$$ $$a_{6}$$ $$a_{7}$$ $$a_{8}$$ $$a_{9}$$ $$a_{10}$$
881.1
 1.91681i − 1.91681i − 3.73923i 3.73923i − 2.73923i 2.73923i 0.916813i − 0.916813i
0 0 0 −1.00000 0 −2.27220 1.35539i 0 0 0
881.2 0 0 0 −1.00000 0 −2.27220 + 1.35539i 0 0 0
881.3 0 0 0 −1.00000 0 −0.0951965 2.64404i 0 0 0
881.4 0 0 0 −1.00000 0 −0.0951965 + 2.64404i 0 0 0
881.5 0 0 0 −1.00000 0 1.80230 1.93693i 0 0 0
881.6 0 0 0 −1.00000 0 1.80230 + 1.93693i 0 0 0
881.7 0 0 0 −1.00000 0 2.56510 0.648285i 0 0 0
881.8 0 0 0 −1.00000 0 2.56510 + 0.648285i 0 0 0
 $$n$$: e.g. 2-40 or 990-1000 Embeddings: e.g. 1-3 or 881.8 Significant digits: Format: Complex embeddings Normalized embeddings Satake parameters Satake angles

## Inner twists

Char Parity Ord Mult Type
1.a even 1 1 trivial
21.c even 2 1 inner

## Twists

By twisting character orbit
Char Parity Ord Mult Type Twist Min Dim
1.a even 1 1 trivial 5040.2.f.f 8
3.b odd 2 1 5040.2.f.i 8
4.b odd 2 1 630.2.b.a 8
7.b odd 2 1 5040.2.f.i 8
12.b even 2 1 630.2.b.b yes 8
20.d odd 2 1 3150.2.b.e 8
20.e even 4 1 3150.2.d.c 8
20.e even 4 1 3150.2.d.d 8
21.c even 2 1 inner 5040.2.f.f 8
28.d even 2 1 630.2.b.b yes 8
60.h even 2 1 3150.2.b.f 8
60.l odd 4 1 3150.2.d.a 8
60.l odd 4 1 3150.2.d.f 8
84.h odd 2 1 630.2.b.a 8
140.c even 2 1 3150.2.b.f 8
140.j odd 4 1 3150.2.d.a 8
140.j odd 4 1 3150.2.d.f 8
420.o odd 2 1 3150.2.b.e 8
420.w even 4 1 3150.2.d.c 8
420.w even 4 1 3150.2.d.d 8

By twisted newform orbit
Twist Min Dim Char Parity Ord Mult Type
630.2.b.a 8 4.b odd 2 1
630.2.b.a 8 84.h odd 2 1
630.2.b.b yes 8 12.b even 2 1
630.2.b.b yes 8 28.d even 2 1
3150.2.b.e 8 20.d odd 2 1
3150.2.b.e 8 420.o odd 2 1
3150.2.b.f 8 60.h even 2 1
3150.2.b.f 8 140.c even 2 1
3150.2.d.a 8 60.l odd 4 1
3150.2.d.a 8 140.j odd 4 1
3150.2.d.c 8 20.e even 4 1
3150.2.d.c 8 420.w even 4 1
3150.2.d.d 8 20.e even 4 1
3150.2.d.d 8 420.w even 4 1
3150.2.d.f 8 60.l odd 4 1
3150.2.d.f 8 140.j odd 4 1
5040.2.f.f 8 1.a even 1 1 trivial
5040.2.f.f 8 21.c even 2 1 inner
5040.2.f.i 8 3.b odd 2 1
5040.2.f.i 8 7.b odd 2 1

## Hecke kernels

This newform subspace can be constructed as the intersection of the kernels of the following linear operators acting on $$S_{2}^{\mathrm{new}}(5040, [\chi])$$:

 $$T_{11}^{8} + 52 T_{11}^{6} + 820 T_{11}^{4} + 4320 T_{11}^{2} + 5184$$ $$T_{17}^{4} - 50 T_{17}^{2} + 120 T_{17} - 72$$ $$T_{41}^{4} + 4 T_{41}^{3} - 22 T_{41}^{2} - 24 T_{41} + 72$$ $$T_{47}^{4} - 20 T_{47}^{3} - 22 T_{47}^{2} + 2424 T_{47} - 12024$$

## Hecke Characteristic Polynomials

$p$ $F_p(T)$
$2$ 1
$3$ 1
$5$ $$( 1 + T )^{8}$$
$7$ $$1 - 4 T + 6 T^{2} - 4 T^{3} + 2 T^{4} - 28 T^{5} + 294 T^{6} - 1372 T^{7} + 2401 T^{8}$$
$11$ $$1 - 36 T^{2} + 776 T^{4} - 11916 T^{6} + 146094 T^{8} - 1441836 T^{10} + 11361416 T^{12} - 63776196 T^{14} + 214358881 T^{16}$$
$13$ $$1 - 44 T^{2} + 872 T^{4} - 9828 T^{6} + 102190 T^{8} - 1660932 T^{10} + 24905192 T^{12} - 212379596 T^{14} + 815730721 T^{16}$$
$17$ $$( 1 + 18 T^{2} + 120 T^{3} - 38 T^{4} + 2040 T^{5} + 5202 T^{6} + 83521 T^{8} )^{2}$$
$19$ $$1 - 44 T^{2} + 1256 T^{4} - 31140 T^{6} + 702382 T^{8} - 11241540 T^{10} + 163683176 T^{12} - 2070018764 T^{14} + 16983563041 T^{16}$$
$23$ $$1 - 80 T^{2} + 3740 T^{4} - 123312 T^{6} + 3185414 T^{8} - 65232048 T^{10} + 1046605340 T^{12} - 11842871120 T^{14} + 78310985281 T^{16}$$
$29$ $$1 - 128 T^{2} + 8732 T^{4} - 399744 T^{6} + 13409894 T^{8} - 336184704 T^{10} + 6175977692 T^{12} - 76137385088 T^{14} + 500246412961 T^{16}$$
$31$ $$1 - 32 T^{2} + 572 T^{4} - 21984 T^{6} + 1650310 T^{8} - 21126624 T^{10} + 528254012 T^{12} - 28400117792 T^{14} + 852891037441 T^{16}$$
$37$ $$( 1 + 4 T + 84 T^{2} + 532 T^{3} + 3602 T^{4} + 19684 T^{5} + 114996 T^{6} + 202612 T^{7} + 1874161 T^{8} )^{2}$$
$41$ $$( 1 + 4 T + 142 T^{2} + 468 T^{3} + 8354 T^{4} + 19188 T^{5} + 238702 T^{6} + 275684 T^{7} + 2825761 T^{8} )^{2}$$
$43$ $$( 1 - 8 T + 146 T^{2} - 984 T^{3} + 8842 T^{4} - 42312 T^{5} + 269954 T^{6} - 636056 T^{7} + 3418801 T^{8} )^{2}$$
$47$ $$( 1 - 20 T + 166 T^{2} - 396 T^{3} - 838 T^{4} - 18612 T^{5} + 366694 T^{6} - 2076460 T^{7} + 4879681 T^{8} )^{2}$$
$53$ $$1 - 304 T^{2} + 43772 T^{4} - 3946320 T^{6} + 247218022 T^{8} - 11085212880 T^{10} + 345382134332 T^{12} - 6737965783216 T^{14} + 62259690411361 T^{16}$$
$59$ $$( 1 + 42 T^{2} - 312 T^{3} + 3106 T^{4} - 18408 T^{5} + 146202 T^{6} + 12117361 T^{8} )^{2}$$
$61$ $$1 - 236 T^{2} + 31208 T^{4} - 2804772 T^{6} + 194357422 T^{8} - 10436556612 T^{10} + 432101005928 T^{12} - 12158808349196 T^{14} + 191707312997281 T^{16}$$
$67$ $$( 1 + 16 T + 218 T^{2} + 1728 T^{3} + 15338 T^{4} + 115776 T^{5} + 978602 T^{6} + 4812208 T^{7} + 20151121 T^{8} )^{2}$$
$71$ $$1 - 460 T^{2} + 98600 T^{4} - 12828132 T^{6} + 1106047246 T^{8} - 64666613412 T^{10} + 2505591746600 T^{12} - 58926130603660 T^{14} + 645753531245761 T^{16}$$
$73$ $$1 - 232 T^{2} + 30332 T^{4} - 3074136 T^{6} + 255245510 T^{8} - 16382070744 T^{10} + 861375446012 T^{12} - 35109540499048 T^{14} + 806460091894081 T^{16}$$
$79$ $$( 1 + 4 T + 48 T^{2} + 532 T^{3} + 9470 T^{4} + 42028 T^{5} + 299568 T^{6} + 1972156 T^{7} + 38950081 T^{8} )^{2}$$
$83$ $$( 1 + 8 T + 244 T^{2} + 1800 T^{3} + 27878 T^{4} + 149400 T^{5} + 1680916 T^{6} + 4574296 T^{7} + 47458321 T^{8} )^{2}$$
$89$ $$( 1 + 4 T + 118 T^{2} - 1308 T^{3} - 670 T^{4} - 116412 T^{5} + 934678 T^{6} + 2819876 T^{7} + 62742241 T^{8} )^{2}$$
$97$ $$1 - 208 T^{2} + 38300 T^{4} - 4059696 T^{6} + 468613574 T^{8} - 38197679664 T^{10} + 3390671462300 T^{12} - 173258177025232 T^{14} + 7837433594376961 T^{16}$$


text:
## Elementary and Intermediate Algebra: Concepts & Applications (6th Edition)

$9\times2m$
The phrase 'the product of 9 and twice $m$' is equivalent to multiplying together 9 and $2m$. Therefore, we can translate the phrase algebraically to $9\times2m$, which equals $18m$.


text:
# Lesson 15

Vertex Form

### Problem 1

Select all of the quadratic expressions in vertex form.

A:

$$(x-2)^2 + 1$$

B:

$$x^2 - 4$$

C:

$$x(x+1)$$

D:

$$(x+3)^2$$

E:

$$(x-4)^2 + 6$$

### Solution

For access, consult one of our IM Certified Partners.

### Problem 2

Here are two equations. One defines function $$m$$ and the other defines function $$p$$.

$$m(x)=x(x+6)$$

$$p(x)=(x+3)^2-9$$

1. Show that the expressions defining $$m$$ and $$p$$ are equivalent.
2. What is the vertex of the graph of $$m$$? Explain how you know.
3. What are the $$x$$-intercepts of the graph of $$p$$? Explain how you know.

### Solution

For access, consult one of our IM Certified Partners.

### Problem 3

Which equation is represented by the graph?

A:

$$y=(x-1)^2+3$$

B:

$$y=(x-3)^2+1$$

C:

$$y=\text-(x+3)^2-1$$

D:

$$y=\text-(x-3)^2+1$$

### Solution

For access, consult one of our IM Certified Partners.

### Problem 4

For each equation, write the coordinates of the vertex of the graph that represents the equation.

1. $$y=(x-3)^2 + 5$$
2. $$y=(x+7)^2 + 3$$
3. $$y=(x-4)^2$$
4. $$y=x^2 - 1$$
5. $$y=2(x+1)^2-5$$
6. $$y=\text-2(x+1)^2-5$$

### Solution

For access, consult one of our IM Certified Partners.

### Problem 5

For each function, write the coordinates of the vertex of its graph and tell whether the graph opens up or down.

function coordinates of vertex graph opens up or down?
$$f(x)=(x-4)^2-5$$
$$g(x)=\text-x^2+5$$
$$h(x)=2(x+1)^2-4$$

### Solution

For access, consult one of our IM Certified Partners.

### Problem 6

Here is a graph that represents $$y = x^2$$.

1. Describe what would happen to the graph if the original equation were modified as follows:

1. $$y=\text-x^2$$
2. $$y=3x^2$$
3. $$y=x^2 + 6$$
2. Sketch the graph of the equation $$y=\text-3x^2 + 6$$ on the same coordinate plane as $$y=x^2$$.

### Solution

For access, consult one of our IM Certified Partners.

(From Unit 6, Lesson 12.)

### Problem 7

Noah is going to put \$2,000 in a savings account. He plans on putting the money in an account and leaving it there for 5 years. He can put the money in an account that pays 1% interest monthly, an account that pays 6% interest every six months, or an account that pays 12% interest annually.

Which account will give him the most money in his account at the end of the 5 years?

### Solution

For access, consult one of our IM Certified Partners.

(From Unit 5, Lesson 16.)

### Problem 8

Here are four graphs. Match each graph with a quadratic equation that it represents.

### Solution

For access, consult one of our IM Certified Partners.

(From Unit 6, Lesson 12.)

### Problem 9

The table shows some input and output values of function $$f$$. Describe a possible rule for the function by using words or by writing an equation.

$$x$$ $$f(x)$$
-3 -8
0 -2
4 6
10 18

### Solution

For access, consult one of our IM Certified Partners.

(From Unit 4, Lesson 5.)


text:
SERVING THE QUANTITATIVE FINANCE COMMUNITY

JSHellen
Topic Author
Posts: 13
Joined: July 10th, 2013, 6:42 am

### The Mean Square Limit

Hello everyone,This is officially my first post here!I'm going to start my master studies later this year but I decided to take a head start and read some interesting text books in summer. So it has been almost two years since I completed my calculus courses. I started to skim through and study Wilmott s. QF Vol 1-3 2nd Ed. but it seems that I've forgotten/missed some fundamental properties of finite series. On the page 77 (Chapter 4 (4.9)) the mean square limit is being expanded. I don't quite understand what happens there because this is how I do the expansion and it does not look quite right: my manipulation does not have a double summation.$E[(\sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2 - t)^2]$ (1)$\sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2 = a,t=b$Now if I substitute a and b back to equation (1) I get this:$E[(a-b)^2]=E[a^2-2ab+b^2]=E[\color{blue} {(\sum_{j=1}^{n}(\Delta X)^2)^2} \color{black} -2*t*\sum_{j=1}^{n}(\Delta X)^2+t^2]$This is what it should be:$E[\color{purple}{(\sum_{j=1}^{n}(\Delta X)^4 + \sum_{i=1}^{n}\sum_{j<i}^{ }(X(t_i)-X(t_{i-1})^2(X(t_j)-X(t_{j-1}))^2}-2*t*\sum_{j=1}^{n}(\Delta X)^2+t^2]$ Thanks
Last edited by JSHellen on July 9th, 2013, 10:00 pm, edited 1 time in total.

rolandograndi
Posts: 105
Joined: December 21st, 2012, 7:25 pm

### The Mean Square Limit

Hi guys,I'm also having trouble with the expansion.Can anyone help us?

Ultraviolet
Posts: 1655
Joined: August 15th, 2012, 9:46 am

### The Mean Square Limit

QuoteOriginally posted by: JSHellenHello everyone,This is officially my first post here!I'm going to start my master studies later this year but I decided to take a head start and read some interesting text books in summer. So it has been almost two years since I completed my calculus courses. I started to skim through and study Wilmott s. QF Vol 1-3 2nd Ed. but it seems that I've forgotten/missed some fundamental properties of finite series. On the page 77 (Chapter 4 (4.9)) the mean square limit is being expanded. I don't quite understand what happens there because this is how I do the expansion and it does not look quite right: my manipulation does not have a double summation.$E[(\sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2 - t)^2]$ (1)$\sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2 = a,t=b$Now if I substitute a and b back to equation (1) I get this:$E[(a-b)^2]=E[a^2-2ab+b^2]=E[\color{blue} {(\sum_{j=1}^{n}(\Delta X)^2)^2} \color{black} -2*t*\sum_{j=1}^{n}(\Delta X)^2+t^2]$This is what it should be:$E[\color{purple}{(\sum_{j=1}^{n}(\Delta X)^4 + \sum_{i=1}^{n}\sum_{j<i}^{ }(X(t_i)-X(t_{i-1})^2(X(t_j)-X(t_{j-1}))^2}-2*t*\sum_{j=1}^{n}(\Delta X)^2+t^2]$ Thanks$a^2 = (\sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2)^2 = \sum_{j=1}^{n}(X(t_j)-X(t_{j-1}))^2 \sum_{i=1}^{n}(X(t_i)-X(t_{i-1}))^2$$=\sum_{j=1 (i=j)}^{n}(X(t_j)-X(t_{j-1}))^4 + \sum_{j=1,i\neq j}^{n}(X(t_j)-X(t_{j-1}))^2 (X(t_i)-X(t_{i-1}))^2$$= \sum_{j=1 (i=j)}^{n}(X(t_j)-X(t_{j-1}))^4 + 2 \sum_{j=1,i< j}^{n}(X(t_j)-X(t_{j-1}))^2 (X(t_i)-X(t_{i-1}))^2$I'm guessing that you incorrectly assumed that $a^2 = \sum_{j=1 (i=j)}^{n}(X(t_j)-X(t_{j-1}))^4$ forgetting about $i\neq j$.

rolandograndi
Posts: 105
Joined: December 21st, 2012, 7:25 pm

### The Mean Square Limit

Hi Ultraviolet!Thanks for the help, it is clear for me now! Have a nice sunday!

EZNeo
Posts: 1
Joined: September 7th, 2014, 3:33 pm

### The Mean Square Limit

I've also got an issue with the second part when taking the expectation of delat X ^4. Can anyone elaborate?


text:
### 2014 ALMBS State Primary Election Results

PRECINCTS COUNTED (OF 1) . . . . . 1 100.00
BALLOTS CAST - TOTAL. . . . . . . 334
BALLOTS CAST - NATIONALIST. . . . . 162 48.50
BALLOTS CAST - FEDERALIST . . . . . 172 51.50

********** (NATIONALIST) **********

GOVERNOR
(Vote For Not More Than ) 1
DAMTE LAMONT MCCARROLL JR . . . . . 63 38.89

SECRETARY OF STATE
(Vote For Not More Than ) 1
ANDREW (THE MEAT MAN) BUTCHER. . . . 98 60.49

AUDITOR
(Vote For Not More Than ) 1
JOSEPH ELLIS . . . . . . . . . 106 66.25

TREASURER
(Vote For Not More Than ) 1
MARQUIS SILVER. . . . . . . . . 72 44.44

COMMISSIONER OF AGRICULTURE
(Vote For Not More Than ) 1
MASON H. LEE . . . . . . . . . 48 29.63

ATTORNEY GENERAL
(Vote For Not More Than ) 1
MITCHELL WINKIE . . . . . . . . 100 61.73

JUSTICE OF THE SUPREME COURT
(Vote For Not More Than ) 5
MATTHEW THOMPSON . . . . . . . . 64 8.95
JAMIE ROSE . . . . . . . . . . 78 10.91
JORDAN PETRICE. . . . . . . . . 58 8.11
JAKOB "WEASLEY" HEILMAN. . . . . . 84 11.75
GENE BAILEY. . . . . . . . . . 77 10.77

********** (FEDERALIST) **********

GOVERNOR
(Vote For Not More Than ) 1
SLAMMIN' SAMMY MARTINO . . . . . . 63 36.63

SECRETARY OF STATE
(Vote For Not More Than ) 1
COLIN G. KELLY. . . . . . . . . 66 38.82

AUDITOR
(Vote For Not More Than ) 1
STEVEN CHHABRA. . . . . . . . . 71 41.76

TREASURER
(Vote For Not More Than ) 1
JOHN "COUNTIN STACKS" KOLAR . . . . 55 32.74

COMMISSIONER OF AGRICULTURE
(Vote For Not More Than ) 1
TANNER CARR. . . . . . . . . . 80 47.90

ATTORNEY GENERAL
(Vote For Not More Than ) 1
NOAH MANCUSO . . . . . . . . . 49 28.99

JUSTICE OF THE SUPREME COURT
(Vote For Not More Than ) 5
T.R. MILES . . . . . . . . . . 59 9.13
RICHARD CASTO . . . . . . . . . 85 13.16
MATT "THE VERDICT" MINARD . . . . . 66 10.22
PARAAG "BROWN JUSTICE" GUPTA . . . . 97 15.02
JOSHUA SMART . . . . . . . . . 68 10.53


text:
Coins

harpazo

Pure Mathematics
Banned
A jar contains only nickels, dimes, and quarters. There is at least one of each type of coin in the jar. If the total value of the coins in the jar equals 60 cents, how many quarters are in the jar?

0.25x + 0.05x + 0.10x = 0.60

Correct set up?

MarkFL

La Villa Strangiato
Staff member
Moderator
Math Helper
No, you are assuming there is the same number of each type of coin. What you want is:

$$\displaystyle 25Q+10D+5N=60$$

or

$$\displaystyle 5Q+2D+N=12$$

This is a Diophantine equation, and so even though there are 3 variables and only 1 equation, you can find the possible solutions.

anemone and harpazo

MarkFL

La Villa Strangiato
Staff member
Moderator
Math Helper
By some experimentation, we find the possible solutions:

$$\displaystyle (Q,D,N)=(1,1,5),\,(1,2,3),\,(1,3,1)$$

All 3 possible solutions have 1 quarter in the jar. Now we could simply reason as follows:

We know there must be at least 1 quarter in the jar, and there cannot be 3 or more since that's more than 60 cents. So, there must be 1 or 2. If there are 2, then that leaves 10 cents for the dimes and nickels, but with at least one of each, that's a minimum of 15 cents that must be left over. Thus, there can only be 1 quarter in the jar.

anemone and harpazo

harpazo

Pure Mathematics
Banned
By some experimentation, we find the possible solutions:

$$\displaystyle (Q,D,N)=(1,1,5),\,(1,2,3),\,(1,3,1)$$

All 3 possible solutions have 1 quarter in the jar. Now we could simply reason as follows:

We know there must be at least 1 quarter in the jar, and there cannot be 3 or more since that's more than 60 cents. So, there must be 1 or 2. If there are 2, then that leaves 10 cents for the dimes and nickels, but with at least one of each, that's a minimum of 15 cents that must be left over. Thus, there can only be 1 quarter in the jar.
Can you show the expirementation that was done here?