text:
# Measures of overlap

EcologicalNetworks.overlapFunction
overlap(N::T; dims=dims::Union{Nothing,Integer}=nothing) where {T <: BipartiteNetwork}

Returns the overlap graph for a bipartite network. The dims keyword argument can be 1 (default; overlap between top-level species) or 2 (overlap between bottom-level species). See the documentation for ?overlap for the output format.

source
overlap(N::T; dims::Union{Nothing,Integer}=nothing) where {T <: UnipartiteNetwork}

Returns the overlap graph for a unipartite network. The dims keyword argument can be 1 (overlap based on preys) or 2 (overlap based on predators), or nothing (default; overlap based on both predators and preys). The overlap is returned as a vector of named tuples, with elements pair (a tuple of species names), and overlap (the number of shared interactors). The ordering within the pair of species is unimportant, since overlap graphs are symetrical.

source
EcologicalNetworks.AJSFunction
AJS(N::T; dims::Union{Nothing,Integer}=nothing) where {T <: UnipartiteNetwork}

Additive Jaccard Similarity for pairs of species in the network. AJS varies between 0 (no common species) to 1 (same profiles). This function can be used to measure AJS based on only successors or predecessors, using the dims argument.

Note that this function uses all direct preys and predators to measure the similarity (and so does not go beyond the immediate neighbors).

References

Gao, P., Kupfer, J.A., 2015. Uncovering food web structure using a novel trophic similarity measure. Ecological Informatics 30, 110–118. https://doi.org/10.1016/j.ecoinf.2015.09.013

source
EcologicalNetworks.EAJSFunction
EAJS(N::T; dims::Union{Nothing,Integer}=nothing) where {T <: UnipartiteNetwork}

Extended Additive Jaccard Similarity for pairs of species in the network. AJS varies between 0 (no common species) to 1 (same profiles). This function can be used to measure AJS based on only successors or predecessors, using the dims argument.

Note that this function counts all interactions up to a distance of 50 to define the neighbourhood of a species. This should be more than sufficient for most ecological networks.

References

Gao, P., Kupfer, J.A., 2015. Uncovering food web structure using a novel trophic similarity measure. Ecological Informatics 30, 110–118. https://doi.org/10.1016/j.ecoinf.2015.09.013

source


text:
## Integration by Substitution (H2 Maths Tuition)

This is a 1 page article prepared by me for students to learn how to do Integration by Substitution, a very useful technique that can integrate many functions.

This is especially useful for students taking H2 Maths, as it is one of the two tools for integration. The other is Integration by Parts. SMU First Year Students also have to take a calculus course which includes Integration by Substitution too.

This is also my first time trying out embedding Scribd into WordPress, so that users can view the document on the website itself without downloading anything. 🙂

Print version: Integration by Substitution

Application-oriented introduction relates the subject as closely as possible to science. In-depth explorations of the derivative, the differentiation and integration of the powers of x, and theorems on differentiation and antidifferentiation lead to a definition of the chain rule and examinations of trigonometric functions, logarithmic and exponential functions, techniques of integration, polar coordinates, much more. Clear-cut explanations, numerous drills, illustrative examples. 1967 edition. Solution guide available upon request.

## Why We Use “X” as the Unknown in Math

Why do we use “x” in algebra? Why not “a”, “b” or even “z”?

Find out the answer here: http://gizmodo.com/why-we-use-x-as-the-unknown-in-math-1657254357

Excerpt:

For hundreds of years, x has been the go-to symbol for the unknown quantity in mathematical equations. So who started this practice?

Algebra was born in the Middle East, during the Golden Age of medieval Islamic civilization (750 to 1258 AD), and its early form can be seen in the work of Muhammad Al-Khwarizmi and his 9th century book, Kitab al-jabr wal-muqabala (al-jabr later morphing into algebra in English). During this heyday, Muslim rule and culture had expanded onto the Iberian Peninsula, where the Moors encouraged scholarship in the sciences and math.

So what does this have to do with the letter “x” in math? In a recent TED talk, the director of The Radius Foundation, Terry Moore, posited that the the use of “x” in this way began with the inability of Spanish scholars to translate certain Arabic sounds, including the letter sheen (or shin). According to Moore, the word for “unknown thing” in Arabic is al-shalan, and it appeared many times in early mathematical works. (For example, you might see “three unknown things equals 15,” with the “unknown thing” then being 5.)

But since Spanish scholars had no corresponding sound for “sh,” they went with the “ck” sound, which in classical Greek is written with the chi symbol, X. Moore theorizes, as many others before him have done, that when this was later translated into Latin, the chi (X) was replaced with the more common Latin x. This is similar to how Xmas, meaning Christmas, came about from the common practice of religious scholars using the Greek letter chi (X) as a shorthand for “Christ.”

## Theorem on friends and strangers

Suppose a party has six people. Consider any two of them. They might be meeting for the first time—in which case we will call them mutual strangers; or they might have met before—in which case we will call them mutual acquaintances. The theorem says:

In any party of six people either at least three of them are (pairwise) mutual strangers or at least three of them are (pairwise) mutual acquaintances.

Featured book:

## Very Inspirational Math Video

Just to share a video here:

Very Inspirational Math Video

It is a video of a girl who once did a math quiz and totally blanked out for the whole quiz. However, it turned out that her teacher did not actually ask for the quiz back, and gave her as much time as she wanted to complete the quiz. Under the relaxed circumstances, she completed the quiz and got a ‘C’. (big improvement from totally blank).

Then, she went to UCLA (very good school in US), and became a mathematics major, and wrote the book that is listed below the video!

Truly inspiring. For some kids, too much pressure may result in Math anxiety and totally blank out, while for other kids a little bit of pressure is needed to ensure that they do take studies seriously. Need to find the perfect balance for each child.

**The book the girl above wrote is: Math Doesn’t Suck: How to Survive Middle School Math Without Losing Your Mind or Breaking a Nail

## The Monty Hall Problem

This is the clearest and most interesting explanation of the Monty Hall Problem I have ever seen:

What is the Monty Hall Problem? It is basically a game show with 3 doors. Behind one of the doors is a car, while behind the other two doors are two goats. Most people will want to get the car of course.

The player gets a chance to choose one of the doors. Then, the host will open a door which contains a goat. Now, the player is allowed two choices: either stick to his original choice, or switch to the other unopened door. Which choice is better?

Watch the video to find out!

Mathematicians call it the Monty Hall Problem, and it is one of the most interesting mathematical brain teasers of recent times. Imagine that you face three doors, behind one of which is a prize. You choose one but do not open it. The host–call him Monty Hall–opens a different door, always choosing one he knows to be empty. Left with two doors, will you do better by sticking with your first choice, or by switching to the other remaining door? In this light-hearted yet ultimately serious book, Jason Rosenhouse explores the history of this fascinating puzzle. Using a minimum of mathematics (and none at all for much of the book), he shows how the problem has fascinated philosophers, psychologists, and many others, and examines the many variations that have appeared over the years. As Rosenhouse demonstrates, the Monty Hall Problem illuminates fundamental mathematical issues and has abiding philosophical implications. Perhaps most important, he writes, the problem opens a window on our cognitive difficulties in reasoning about uncertainty.

## Math Handheld Computer Game

Featured Item:

Educational Insights Math Whiz

Is your child disinterested in Math? Looking for some fun and educational Math games?

Math Whiz plays like a video game and teaches like electronic flash cards. This portable ELA quizzes kids on addition, subtraction, multiplication and division, AND works as a full-function calculator at the press of a button. Problems are displayed on the LCD screen. Features eight skill levels, as well as lights and sounds for instant feedback. Two AAA batteries required (not included).

## Chinese Lucky Numbers – Numberphile

8 and 6 are lucky but 4 is unlucky… if you’re Chinese!

Featuring Xiaohui Yuan from the University of Nottingham.

Website: http://www.numberphile.com/

Brady John Haran is an Australian independent film-maker and video journalist who is known for his educational videos and documentary films produced for BBC News and for his YouTube channels. (http://en.wikipedia.org/wiki/Brady_Haran)

Highly recommended to subscribe to Numberphile on Youtube for fun and interesting Math videos!

Featured book:

Number: The Language of Science

Number is an eloquent, accessible tour de force that reveals how the concept of number evolved from prehistoric times through the twentieth century. Tobias Dantzig shows that the development of math—from the invention of counting to the discovery of infinity—is a profoundly human story that progressed by “trying and erring, by groping and stumbling.” He shows how commerce, war, and religion led to advances in math, and he recounts the stories of individuals whose breakthroughs expanded the concept of number and created the mathematics that we know today.

– Rated 4.5/5 on Amazon

## News: Singapore Education Ranked Third in World

 Singapore takes third spot in global education rankings Straits Times Teacher Anthony Tan conducting an English lesson with a class of Primary 6 pupils at Woodlands Primary School. Singapore’s education system has … Singapore offers Saudi Arabia help in education Arab News PROPOSAL: Singapore Senior Minister of State Lee Yi Shyan with Mazen Batterjee, vice chairman of the JCCI, on Wednesday. (AN photo by Irfan … In Singapore, Training Teachers for the ‘Classroom of the Future’ Education Week News Welcome to the Classroom of the Future—a mock-up housed by Singapore’s National Institute of Education (NIE) to demonstrate what learning might … Singapore Polytechnic Assists CDIO Implementation At Malaysia’s Polytechnic Bernama PUTRAJAYA, May 6 (Bernama) — Singapore Polytechnic is assisting Malaysia on the implemention of innovative engineering education framework … Lift education standards: Linfox boss The Australian “Most of our graduates are now coming out of Thailand, Vietnam, Singapore and China because they are just so well educated,” he said. “I can get … In search of education The News International Unless we start investing massively in education, science, technology and innovation, as was done by Singapore, Korea, Malaysia, China and others, … Sultanate, Singapore and the Indian Ocean Oman Daily Observer These are thoughtful words from your education minister (Heng Swee Keat), … a pragmatism which incidentally I believe we share with Singapore. Direct School Admission not meant to lower academic standards TODAYonline In Singapore, there is no compromising a good education. Having a talent does not give a student the licence not to pursue academic excellence. NAFA inspires The Hindu The safe and comfortable cosmopolitan environment Nanyang Academy of Fine Arts, Singapore makes it the perfect destination for education abroad. Japan’s Education Minister visits SMU Perspectives@SMU Singapore Management University (SMU) received a special guest on its campus on 3 May 2014 – Japan’s Minister of Education, Culture, Sports, …

## Monster Group

Check out this Youtube video on the Monster Group (related to Group Theory, a branch in Mathematics)

In the mathematical field of group theory, the monster group M or F1 (also known as the FischerGriess monster, or the Friendly Giant) is a group of finite order. (See Wikipedia: http://en.wikipedia.org/wiki/Monster_group)

Featured book:

The Symmetries of Things

This book is written by John Conway, one of the mathematicians who worked on the Monster Group. Rated highly on Amazon.

Start with a single shape. Repeat it in some way—translation, reflection over a line, rotation around a point—and you have created symmetry.

Symmetry is a fundamental phenomenon in art, science, and nature that has been captured, described, and analyzed using mathematical concepts for a long time. Inspired by the geometric intuition of Bill Thurston and empowered by his own analytical skills, John Conway, with his coauthors, has developed a comprehensive mathematical theory of symmetry that allows the description and classification of symmetries in numerous geometric environments.

This richly and compellingly illustrated book addresses the phenomenological, analytical, and mathematical aspects of symmetry on three levels that build on one another and will speak to interested lay people, artists, working mathematicians, and researchers.

## How to prove square root of 2 is irrational?

A rational number is a number that can be expressed in a fraction with integers as numerators and denominators.

Some examples of rational numbers are 1/3, 0, -1/2, etc. Now, we know that $\sqrt{2}\approx 1.41421\cdots$.

Is the square root of 2 rational? Or is it irrational (the opposite of rational)? How do we prove it? It turns out we can prove that the square root of two is irrational using a technique called proof by contradiction. (One of the earlier posts on this blog also used proof by contradiction to show that there are infinitely many prime numbers.)

First, we suppose that $\displaystyle\sqrt{2}=\frac{p}{q}$, where $\displaystyle\frac{p}{q}$ is a fraction in its lowest terms.

Next, we square both sides to get $\displaystyle 2=\frac{p^2}{q^2}$.

Hence, $2q^2=p^2$. We can conclude that $p^2$ is even since it is a multiple of 2. Thus, $p$ itself is also even. (the square of an odd number is odd).

Thus, we can write $p=2k$ for some integer k. Substituting this back into $2q^2=p^2$, we get $2q^2=4k^2$, which can be simplified to $q^2=2k^2$.

Hence, $q^2$ is also even, and hence $q$ is also even!

But if both $p$ and $q$ are even, then $\displaystyle\frac{p}{q}$ is not in the lowest terms! (we could divide them by two). This contradicts our initial hypothesis!

Thus, the only possible conclusion is that the square root of two is not a rational number to begin with!

Featured book:

Math Jokes 4 Mathy Folks

Who says math can’t be funny? In Math Jokes 4 Mathy Folks, Patrick Vennebush dispels the myth of the humorless mathematician. His quick wit comes through in this incredible compilation of jokes and stories. Intended for all math types, Math Jokes 4 Mathy Folks provides a comprehensive collection of math humor, containing over 400 jokes.

– Highly rated on Amazon.com

## Studies and Studying: How do top students study?

Check out this post by MIT almost perfect-scorer, on how to study. His secret is to study the material in advance, before the lessons even start! This is really a useful strategy, if implemented correctly. Imagine being in Primary 3 and already knowing the Primary 4 syllabus! Primary 3 Math will be a breeze then. This is one of the reasons why China students are so good at Math – they have already studied it back in China, where the Math syllabus is more advanced!

Do try out this strategy if you are really motivated to improve in your studies. The prime time to do this is during the June and December holidays – take some time to read ahead what is going to be learnt during the next semester.

This is an excerpt of the thread:

I graduated from MIT with a GPA of 4.8 (out of 5.0) in mathematics. I had two non-As, both of which were non-math classes.

That doesn’t imply that I have good study methods, but anyway, here’s how I studied at MIT. My main study method as an undergraduate, for math classes, was knowing a sizable chunk of the material in advance.

This isn’t a method that will work for everybody. I did a lot of mathematics outside of the classroom both in high school and at MIT, and I often saw a substantial portion of the material in a given class before I took it. I can’t emphasize enough how much easier this makes a class, and not just for the reasons you might expect: one of the most valuable things you get out of knowing a lot of the material already is just not being intimidated by it. (And you can get this benefit even if you’ve only seen some of the material before and possibly forgotten some of it too.) You’re much more relaxed, and that makes it easier to process the part of the material that you don’t know.

What that translates to in terms of practical advice is this:

• cultivate a sense of curiosity,
• don’t restrict your learning to the classroom,
• only take classes that actually seem really interesting to you, and
• try to learn something related to those classes the semester before.

None of this is advice for studying for a class you’re taking now, but it’s advice for reducing the extent to which you will need to study for classes you’ll take in the future.

– Qiaochu Yuan

## Math News: Math student from Nanyang Technological University detects OAuth, OpenID security vulnerability

Is it safe to log in through well known sites such as Facebook and Google? Think again, for Wang Jing, a PhD student in mathematics at the Nanyang Technological University in Singapore, has detected critical security vulnerabilities in the OAuth, OpenID security protocols. (Source: http://phys.org/news/2014-05-math-student-oauth-openid-vulnerability.html) [Second article in the list below]

Forward this information to your friends via the Tweet button below to warn them of the potential danger!

## Education News Update

 The Straits Times holds its first Education Forum on Sunday Straits Times The Straits Times’ first Education Forum on May 4, 2014, held at the Singapore Management University’s Mochtar Riady Auditorium. — ST PHOTO: … All 300 places at The Straits Times’ first education forum this Sunday taken up Straits Times Mr David Hoe, an undergraduate at the National University of Singapore (NUS), is one of the speakers at the inaugural The Straits Times Education … Many turn up at E Plus International Education fair The Hindu The aspirants evinced keen interest in countries like Holland, Singapore, New … Official boards of all the countries presented seminars on education … Tuition and divorce The Independent Singapore News In September 2013, The Independent Singapore reported on Senior Minister of State for Education Ms Indranee Rajah’s observation on the perceived … NS committee may propose changes to IPPT management TODAYonline SINGAPORE — Suggestions to improve the management of the Individual … Veterans’ League, which was founded to promote National Education. Should India Embrace Socialism, Singapore Style? Businessinsider India This is because the Singapore government only borrows to develop a … What offers a ray of hope to Indian educators is that Singapore’s education … How does one of the top-performing countries in the world think about technology? The Hechinger Report SINGAPORE—Forty students in bright yellow shirts hunched over their … Investments in education technology have been a key part of Singapore’s … Why Indonesian education is in crisis Jakarta Post Does anyone seriously believe “education” in Indonesia is on par with the west, or even Asian countries like Japan, Korea or Singapore? Ask the … Are you getting a little crazy in your classroom? T.H.E. Journal We have asked Dr. Zachary Walker, an assistant professor at the National Institute of Education, Singapore, an American who is traveling the world … GEMS Education eyes expansion in the region Business Times (subscription) GEMS Education, the world’s largest operator of private schools, aims to … from kindergarten to pre-university, will open in Singapore later this year.

# Latest News: Riemann Hypothesis Proved?

Recently, I saw on Arxiv (an online Math journal) that a professor from South-China Normal University, Mingchun Xu, has proved the notoriously difficult Riemann Hypothesis.

Quote: “By using a theorem of Hurwitz for the analytic functions and a theorem due to T.J.Stieltjes and I. Schur, the Riemann Hypothesis has been proved considering the alternating Riemann zeta function. “

More verification is needed to check if it is indeed a proof.

In 1859, Bernhard Riemann, a little-known thirty-two year old mathematician, made a hypothesis while presenting a paper to the Berlin Academy titled  “On the Number of Prime Numbers Less Than a Given Quantity.”  Today, after 150 years of careful research and exhaustive study, the Riemann Hyphothesis remains unsolved, with a one-million-dollar prize earmarked for the first person to conquer it.

Rated: 4.5 stars on Amazon

## SG Education News: Even Saudis are learning Singapore way of Teaching

 Saudis learning the Singapore way of teaching Straits Times Since last October, the National Institute of Education (NIE) has taken leadership trainers from the kingdom under its wing, training them in curriculum … All 300 places at The Straits Times’ first education forum this Sunday taken up Straits Times Mr David Hoe, an undergraduate at the National University of Singapore (NUS), is one of the speakers at the inaugural The Straits Times Education … Singapore Plows Ahead of US With Tech in Schools NBCNews.com In the late 1990s, the Singapore Ministry of Education unveiled its master plan for technology. The first phase was spent building up infrastructure and … Govt mulls more recognition for NSmen in housing, health, education Channel News Asia SINGAPORE: More recognition could be given to National Servicemen (NSmen) in areas such as housing, healthcare and education. Defence … Singapore to beef up nuclear technology expertise Channel News Asia Singapore is beefing up its nuclear technology expertise with a newly-announced programme. The 10-year Nuclear Safety Research and Education … Many turn up at E Plus International Education fair The Hindu The aspirants evinced keen interest in countries like Holland, Singapore, New … Official boards of all the countries presented seminars on education … AWARE’s pushback on more benefits for NSmen ignites debate TODAYonline SINGAPORE — The Government’s plan to enhance housing, healthcare and education benefits for operationally ready national servicemen has …

# Can Monkeys do advanced Math?

 Math wiz monkeys providing researchers with insights into human brain activity Fox News Monkeys trained to solve math problems are providing researchers with new insights into understanding a human learning disability in which children … Math and Science Pay, But High Schoolers Care Less Wall Street Journal (blog) Math and science are the peas and carrots of the jobs market: great for a career future, but resolutely unpopular with the young. Even amid a relatively … Math wrath in Pincher Creek? Pincher Creek Echo Protesters gather during a rally to support a petition calling for math curriculum reform at the Alberta Legislature Building in Edmonton, Alta., … Monkey Math and Other Number-Crunching Critters Discovery News Rhesus monkeys are able to perform math at an advanced level, reports a study this week from Harvard Medical Medical school. The monkeys were … Math department wins national award for exemplary program The Williams record According to Susan Loepp, professor of mathematics, the College’s department is unique in several regards. “Everyone likes math even if they don’t … From math failure to savant: How a mugging made a numbers whiz CTV News Padgett describes the brutal bar attack and his subsequent transformation into a math savant in his new book, Struck by Genius: How a Brain Injury …

## Are you finding Elementary Maths (E Maths) or Additional Maths (A Maths) Difficult?

Do not be discouraged if you find E Maths or A Maths difficult. The main reason why you are finding it to be difficult is that it is new. You have not gotten enough exposure to the type of questions asked. It is like learning to ride a bicycle, at the start it is difficult and you may even fall down. But after you have mastered riding the bicycle, you will be able to ride as fast as you wish. You need to get over the initial difficulty of learning in order to master the art of riding the bicycle.

At our Group Tuition at Bishan, we constantly practice actual exam questions, be it on Trigonometry, Differentiation or Integration (A Maths), or Vectors, Matrices and Probability (E Maths). We learn different methods to check and do the questions. You will find out, at last, that once you master the art of solving O Level questions, all the O Level questions are just repackaging the same questions in different forms. Once you know how to do one question, you will know how to do all similar questions. Expanding your repertoire of questions you know will enable you to get that coveted “A”. Constant practice, as opposed to cramming one month before the O Levels, is absolutely necessary to avoid panic and to consolidate our Mathematical memory.

Some Math formulas like the quotient rule, $\displaystyle\frac{d}{dx}(\frac{u}{v})=\frac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}$, you will automatically memorize it once you have done enough practice.

In the end, you may even find that E Maths or A Maths is easy!

## Motivational Story to motivate you

THE OBSTACLE IN OUR PATH
In ancient times, a king had a boulder placed on a roadway. Then he hid himself and watched to see if anyone would remove the huge rock. Some of the king’s wealthiest merchants and courtiers came by and simply walked around it.

Many loudly blamed the king for not keeping the roads clear, but none did anything about getting the big stone out of the way. Then a peasant came along carrying a load of vegetables. On approaching the boulder, the peasant laid down his burden and tried to move the stone to the side of the road. After much pushing and straining, he finally succeeded. As the peasant picked up his load of vegetables, he noticed a purse lying in the road where the boulder had been. The purse contained many gold coins and a note from the king indicating that the gold was for the person who removed the boulder from the roadway. The peasant learned what many others never understand.

Every obstacle presents an opportunity to improve one’s condition.

## How to Find Asymptotes of Graphs

This post is all about finding  Vertical and Horizontal asymptotes of graphs.

## Vertical Asymptotes

Usually, vertical asymptotes come about when there is a rational function with a numerator and a denominator, for instance, $\displaystyle y=\frac{2}{x-3}$. When the denominator is 0, the function is undefined, and hence there is a vertical asymptote there.

Hence, to find the asymptote, let the denominator be 0. E.g. $x-3=0$, so $x=3$.

Another way vertical asymptotes can come about is via logarithmic graphs, e.g. $y=\ln (x+2)$.

$\ln 0$ is undefined, so when $x+2=0$ or $x=-2$, there will be a vertical asymptote at $x=-2$.

## Horizontal Asymptote

Horizontal asymptotes usually come about when one of the terms approaches zero as $x$ approaches infinity.

To find the Horizontal Asymptote, find the value of y when x approaches infinity (i.e. when x becomes a very big number).

For example, $\displaystyle y=\frac{1}{x}+1$. When x is a very big number, say x=10000, y will be close to 1 since 1/10000 is almost zero. Hence, the horizontal asymptote is $y=1$.

Another time where Horizontal Asymptotes appear is for Exponential Graphs. For instance, $y=e^{-x}+1$. When x is very large, $e^{-x}$ will be very small, and hence $y$ approaches 1. This means that the Horizontal Asymptote will be $y=1$.

Note: The graphs above were drawn using the software Geogebra. 🙂

Model-Centered Learning: Pathways to Mathematical Understanding Using GeoGebra

# Is it possible for Good Friday to fall on the 13th?

Source: http://mathforum.org/library/drmath/view/52364.html
From: Susan Melanson
Subject: Good Friday on the Thirteenth

How many times has Good Friday fallen on the 13th? I have looked at
your formulas and don’t seem to find one that fits this question,
since Good Friday doesn’t fall on the same date each year. I’ve looked
at some other sources as well, to no avail.

Thanks for your help on this,
Susan Melanson

Check out the above website for the answer! It turns out that Good Friday will fall on the 13th approximately once in 29 years.

Wishing all Christians a blessed Good Friday.

Also check out this Wikipedia page on how to calculate the date of Easter (http://en.wikipedia.org/wiki/Date_of_Easter)

The calculation of the date of Easter is called Computus. It turns out calculating the date of Easter is quite complicated. Even the great Mathematician Gauss made a mistake (see http://en.wikipedia.org/wiki/Date_of_Easter#Gauss_algorithm).

In 1800, the mathematician Carl Friedrich Gauss presented this algorithm for calculating the date of the Julian or Gregorian Easter[38][39] and made corrections to one of the steps in 1816.[40] In 1800 he incorrectly stated p = floor (k/3). In 1807 he replaced the condition (11M + 11) mod 30 < 19 with the simpler a > 10. In 1811 he limited his algorithm to the 18th and 19th centuries only, and stated that 26 April is always replaced with 19 April and 25 April by 18 April. In 1816 he thanked his student Peter Paul Tittel for pointing out that p was wrong in 1800.[41]

# How to use Math to calculate Chinese Zodiac and Impress your Friends

The Shengxiao (Chinese: 生肖, literally “birth likeness”), also known in English as the Chinese zodiac (“zodiac” derives from the similar concept in Western Astrology and means “circle of animals”), is a scheme and systematic plan of future action, that relates each year to an animal and its reputed attributes, according to a 12-year cycle. It remains popular in several East Asian countries, such as China, Vietnam, Korea and Japan. (Wikipedia: Chinese Zodiac)

## Simple Mental Calculation: Years after 1900

1. Subtract 1900 from the year you are finding. E.g. 1988-1900=88
2. Divide your answer by 12 and find the remainder. E.g. 88/12=7R4
4. The answer represents the Chinese Zodiac of that year! (1-Rat 鼠, 2-Ox 牛, 3-Tiger 虎, 4-Rabbit 兔, 5-Dragon 龙, 6-Snake 蛇, 7-Horse 马, 8-Goat 羊, 9-Monkey 猴, 10-Rooster 鸡, 11-Dog 狗, 12-Pig 猪) Hence, 1988 is the Year of the Dragon, since 5 represents Dragon.

## Calculation for Years after 2000

Very similar to the above, with some slight changes.

1. Subtract 2000 from the year you are finding. E.g. 2015-2000=15
2. Divide your answer by 12 and find the remainder. E.g. 15/12=1R3
4. The answer represents the Chinese Zodiac of that year! (1-Rat, 2-Ox, 3-Tiger, 4-Rabbit, 5-Dragon, 6-Snake, 7-Horse, 8-Goat, 9-Monkey, 10-Rooster, 11-Dog, 12-Pig) Hence, 2015 is the Year of the Goat, since 8 represents Goat.

## Chinese Zodiac List

Test your new skills and check the Chinese Zodiac for the following years from 1900 to 2100!

You may also refer to the table at: http://www.prokerala.com/general/calendar/chinese-years.php

Year 1900: Rat
Year 1901: Ox
Year 1902: Tiger
Year 1903: Rabbit
Year 1904: Dragon
Year 1905: Snake
Year 1906: Horse
Year 1907: Goat
Year 1908: Monkey
Year 1909: Rooster
Year 1910: Dog
Year 1911: Pig
Year 1912: Rat
Year 1913: Ox
Year 1914: Tiger
Year 1915: Rabbit
Year 1916: Dragon
Year 1917: Snake
Year 1918: Horse
Year 1919: Goat
Year 1920: Monkey
Year 1921: Rooster
Year 1922: Dog
Year 1923: Pig
Year 1924: Rat
Year 1925: Ox
Year 1926: Tiger
Year 1927: Rabbit
Year 1928: Dragon
Year 1929: Snake
Year 1930: Horse
Year 1931: Goat
Year 1932: Monkey
Year 1933: Rooster
Year 1934: Dog
Year 1935: Pig
Year 1936: Rat
Year 1937: Ox
Year 1938: Tiger
Year 1939: Rabbit
Year 1940: Dragon
Year 1941: Snake
Year 1942: Horse
Year 1943: Goat
Year 1944: Monkey
Year 1945: Rooster
Year 1946: Dog
Year 1947: Pig
Year 1948: Rat
Year 1949: Ox
Year 1950: Tiger
Year 1951: Rabbit
Year 1952: Dragon
Year 1953: Snake
Year 1954: Horse
Year 1955: Goat
Year 1956: Monkey
Year 1957: Rooster
Year 1958: Dog
Year 1959: Pig
Year 1960: Rat
Year 1961: Ox
Year 1962: Tiger
Year 1963: Rabbit
Year 1964: Dragon
Year 1965: Snake
Year 1966: Horse
Year 1967: Goat
Year 1968: Monkey
Year 1969: Rooster
Year 1970: Dog
Year 1971: Pig
Year 1972: Rat
Year 1973: Ox
Year 1974: Tiger
Year 1975: Rabbit
Year 1976: Dragon
Year 1977: Snake
Year 1978: Horse
Year 1979: Goat
Year 1980: Monkey
Year 1981: Rooster
Year 1982: Dog
Year 1983: Pig
Year 1984: Rat
Year 1985: Ox
Year 1986: Tiger
Year 1987: Rabbit
Year 1988: Dragon
Year 1989: Snake
Year 1990: Horse
Year 1991: Goat
Year 1992: Monkey
Year 1993: Rooster
Year 1994: Dog
Year 1995: Pig
Year 1996: Rat
Year 1997: Ox
Year 1998: Tiger
Year 1999: Rabbit
Year 2000: Dragon
Year 2001: Snake
Year 2002: Horse
Year 2003: Goat
Year 2004: Monkey
Year 2005: Rooster
Year 2006: Dog
Year 2007: Pig
Year 2008: Rat
Year 2009: Ox
Year 2010: Tiger
Year 2011: Rabbit
Year 2012: Dragon
Year 2013: Snake
Year 2014: Horse
Year 2015: Goat
Year 2016: Monkey
Year 2017: Rooster
Year 2018: Dog
Year 2019: Pig
Year 2020: Rat
Year 2021: Ox
Year 2022: Tiger
Year 2023: Rabbit
Year 2024: Dragon
Year 2025: Snake
Year 2026: Horse
Year 2027: Goat
Year 2028: Monkey
Year 2029: Rooster
Year 2030: Dog
Year 2031: Pig
Year 2032: Rat
Year 2033: Ox
Year 2034: Tiger
Year 2035: Rabbit
Year 2036: Dragon
Year 2037: Snake
Year 2038: Horse
Year 2039: Goat
Year 2040: Monkey
Year 2041: Rooster
Year 2042: Dog
Year 2043: Pig
Year 2044: Rat
Year 2045: Ox
Year 2046: Tiger
Year 2047: Rabbit
Year 2048: Dragon
Year 2049: Snake
Year 2050: Horse
Year 2051: Goat
Year 2052: Monkey
Year 2053: Rooster
Year 2054: Dog
Year 2055: Pig
Year 2056: Rat
Year 2057: Ox
Year 2058: Tiger
Year 2059: Rabbit
Year 2060: Dragon
Year 2061: Snake
Year 2062: Horse
Year 2063: Goat
Year 2064: Monkey
Year 2065: Rooster
Year 2066: Dog
Year 2067: Pig
Year 2068: Rat
Year 2069: Ox
Year 2070: Tiger
Year 2071: Rabbit
Year 2072: Dragon
Year 2073: Snake
Year 2074: Horse
Year 2075: Goat
Year 2076: Monkey
Year 2077: Rooster
Year 2078: Dog
Year 2079: Pig
Year 2080: Rat
Year 2081: Ox
Year 2082: Tiger
Year 2083: Rabbit
Year 2084: Dragon
Year 2085: Snake
Year 2086: Horse
Year 2087: Goat
Year 2088: Monkey
Year 2089: Rooster
Year 2090: Dog
Year 2091: Pig
Year 2092: Rat
Year 2093: Ox
Year 2094: Tiger
Year 2095: Rabbit
Year 2096: Dragon
Year 2097: Snake
Year 2098: Horse
Year 2099: Goat
Year 2100: Monkey

## Mathematicians to find MH370 Debris?

Australian authorities have announced that satellite images taken of a stretch of ocean 1,550 miles southwest of Perth, Australia, are believed to show floating debris that could be part of missing Malaysia Airlines Flight 370. “It is probably the best lead we have right now,” said John Young, a spokesman for the Australian Maritime Safety Authority. Confirmation of the material’s provenance will likely have to wait, however. While a merchant vessel has arrived in the area to help with the search, poor visibility has prevented search aircraft from locating the debris, and the nearest Australian Navy ship is several days’ sail away.

The search for Air France 447 offers a useful template for how investigators can whittle away at the seemingly unsolvable mystery of a midocean airliner disappearance. After the Airbus A330 went missing over the middle of the equatorial Atlantic in 2009, search aircraft took just one day to locate the first pieces of floating wreckage. The recovery of the black box, however, took another painstaking two years, and a full assessment of its implications another year after that.

The first step after determining the debris’ location is to call in the mathematicians. Based on all the data available—the aircraft’s last known position, route of flight, altitude, prevailing winds, sea currents, ocean depth, and so on—a probability is assigned to each variable, and a distribution map of probable locations on the sea floor is generated. Searchers can then deploy their underwater assets to scour the vastness of the deep, working back and forth along grid lines laid out in the areas of maximum probability.

There’s a deep problem inherent in this approach, however, and it’s that the probabilities are themselves only guesses. Searchers are uncertain even as to the extent of their own uncertainty. In the case of Air France 447, the set of base-set assumptions turned out to be wrong, and the first two search seasons scoured thousands of square miles in vain.

What turned the tide for AF447 searchers, in the end, was better math and better undersea technology. A recalculation of the location probabilities using a different mathematical approach led to the redrawing of the search grids much closer to the site of the plane’s disappearance. And a new type of autonomous undersea vehicle—a robot sub, in other words—became available for the first time. Called Remus 6000, these subs were able to navigate on their own along precise grid lines, ascending and diving to match the contours of the undersea terrain. On April 3, 2011, less than a week after the refined search began, one of the three submersibles deployed in the search returned to its mother ship bearing images of a debris field scattered across an abyssal plain. AF447 had been found. A month later another type of unmanned submersible brought the black boxes to the surface.

# Math in Nature Video (3 million views!)

A movie inspired on numbers, geometry and nature, by Cristóbal Vila. One of the most popular Math videos on Youtube.

In this video, you can see how Fibonacci Numbers, the Golden Ratio, and Fractals are often found in nature.

## Foot of Perpendicular is a hot topic for H2 Prelims and A Levels. It comes out almost every year.

There are two versions of Foot of Perpendicular, from point to line, and from point to plane. However, the two are highly similar, and the following article will teach how to understand and remember them.

## H2: Vectors (Foot of perpendicular)

From point (B) to Line ( $l$)

(Picture)

### Equation (I):

Where does F lie? F lies on the line  $l$.

$\overrightarrow{\mathit{OF}}=\mathbf{a}+\lambda \mathbf{m}$

### Equation (II):

Perpendicular:

$\overrightarrow{\mathit{BF}}\cdot \mathbf{m}=0$

$(\overrightarrow{\mathit{OF}}-\overrightarrow{\mathit{OB}})\cdot \mathbf{m}=0$

### Final Step

Substitute Equation (I) into Equation (II) and solve for  $\lambda$.

## Example:

[CJC 2010 P1Q7iii]

Relative to the origin $O$ , the points $A$ , $B$ and $C$  have position vectors  $\left(\begin{matrix}1\\2\\1\end{matrix}\right)$ , $\left(\begin{matrix}2\\1\\3\end{matrix}\right)$ and $\left(\begin{matrix}-1\\2\\3\end{matrix}\right)$ Find the shortest distance from  $C$ to $\mathit{AB}$ . Hence or otherwise, find the area of triangle $\mathit{ABC}$ .

[Note: There is a 2nd method to this question. (cross product method)]

## Solution:

Let the foot of perpendicular from C to AB be F.

Equation (I):

$\overrightarrow{\mathit{OF}}=\overrightarrow{\mathit{OA}}+\lambda \overrightarrow{\mathit{AB}}=\left(\begin{matrix}1+\lambda \\2-\lambda \\1+2\lambda \end{matrix}\right)$

Equation (II):

$(\overrightarrow{\mathit{OF}}-\overrightarrow{\mathit{OC}})\cdot \overrightarrow{\mathit{AB}}=0$

$\left(\begin{matrix}2+\lambda \\-\lambda \\-2+2\lambda \end{matrix}\right)\cdot \left(\begin{matrix}1\\-1\\2\end{matrix}\right)=0$

$\lambda =\frac{1}{3}$

$\overrightarrow{\mathit{CF}}=\overrightarrow{\mathit{OF}}-\overrightarrow{\mathit{OC}}=\left(\begin{matrix}2\frac{1}{3}\\-{\frac{1}{3}}\\-1\frac{1}{3}\end{matrix}\right)$

$\left|{\overrightarrow{{\mathit{CF}}}}\right|=\sqrt{\frac{22}{3}}$

Area of  $\Delta \mathit{ABC}=\frac{1}{2}\left|{\overrightarrow{\mathit{AB}}}\right|\left|{\overrightarrow{\mathit{CF}}}\right|=\sqrt{11}$

For the next part, please read our article on Foot of Perpendicular (from point to plane).

## H2 Maths Tuition

If you are looking for Maths Tuition, contact Mr Wu at:

Email: mathtuition88@gmail.com

format: plain


text:
# Time-Out Period

When the WDTCPS Configuration bits are set to the default value of ‘b11111, the PS bits set the time-out period from 1 ms to 256 seconds (nominal). If any value other than the default value is assigned to the WDTCPS Configuration bits, then the timer period will be based on the WDTCPS Configuration bits. After a Reset, the default time-out period is 2s.


text:
## anonymous one year ago this one should be some what fun Water flows into a tank according to the rate F(t) = (6 + t)/(1 + t), and at the same time empties out at the rate E(t) = (ln(t+2))/(t+1) , with both F(t) and E(t) measured in gallons per minute. How much water, to the nearest gallon, is in the tank at time t = 10 minutes. You must show your setup but can use your calculator for all evaluations.

1. ganeshie8

2. anonymous

do i just evaluate both functions at t =10 and then subtract f(10) - E(10)? and Id assume the tank was empty i wasn't given anymore information

3. IrishBoy123

$$\frac{dV}{dt} = F(t) - E(t)$$

4. IrishBoy123

build and solve integral

5. anonymous

$\int\limits \frac{ (t+6)-(\ln(t+2)) }{ (t+1) }$?

6. ganeshie8

Looks good, but that wont evaluate into elementary functions so you may simply use wolfram http://www.wolframalpha.com/input/?i=%5Cint_0%5E%2810%29+%5Cfrac%7B+%28t%2B6%29-%28%5Cln%28t%2B2%29%29+%7D%7B+%28t%2B1%29+%7D

7. anonymous

:( i was hoping it would be more complicated

8. ganeshie8

evaluating it is complicated indeed but i think you should not waste time messing with special functions at this point..

9. anonymous

yeah your probably right , anyway thanks once again

10. ganeshie8

np

11. ganeshie8

maybe just double check the problem has no typoes because usually you should expect to see easily workable integrals in these type of problems.. the focus should be on setting up the integral, not evaluating it..

12. anonymous

okay one second,

13. anonymous

all seems clear to me , do you see anything out of place ?

14. ganeshie8

integral becomes easy if E(t) is like below : $$E(t) = (\ln(t+\color{red}{1}))/(t+1)$$

15. anonymous

nope triple checked its t + 2

16. ganeshie8

then we're good, nearest to gallon, the water in the tank is 18 gallon at t = 10

17. anonymous

@ganeshie8 can i ask you something?

18. ganeshie8

19. anonymous

why are you so helpfull? im serious you clearly are on a higher level of math, why do you keep helping people with silly linear calculus I problems, you couldn't possibly be learning anything and i'm sure your own work keeps you busy you have infinity medals what keeps you here ?

20. ganeshie8

Haha thanks for the good words! But you have no idea, I suck at math, thats the only reason I'm still here ;p

21. anonymous

god , i must be truly awful then

22. ganeshie8

I think you're doing great!

23. anonymous

:)


text:
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# Compound Inequalities

## Multiple inequalities associated by 'and' and 'or' statements

0%
Progress
Practice Compound Inequalities
Progress
0%
Compound Inequalities

Mr. Garcia, the Spanish teacher, announces that the students' final grades will consist of 40% projects (0-100 score). The remaining 60% (0-100) will come from the final exam. Going into the final exam, Madison has an 84 in the project score. Within what grade range must she fall on the final exam to raise her score to an A (90-100 overall score)?

### Guidance

Compound inequalities are inequalities that have been joined by the words “and” or “or.” For example:

$-2 Read, “ $x$ is greater than -2 and less than or equal to 5.”

$x \ge 3$ or $x<-4$ Read, “ $x$ is greater than or equal to 3 or less than -4.”

Notice that both of these inequalities have two inequality signs. So, it is like solving or graphing two inequalities at the same time. When graphing, look at the inequality to help you. The first compound inequality above, $-2 , has the $x$ in between -2 and 5, so the shading will also be between the two numbers.

And, with the “or” statement, the shading will go in opposite directions.

#### Example A

Write the inequality statement given by the graph below.

Solution: Because the shading goes in opposite directions, we know this is an “or” statement. Therefore, the statement is $x<-2$ or $x>1$ .

#### Example B

Solve and graph $-3<2x+5 \le 11$ .

Solution: This is like solving two inequalities at the same time. You can split the statement apart to have two inequalities, $-3<2x+5$ and $2x+5\le 11$ and solve. You can also leave the compound inequality whole to solve.

$& -3<2x+\bcancel{5} \le 11\\& \underline{\ -5 \qquad \ -\bcancel{5} \ \ -5}\\& \frac{-8}{2}< \frac{\bcancel{2}x}{\bcancel{2}} \le \frac{6}{2}\\& -4

Test a solution, $x = 0:$

$-3<2(0)+5 & \le 11\\-3<5 & \le 11$

Here is the graph:

#### Example C

Solve and graph $-32>-5x+3$ or $x-4 \le 2$ .

Solution: When solving an “or” inequality, solve the two inequalities separately, but show the solution on the same number line.

$& -32 > -5x + \bcancel{3} \ or \ x- \bcancel{4} \le 2\\& \underline{\ -3 \quad \ \qquad -\bcancel{3}} \quad \quad \underline{\ +\bcancel{4} \ +4}\\& \frac{-35}{-5} > \frac{-\bcancel{5}x}{-\bcancel{5}} \qquad \qquad \quad x \le 6\\& \quad \ 7

Notice that in the first inequality, we had to flip the inequality sign because we divided by -5. Also, it is a little more complicated to test a solution for these types of inequalities. You still test one point, but it will only work for one of the inequalities. Let’s test $x = 10$ . First inequality: $-32>-5(10)+3 \rightarrow -32>-47$ . Second inequality: $10-4 \le 2 \rightarrow 5 \cancel{\le} 2$ . Because $x = 10$ works for the first inequality, is a solution. Here is the graph.

Intro Problem Revisit Writing the grading as an expression, we get $0.4(84) + 0.6x$ where x is the final exam score. Madison wants to get an A, so we will have a compound inequality that ranges between 90 and 100.

$90 \le 33.6 + 0.6x \le 100 \\56.4 \le 0.6x \le 66.4 \\94 \le x \le 110.67$

Unless Mr. Garcia offers extra credit, Madison can't score higher than 100. So, she has to score at least 94 or more, up to 100, to get an A.

### Guided Practice

1. Graph $-7 \le x \le -1$ on a number line.

Solve the following compound inequalities and graph.

2. $5 \le - \frac{2}{3}x+1 \le 15$

3. $\frac{x}{4}-7>5$ or $\frac{8}{5}x+2\le 18$

1. This is an “and” inequality, so the shading will be between the two numbers.

2. Solve this just like Example B.

$& \ \ 5 \le - \frac{2}{3}x+ \bcancel{1} \le 15\\& \underline{-1 \qquad \quad \ \ -\bcancel{1} \ \ -1}\\& \qquad \ 4 \le - \frac{2}{3}x \le 14\\& -\frac{3}{2} \left(4 \le -\frac{2}{3}x \le 14\right)\\& \quad \ \ -6 \ge x \ge -21$

Test a solution, $x = -10:$

$5 \le - \frac{2}{3}(-12)+1 \le 15\\5 \le 9 \le 15$

This solution can also be written $-21 \le x \le -6$ .

The graph is:

3. This is an “or” compound inequality. Solve the two inequalities separately.

$& \frac{x}{4}- \bcancel{7} > 5 \quad \quad or \quad \ \frac{8}{5}x+ \bcancel{2} \le 18\\& \underline{\ \ + \bcancel{7} \ +7 \; \; \; \; \; \;} \qquad \underline{\qquad \ - \bcancel{2} \ \ -2 \; \; \; \;}\\& \ \bcancel{4} \cdot \frac{x}{4} > 12 \cdot 4 \ or \quad \ \xcancel{\frac{5}{8} \cdot \frac{8}{5}}x \le 16 \cdot \frac{5}{8}\\& \ \quad \ x > 48 \quad \ \ or \qquad \quad \ \ x \le 10$

Test a solution, $x = 0:$

$& \frac{0}{4} -7 > 5 \ \ or \ \frac{8}{5}(0)+2 \le 18\\& \ \ -7 \ \bcancel{\ge} \ 5 \ \ or \qquad \quad \ 2 \le 18$

Notice that $x = 0$ is a solution for the second inequality, which makes it a solution for the entire compound inequality. Here is the graph:

On problems 2 and 3 we changed the scale of the number line to accommodate the solution.

### Explore More

Graph the following compound inequalities. Use an appropriate scale.

1. $-1 < x < 8$
2. $x > 5$ or $x \le 3$
3. $-4 \le x \le 0$

Write the compound inequality that best fits each graph below.

Solve each compound inequality and graph the solution.

1. $-11 < x -9 \le 2$
2. $8 \le 3 -5x < 28$
3. $2x-7 > -13$ or $\frac{1}{3}x+5 \le 1$
4. $0 < \frac{x}{5} < 4$
5. $-4x+9<35$ or $3x-7 \le -16$
6. $\frac{3}{4}x+7 \ge -29$ or $16 - x > 2$
7. $3 \le 6x -15 < 51$
8. $-20 < - \frac{3}{2}x+1 < 16$
9. Challenge Write a compound inequality whose solutions are all real numbers. Show why this is true.


text:
occasional meanderings in physics' brave new world

Name:
Location: New Zealand

Marni D. Sheppeard

## Thursday, June 14, 2007

### M Theory Lesson 68

Matti Pitkanen now has a post about Farey sequences and the Riemann hypothesis in TGD. The idea that the hypothesis is not provable within standard mathematics appears to be gaining a foothold within physical constructions.

On the other hand, it is possible that the physical axioms could guide a concrete proof within a convenient model, such as the Jordan algebra M Theory, in which U duality is algebraically manifest. But the zeta function itself only enters here with the (operad) algebras associated to moduli integrals. So it is difficult to avoid the higher categorical framework in studying exact (eg. MHV) amplitudes, and this lands us back in the world of post ZF axioms.

After inhabiting this world for some time, it becomes difficult to look at zeta functions any other way. One simply can't help looking at the Selberg axioms and thinking of closure under products, or factorisation, as topos-like axioms, even though these are radically different things. Recall that the interplay of + and x here is thought of as a higher distributive law for monads. This suggests that the Euler relation for zeta functions is about equating invariants based on monads, or rather that the distributivity $+ \times \rightarrow \times +$ is an identity. That is, that the distributivity of complex arithmetic is somehow more responsible for Euler's product relation than the notion of primeness, which is used through the application of the fundamental theorem of arithmetic only after the product has been expanded.

This suggests that the higher dimensional versions of the Riemann zeta function should be thought of as non-commutative, non-associative and even non-distributive L-functions. Ah! So that's why Goncharov likes Shimura varieties. Note that such considerations are necessary for understanding even the values of the Riemann function, since its arguments extend throughout the heirarchy.

Update: Khalkhali has a new post on Determinants and Traces in which he notes: "... Bost and Connes in their paper Hecke algebras, type III factors and phase transitions with spontaneous symmetry breaking in number theory, Selecta Math. (N.S.) 1 (1995), no. 3, 411--457, right in the beginning show that the above formula (5) gives the Euler product formula for the zeta function ... In fact their paper starts by quantizing the set of prime numbers ... Another interesting issue with regard to the boson-fermion duality formula (6) is its relation with Koszul duality."

Formula (6) is $Tr_{s}(\Lambda A) Tr(SA) = 1$, a relation between trace and supertrace. Hmm. I would like to understand Koszul duality better because it applies to operads, and more generally PROPS.

Matti Pitkanen said...

The fundamental variational principle of mathematics would be in spirit of Leibniz: Platonia would be the cognitively best possible world with "laws of Nature".

RH as "law of Nature" would optimize cognitive representations relying on discretization using rationals of Farey sequence on unit inverval and corresponding algebraic phases on the unit circle. These numbers correspond to the first lowest N levels of dark matter hierarchy.

This principle would allow to make educated guesses about the plausibility of unproven conjectures. Axioms could be identified as the collection of most plausible candidates for the "laws of Nature" in Platonia.

June 14, 2007 4:00 PM
Matti Pitkanen said...

Dear Kea,

this is somewhat out of topic and relates more closely to yesterday's posting where you gave a link to very interesting article of Kauffman and Lambropoulou about rational 2-tangles having commutative sum and product allowing to map them to rationals. This raised the question how tangles could be realized in TGD Universe.

June 14, 2007 6:26 PM
a quantum diaries survivor said...

Wow Kea, lesson 68! By now you have enough material to write a thick book! Have you considered that ? I would advertise it!

Cheers,
T.

June 15, 2007 3:31 AM
kneemo said...

Great idea Tommaso. Maybe she can title it "Operads and Motives in Physics" or something.

June 15, 2007 5:07 AM
Kea said...

By now you have enough material to write a thick book!

Thanks everybody. Yes, a book is a good idea, Tommaso, but I think I would need some kind of stable existence before I took on such a project.

June 15, 2007 8:00 AM
Doug said...

1 - Apparently there is another new word in the Englich language:
blook
"A blook can refer to either an object manufactured to imitate a bound book, an online book published via a blog, or a printed book that contains or is based on content from a blog."

2 - Thanks for the reference in MT_67, Kauffman and Lambropoulou, 'Hard Unknots and Collapsing Tangles'.
I see that Carl Brannen has a blog entry on 'Why does DNA only use 4 nucleotides?' at "Mass". I will make some nucleic acid [NA] comments there.

3 - The reciprocals of the Farey sequence from [1,oo] are also interesting.

June 15, 2007 9:47 AM
nosy snoopy said...

kneemo: Maybe she can title it "Operads and Motives in Physics" or something.

I would want to buy "Operads and Motives in Physics for Dummies" :-]

June 16, 2007 3:35 AM


text:
# Factor a bivariate polynomial treating one variable as constant

I have a polynomial in two variables, e.g.

16384 k^4 - 20480 k^2 + x^4 - 320 k^2 x^2 - 128 x^2 + 4096

I'd like Mathematica to factor it as $$(x^2 - f(k))(x^2 - g(k))$$ but Factor does nothing. I assume that's because it's treating $k$ on an equal footing with $x$, but I'd like it to consider $k$ as a constant and just factor with respect to $x$.

I'm sure this has been asked before, but all related-looking questions seemed to have much more complicated answers, including things like the Root function, the quartic formula, long Modules using Solve, or Groebner bases. Surely there's a simple, one-line solution for my problem?

• I guess it might be possible with Simplify and the option ComplexityFunction.
– ivbc
Jun 20, 2017 at 14:50
• poly2 = (x^2 - a) (x^2 - b) /. Solve[And @@ Thread[CoefficientList[poly, x] == CoefficientList[(x^2 - a) (x^2 - b), x]], {a, b}] Jun 20, 2017 at 18:02

Although there might be various approaches, it seems that proceeding the most obvious one should be good enough

We have

Collect[(x^2 - f[k]) (x^2 - g[k]) // Expand, x]

x^4 + x^2 (-f[k] - g[k]) + f[k] g[k]

on the other hand it should be identically equal to

Collect[4096 - 20480 k^2 + 16384 k^4 - 128 x^2 - 320 k^2 x^2 + x^4, x]

4096 - 20480 k^2 + 16384 k^4 + (-128 - 320 k^2) x^2 + x^4

Therefore equating appropriate coefficients in the both polynomials we get a simple system and solving it yields solutions

Solve[{-128 - 320 k^2 == -f[k] - g[k],
4096 - 20480 k^2 + 16384 k^4 == f[k] g[k]}, {f[k], g[k]}]

 {{f[k] -> 32 (2 + 5 k^2 - Sqrt[40 k^2 + 9 k^4]),
g[k] -> 32 (2 + 5 k^2 + Sqrt[k^2 (40 + 9 k^2)])},
{f[k] -> 32 (2 + 5 k^2 + Sqrt[40 k^2 + 9 k^4]),
g[k] -> 32 (2 + 5 k^2 - Sqrt[k^2 (40 + 9 k^2)])}}

Another, and a slightly simpler approach would be:

Solve[
PolynomialQuotientRemainder[
4096 - 20480 k^2 + 16384 k^4 - 128 x^2 - 320 k^2 x^2 + x^4,
x^2 - f[k], x] == {x^2 - g[k], 0},
{f[k], g[k]}]

• You could use CoefficientList and Thread to get the coefficients out, rather than copying the coefficients from each. Something like Solve[Thread[ CoefficientList[ 4096 - 20480 k^2 + 16384 k^4 - 128 x^2 - 320 k^2 x^2 + x^4, x] == CoefficientList[(x^2 - f[k]) (x^2 - g[k]), x]], {f[k], g[k]}] Jun 20, 2017 at 14:50
• However, this might be simpler Solve[PolynomialQuotientRemainder[ 4096 - 20480 k^2 + 16384 k^4 - 128 x^2 - 320 k^2 x^2 + x^4, x^2 - f[k], x] == {x^2 - g[k], 0}, {f[k], g[k]}] Jun 20, 2017 at 15:28

Surely there's a simple, one-line solution for my problem?

Of course.

SolveAlways[16384 k^4 - 20480 k^2 + x^4 - 320 k^2 x^2 - 128 x^2 + 4096 ==
(x^2 - f) (x^2 - g), x]
{{f -> 32 (2 + 5 k^2 - Sqrt[k^2 (40 + 9 k^2)]),
g -> 32 (2 + 5 k^2 + Sqrt[40 k^2 + 9 k^4])},
{f -> 32 (2 + 5 k^2 + Sqrt[k^2 (40 + 9 k^2)]),
g -> 32 (2 + 5 k^2 - Sqrt[40 k^2 + 9 k^4])}}


text:
# Complex Area

Geometry Level 5

For a given sequence of real constants, $$\displaystyle \left\{\theta _i \right\}_{i=0}^n \text{, } n \in \mathbb{N} \text{ and } n \geq 2$$, the following equation holds true,

$\displaystyle \sum_{r=0}^n z^r \cos \theta _{n-r} = 2$

where $$z$$ is a complex number.

Given that $$\displaystyle |z| < 1$$ and $$A$$ denotes the minimum area in the argand plane in which the roots of the above equation lie, concluded solely by the above information, then

Evaluate : $$\displaystyle \lfloor 100A \rfloor$$

×


text:
# What is the oxidation number for iron?

Jan 5, 2017

The oxidation number of the element $\text{Fe}$ is 0.
However, the oxidation number of $\text{Fe}$ in its compounds can take different values.
The most common oxidation numbers of $\text{Fe}$ are +2, as in ${\text{FeCl}}_{2}$, and +3, as in ${\text{FeCl}}_{3}$.


text:
# Polynomial Division question

If $f(x)$ and $g(x)$ are polynomials over $\mathbb{Z}$ and $f(n)|g(n)$ for all $n\in \mathbb{Z}$ then does it follow that $f$ divides $g$ in $\mathbb{Z}[x]?$

I'm pretty sure the answer is yes and that the proof should be easy (in fact I think it should be true with far weaker assumptions), but can't seem to get too far. If it helps, note in particular that $f$ has no integral roots.

-
Nope, but for silly reasons. Take $f(x) = 2, g(x) = x^2 + x$.
If $f$ is monic, the proof is straightforward: using the division algorithm we may assume WLOG that $g$ has degree strictly less than $f$ and then $\frac{g}{f}$ eventually tends to zero, so must itself be zero.


text:
# Topic Contributions

Bad Omens in Current Community Building

I am looking to have the 1-to-2 hour long, 2-to-5 person thoughtful conversation, on literally dozens of existing and EA-adjacent topics.

I sympathize with this as it does seem like there aren't currently a ton of these opportunities like this.

This forum, unfortunately, has presented me with consistent misrepresentations and fallacies, which the commentators refuse to address when I point them out.

This is a pretty strong statement that seems like it would benefit from some examples to support it - though maybe it is beside the point as the forum probably isn't going to be the "1-to-2 hour long, 2-to-5 person thoughtful conversation" you are looking for anyway.

Bad Omens in Current Community Building

My intuitive understanding of the Alice personality type (independent, skeptical, etc.) is that they are often very entrepreneurial (a skill EA desperately needs), but not usually "joiners". I have no doubt that a lot could be improved about community building, but there may always be some tension there that is difficult to resolve.

It may be that the best we can hope for in a lot of those cases are people who understand EA ideas and use them to inform their work, but don't consider themselves EAs. That seems fine to me. Like person 1 in your real life example seems like a big win, even if they don't consider themselves EA. If the EA intro talk she attended helped get her on that track, then it "worked" for her in some sense.

US Citizens: Targeted political contributions are probably the best passive donation opportunities for mitigating existential risk

I have more-or-less come to this same conclusion. As I mentioned in a reply below, Guarding Against Pandemics has a PAC that can receive up to $5000 from individual donors, and can, in turn, donate up to$5000 directly to campaigns.

As the linked post explains, "Donations to the PAC would go towards supporting candidates who are champions for pandemic preparedness in Congress and in state and local offices. ", so, not necessarily EA aligned in other ways. They could also be from either political party.

This seems potentially pretty impactful, but probably more risky than donating directly to an EA aligned candidate. I am curious what others think about this, or if anyone has done an analysis or anything.

US Citizens: Targeted political contributions are probably the best passive donation opportunities for mitigating existential risk

My understanding is there are different kinds of PACs. Guarding Against Pandemics has a PAC that cannot receive more than $5000 from individual donors, but can donate up to$5000 directly to campaigns.

The case for not pursuing a career in an EA organization

I am thinking along  similar lines Miranda, and I may have some of that comparative advantage too :)

I don't like to talk about plans too much before actually getting down to doing, but I am working on a project to find ways to support people coming to EA mid-career/mid-life (as I did). I expect to write a top level post about this in the next few weeks.

The goals are crystalizing a bit:

1. helping to keep people engaged and feeling like a part of the community even if they can't (aren't a good fit for, or aren't yet ready to) consider a high impact career change
2. helping people figure out how to have the most impact in the immediate term, within current constraints
3. helping people work towards higher impact, even if it's in the longer term

Some ideas for how to do it:

1. compiling and organizing resources that are specifically relevant for the demographic
2. interfacing with EA orgs (80k, local groups, EA Anywhere, Virtual Programs, etc.) in appropriate, mutually beneficial ways
3. peer-based support (because situations mid-career/life vary widely) - IE probably taking the form of a group to start and then hopefully figuring out what kind of 1-on-1 stuff could work too (mentorship, buddy system, etc.)

Is the EA Librarian still a thing? If so, what is the current turnaround?

Sorry to hear about your illness. I hope you feel better! It was very helpful the one time I used it, so I hope you guys can find a way to keep it going. Thanks!

How much current animal suffering does longtermism let us ignore?

Related thoughts in the recent 80k SBF interview (which I have only half finished, but is excellent). This link should take you directly to the audio of that part, or you can expand the full transcript on the page and ctrl/cmd-f to "Near-term giving" to read.


text:
1. ## Improper Integrals

Calculate the value of the integral 1/x^2 going from 1 to b where b is a finite number greater than 1. Does the value of the integral approach a limit as b tends to infinity? (it does) If so, what is the value?

Thanks =)

2. Originally Posted by Merdiemae
Calculate the value of the integral 1/x^2 going from 1 to b where b is a finite number greater than 1. Does the value of the integral approach a limit as b tends to infinity? (it does) If so, what is the value?

Thanks =)
$\int_1^b x^{-2} dx$

$-x^{-1}|_1^b$

$1^{-1}-b^{-1}$

$1-\frac{1}{b}$

Now, take the limit of this as b approaches infinity...

$lim_{b \rightarrow \infty} 1-\frac{1}{b} = 1$

3. Thank you so much!! I see what I did- stupid mistake- I had my answers backwards!! Ha ha =)


text:
# An Introduction to SageMaker Random Cut Forests

*Unsupervised anomaly detection on timeseries data a Random Cut Forest algorithm.*

## Introduction

Amazon SageMaker Random Cut Forest (RCF) is an algorithm designed to detect anomalous data points within a dataset. Examples of when anomalies are important to detect include when website activity uncharactersitically spikes, when temperature data diverges from a periodic behavior, or when changes to public transit ridership reflect the occurrence of a special event.

In this notebook, we will use the SageMaker RCF algorithm to train an RCF model on the Numenta Anomaly Benchmark (NAB) NYC Taxi dataset which records the amount New York City taxi ridership over the course of six months. We will then use this model to predict anomalous events by emitting an “anomaly score” for each data point. The main goals of this notebook are,

• to learn how to obtain, transform, and store data for use in Amazon SageMaker;

• to create an AWS SageMaker training job on a data set to produce an RCF model,

• use the RCF model to perform inference with an Amazon SageMaker endpoint.

The following are *not* goals of this notebook:

• deeply understand the RCF model,

• understand how the Amazon SageMaker RCF algorithm works.

If you would like to know more please check out the SageMaker RCF Documentation.

## Setup

This notebook was tested in Amazon SageMaker Studio on a ml.t3.medium instance with Python 3 (Data Science) kernel.

Our first step is to setup our AWS credentials so that AWS SageMaker can store and access training data and model artifacts. We also need some data to inspect and to train upon.

### Select Amazon S3 Bucket

We first need to specify the locations where the original data is stored and where we will store our training data and trained model artifacts. *This is the only cell of this notebook that you will need to edit.* In particular, we need the following data:

• bucket - An S3 bucket accessible by this account.

• prefix - The location in the bucket where this notebook’s input and output data will be stored. (The default value is sufficient.)

• downloaded_data_bucket - An S3 bucket where data is downloaded from this link and stored.

• downloaded_data_prefix - The location in the bucket where the data is stored.

[ ]:

import boto3
import botocore
import sagemaker
import sys

bucket = (
sagemaker.Session().default_bucket()
)  # Feel free to change to another bucket you have access to
prefix = "sagemaker/rcf-benchmarks"
execution_role = sagemaker.get_execution_role()
region = boto3.Session().region_name

def check_bucket_permission(bucket):
# check if the bucket exists
permission = False
try:
except botocore.exceptions.ParamValidationError as e:
print(
"Hey! You either forgot to specify your S3 bucket"
" or you gave your bucket an invalid name!"
)
except botocore.exceptions.ClientError as e:
if e.response["Error"]["Code"] == "403":
print(f"Hey! You don't have permission to access the bucket, {bucket}.")
elif e.response["Error"]["Code"] == "404":
print(f"Hey! Your bucket, {bucket}, doesn't exist!")
else:
raise
else:
permission = True
return permission

if check_bucket_permission(bucket):
print(f"Training input/output will be stored in: s3://{bucket}/{prefix}")
print(
)

### Obtain and Inspect Example Data

Our data comes from the Numenta Anomaly Benchmark (NAB) NYC Taxi dataset [1]. We downloaded data from here and stored in an S3 bucket. These data consists of the number of New York City taxi passengers over the course of six months aggregated into 30-minute buckets. We know, a priori, that there are anomalous events occurring during the NYC marathon, Thanksgiving, Christmas, New Year’s day, and on the day of a snow storm.

[ ]:

%%time

import pandas as pd

data_filename = "NAB_nyc_taxi.csv"
s3 = boto3.client("s3")

Before training any models it is important to inspect our data, first. Perhaps there are some underlying patterns or structures that we could provide as “hints” to the model or maybe there is some noise that we could pre-process away. The raw data looks like this:

[ ]:

taxi_data.head()

Human beings are visual creatures so let’s take a look at a plot of the data.

[ ]:

%matplotlib inline

import matplotlib
import matplotlib.pyplot as plt

matplotlib.rcParams["figure.dpi"] = 100

taxi_data.plot()

Human beings are also extraordinarily good at perceiving patterns. Note, for example, that something uncharacteristic occurs at around datapoint number 6000. Additionally, as we might expect with taxi ridership, the passenger count appears more or less periodic. Let’s zoom in to not only examine this anomaly but also to get a better picture of what the “normal” data looks like.

[ ]:

taxi_data[5500:6500].plot()

Here we see that the number of taxi trips taken is mostly periodic with one mode of length approximately 50 data points. In fact, the mode is length 48 since each datapoint represents a 30-minute bin of ridership count. Therefore, we expect another mode of length $$336 = 48 \times 7$$, the length of a week. Smaller frequencies over the course of the day occur, as well.

For example, here is the data across the day containing the above anomaly:

[ ]:

taxi_data[5952:6000]

## Training

Next, we configure a SageMaker training job to train the Random Cut Forest (RCF) algorithm on the taxi cab data.

### Hyperparameters

Particular to a SageMaker RCF training job are the following hyperparameters:

• num_samples_per_tree - the number randomly sampled data points sent to each tree. As a general rule, 1/num_samples_per_tree should approximate the the estimated ratio of anomalies to normal points in the dataset.

• num_trees - the number of trees to create in the forest. Each tree learns a separate model from different samples of data. The full forest model uses the mean predicted anomaly score from each constituent tree.

• feature_dim - the dimension of each data point.

In addition to these RCF model hyperparameters, we provide additional parameters defining things like the EC2 instance type on which training will run, the S3 bucket containing the data, and the AWS access role. Note that,

• Recommended instance type: ml.m4, ml.c4, or ml.c5

• Current limitations:

• The RCF algorithm does not take advantage of GPU hardware.

[ ]:

from sagemaker import RandomCutForest

session = sagemaker.Session()

# specify general training job information
rcf = RandomCutForest(
role=execution_role,
instance_count=1,
instance_type="ml.m4.xlarge",
data_location=f"s3://{bucket}/{prefix}/",
output_path=f"s3://{bucket}/{prefix}/output",
num_samples_per_tree=512,
num_trees=50,
)

# automatically upload the training data to S3 and run the training job
rcf.fit(rcf.record_set(taxi_data.value.to_numpy().reshape(-1, 1)))

If you see the message

===== Job Complete =====

at the bottom of the output logs then that means training successfully completed and the output RCF model was stored in the specified output path. You can also view information about and the status of a training job using the AWS SageMaker console. Just click on the “Jobs” tab and select training job matching the training job name, below:

[ ]:

print(f"Training job name: {rcf.latest_training_job.job_name}")

## Inference

A trained Random Cut Forest model does nothing on its own. We now want to use the model we computed to perform inference on data. In this case, it means computing anomaly scores from input time series data points.

We create an inference endpoint using the SageMaker Python SDK deploy() function from the job we defined above. We specify the instance type where inference is computed as well as an initial number of instances to spin up. We recommend using the ml.c5 instance type as it provides the fastest inference time at the lowest cost.

[ ]:

rcf_inference = rcf.deploy(initial_instance_count=1, instance_type="ml.m4.xlarge")

Congratulations! You now have a functioning SageMaker RCF inference endpoint. You can confirm the endpoint configuration and status by navigating to the “Endpoints” tab in the AWS SageMaker console and selecting the endpoint matching the endpoint name, below:

[ ]:

print(f"Endpoint name: {rcf_inference.endpoint}")

### Data Serialization/Deserialization

We can pass data in a variety of formats to our inference endpoint. In this example we will demonstrate passing CSV-formatted data. Other available formats are JSON-formatted and RecordIO Protobuf. We make use of the SageMaker Python SDK utilities csv_serializer and json_deserializer when configuring the inference endpoint.

[ ]:

from sagemaker.serializers import CSVSerializer
from sagemaker.deserializers import JSONDeserializer

rcf_inference.serializer = CSVSerializer()
rcf_inference.deserializer = JSONDeserializer()

Let’s pass the training dataset, in CSV format, to the inference endpoint so we can automatically detect the anomalies we saw with our eyes in the plots, above. Note that the serializer and deserializer will automatically take care of the datatype conversion from Numpy NDArrays.

For starters, let’s only pass in the first six datapoints so we can see what the output looks like.

[ ]:

taxi_data_numpy = taxi_data.value.to_numpy().reshape(-1, 1)
print(taxi_data_numpy[:6])
results = rcf_inference.predict(
taxi_data_numpy[:6], initial_args={"ContentType": "text/csv", "Accept": "application/json"}
)

### Computing Anomaly Scores

Now, let’s compute and plot the anomaly scores from the entire taxi dataset.

[ ]:

results = rcf_inference.predict(taxi_data_numpy)
scores = [datum["score"] for datum in results["scores"]]

# add scores to taxi data frame and print first few values
taxi_data["score"] = pd.Series(scores, index=taxi_data.index)

[ ]:

fig, ax1 = plt.subplots()
ax2 = ax1.twinx()

#
# *Try this out* - change start and end to zoom in on the
# anomaly found earlier in this notebook
#
start, end = 0, len(taxi_data)
# start, end = 5500, 6500
taxi_data_subset = taxi_data[start:end]

ax1.plot(taxi_data_subset["value"], color="C0", alpha=0.8)
ax2.plot(taxi_data_subset["score"], color="C1")

ax1.grid(which="major", axis="both")

ax1.set_ylabel("Taxi Ridership", color="C0")
ax2.set_ylabel("Anomaly Score", color="C1")

ax1.tick_params("y", colors="C0")
ax2.tick_params("y", colors="C1")

ax1.set_ylim(0, 40000)
ax2.set_ylim(min(scores), 1.4 * max(scores))
fig.set_figwidth(10)

Note that the anomaly score spikes where our eyeball-norm method suggests there is an anomalous data point as well as in some places where our eyeballs are not as accurate.

Below we print and plot any data points with scores greater than 3 standard deviations (approx 99.9th percentile) from the mean score.

[ ]:

score_mean = taxi_data["score"].mean()
score_std = taxi_data["score"].std()
score_cutoff = score_mean + 3 * score_std

anomalies = taxi_data_subset[taxi_data_subset["score"] > score_cutoff]
anomalies

The following is a list of known anomalous events which occurred in New York City within this timeframe:

• 2014-11-02 - NYC Marathon

• 2015-01-01 - New Year’s Eve

• 2015-01-27 - Snowstorm

Note that our algorithm managed to capture these events along with quite a few others. Below we add these anomalies to the score plot.

[ ]:

ax2.plot(anomalies.index, anomalies.score, "ko")
fig

With the current hyperparameter choices we see that the three-standard-deviation threshold, while able to capture the known anomalies as well as the ones apparent in the ridership plot, is rather sensitive to fine-grained peruturbations and anomalous behavior. Adding trees to the SageMaker RCF model could smooth out the results as well as using a larger data set.

### Stop and Delete the Endpoint

Finally, we should delete the endpoint before we close the notebook.

To do so execute the cell below. Alternately, you can navigate to the “Endpoints” tab in the SageMaker console, select the endpoint with the name stored in the variable endpoint_name, and select “Delete” from the “Actions” dropdown menu.

[ ]:

sagemaker.Session().delete_endpoint(rcf_inference.endpoint)

## Epilogue

We used Amazon SageMaker Random Cut Forest to detect anomalous datapoints in a taxi ridership dataset. In these data the anomalies occurred when ridership was uncharacteristically high or low. However, the RCF algorithm is also capable of detecting when, for example, data breaks periodicity or uncharacteristically changes global behavior.

Depending on the kind of data you have there are several ways to improve algorithm performance. One method, for example, is to use an appropriate training set. If you know that a particular set of data is characteristic of “normal” behavior then training on said set of data will more accurately characterize “abnormal” data.

Another improvement is make use of a windowing technique called “shingling”. This is especially useful when working with periodic data with known period, such as the NYC taxi dataset used above. The idea is to treat a period of $$P$$ datapoints as a single datapoint of feature length $$P$$ and then run the RCF algorithm on these feature vectors. That is, if our original data consists of points $$x_1, x_2, \ldots, x_N \in \mathbb{R}$$ then we perform the transformation,

data = [[x_1],            shingled_data = [[x_1, x_2, ..., x_{P}],
[x_2],    --->                     [x_2, x_3, ..., x_{P+1}],
...                                ...
[x_N]]                             [x_{N-P}, ..., x_{N}]]

[ ]:

import numpy as np

def shingle(data, shingle_size):
num_data = len(data)
shingled_data = np.zeros((num_data - shingle_size, shingle_size))

for n in range(num_data - shingle_size):
shingled_data[n] = data[n : (n + shingle_size)]
return shingled_data

# single data with shingle size=48 (one day)
shingle_size = 48
prefix_shingled = "sagemaker/randomcutforest_shingled"
taxi_data_shingled = shingle(taxi_data.values[:, 1], shingle_size)
print(taxi_data_shingled)

We create a new training job and and inference endpoint. (Note that we cannot re-use the endpoint created above because it was trained with one-dimensional data.)

[ ]:

session = sagemaker.Session()

# specify general training job information
rcf = RandomCutForest(
role=execution_role,
instance_count=1,
instance_type="ml.m4.xlarge",
data_location=f"s3://{bucket}/{prefix_shingled}/",
output_path=f"s3://{bucket}/{prefix_shingled}/output",
num_samples_per_tree=512,
num_trees=50,
)

# automatically upload the training data to S3 and run the training job
rcf.fit(rcf.record_set(taxi_data_shingled))

[ ]:

from sagemaker.serializers import CSVSerializer
from sagemaker.deserializers import JSONDeserializer

rcf_inference = rcf.deploy(initial_instance_count=1, instance_type="ml.m4.xlarge")

rcf_inference.serializer = CSVSerializer()
rcf_inference.deserializer = JSONDeserializer()

[ ]:

print(rcf_inference.content_type, rcf_inference.accept)

Using the above inference endpoint we compute the anomaly scores associated with the shingled data.

[ ]:

# Score the shingled datapoints
results = rcf_inference.predict(
taxi_data_shingled, initial_args={"ContentType": "text/csv", "Accept": "application/json"}
)
scores = np.array([datum["score"] for datum in results["scores"]])

# compute the shingled score distribution and cutoff and determine anomalous scores
score_mean = scores.mean()
score_std = scores.std()
score_cutoff = score_mean + 3 * score_std

anomalies = scores[scores > score_cutoff]
anomaly_indices = np.arange(len(scores))[scores > score_cutoff]

print(anomalies)

Finally, we plot the scores from the shingled data on top of the original dataset and mark the score lying above the anomaly score threshold.

[ ]:

fig, ax1 = plt.subplots()
ax2 = ax1.twinx()

#
# *Try this out* - change start and end to zoom in on the
# anomaly found earlier in this notebook
#
start, end = 0, len(taxi_data)
taxi_data_subset = taxi_data[start:end]

ax1.plot(taxi_data["value"], color="C0", alpha=0.8)
ax2.plot(scores, color="C1")
ax2.scatter(anomaly_indices, anomalies, color="k")

ax1.grid(which="major", axis="both")
ax1.set_ylabel("Taxi Ridership", color="C0")
ax2.set_ylabel("Anomaly Score", color="C1")
ax1.tick_params("y", colors="C0")
ax2.tick_params("y", colors="C1")
ax1.set_ylim(0, 40000)
ax2.set_ylim(min(scores), 1.4 * max(scores))
fig.set_figwidth(10)

We see that with this particular shingle size, hyperparameter selection, and anomaly cutoff threshold that the shingled approach more clearly captures the major anomalous events: the spike at around t=6000 and the dips at around t=9000 and t=10000. In general, the number of trees, sample size, and anomaly score cutoff are all parameters that a data scientist may need experiment with in order to achieve desired results. The use of a labeled test dataset allows the used to obtain common accuracy metrics for anomaly detection algorithms. For more information about Amazon SageMaker Random Cut Forest see the AWS Documentation.

[ ]:

sagemaker.Session().delete_endpoint(rcf_inference.endpoint)


text:
# C++ code to find xth element after removing numbers

C++Server Side ProgrammingProgramming

Suppose we have two numbers n and x. First n natural numbers are written on a blackboard. In ith (i starts from 1) operation, we remove ith number from the blackboard. When there are less than i numbers, we stop removal task. We have to find x-th remaining number after stopping removal.

So, if the input is like n = 69; x = 6, then the output will be 12. In first operation, i = 1, so remove 1, then in second operation i = 2, but the sequence is 2, 3, 4 ... so second number is 3, remove 3, like this finally the xth number is 12.

## Steps

To solve this, we will follow these steps −

return 2 * x

## Example

Let us see the following implementation to get better understanding −

#include <bits/stdc++.h>
using namespace std;
int solve(int n, int x){
return 2 * x;
}
int main(){
int n = 69;
int x = 6;
cout << solve(n, x) << endl;
}

## Input

69, 6

## Output

12
Updated on 15-Mar-2022 06:38:35


text:
# P or NP-Complete? (concerning 2-CNF formulas)

I have two languages that I want to either prove is in P or NP-complete.

1) 2-CNF formulas where there exists an assignment that satisfies the 3/4 of the first 1000 clauses and all of the rest.

2) 2-CNF formulas where there exists an assignment that satisfies the all of the first 1000 clauses and 3/4 of the rest.

Intuitively, I want to say that 1) is P and 2) is NP-complete, but I am not sure and don't know how to prove my intuition. I am assuming that 2SAT is what I will need to reduce from for 1). If 2) is in P, then 2SAT should also be a good candidate, but I don't know if it's in P.

-
Please note that we now have a cs.stackexchange.com :) – user2468 Mar 10 '12 at 22:11
@J.D.: cs.stackexchange.com is currently in private beta. – Tsuyoshi Ito Mar 10 '12 at 22:21
@TsuyoshiIto Is this a problem? – draks ... Apr 5 '12 at 7:05

(1) is clearly in P -- actually it is solvable in linear time, since there are only $\binom{1000}{750}=O(1)$ different ordinary 2SAT problems to try, and each of these can be checked in linear time.

(2) is NP-complete, by reduction from the known NP-hard MAX-2-SAT problem which asks to recognize those $(A,k)$ such that $A$ is a set of 2-clauses with a $k$-element satisfiable subset.

Given $(A,k)$, pick a fresh variable $x_0$ and construct an input to your problem (2) consisting of

• 1000 copies of the clause $x_0\lor x_0$ -- these will be the 1000 clauses that must always be satisfied.
• the clauses in $A$.
• $3|A|-k$ copies of $x_0 \lor \neg x_0$ (these are automatically satisfied).
• $k$ copies of $\neg x_0 \lor \neg x_0$ (these can never be satisfied).

This gives an instance of (2) that must answer true exactly if $k$ clauses in $A$ can be satisfied simultaneously.

If you don't like clauses such as $x_0\lor x_0$ where the two literals are identical, they can be avoided without much trouble. On the other hand, the reduction breaks down if you restrict problem (2) to be about formulas that don't repeat any clause. I don't know if MAX-2-SAT is still NP-hard under restrictions that allow the reduction to be salvaged then.

-

Hint: How many variables are involved in the first 1000 clauses?

-
If you mean literals, there are 2000 literals. There can be many different variables since variables can be reused in between clauses of CNF formulas. – Glen Marek Mar 10 '12 at 22:33
Wait, so for 1), since the number of variables in the first 1000 clauses is upperbounded by 2000, we can find a way to satisfy 3/4 of them in P time. To satisfy the rest is the same as normal 2SAT? Then for 2), finding the satisfying assignment for the first 1000 is clearly in P time, but then finding 3/4 of the rest, I am not sure. Am I understanding what you are getting at or am I just completely off? – Glen Marek Mar 11 '12 at 0:39
You got the gist of it. – Yuval Filmus Mar 11 '12 at 2:38
So is finding a way to satisfy 3/4 of an unknown number of clauses in P time? Maybe it is in P time to just see how many clauses there are and then to satisfy them is just in P time as well since we can find out how many there are? – Glen Marek Mar 11 '12 at 4:01
It is always possible to satisfy at least 3/4 of the clauses, if each one contains exactly two distinct literals. This may or may not be helpful in your case. – Yuval Filmus Mar 11 '12 at 4:42


text:
# Como es el tío placido en la historia zapatos de huevo? Describe su personalidad?

###### Question:

Como es el tío placido en la historia zapatos de huevo? Describe su personalidad?

### How were the oregon and santa fe trails different ?

how were the oregon and santa fe trails different ?...

### When two people are in a race, what do you need to know to determine who is the fastest? (Select all that apply.) 1. he height of the people 2. units of speed that are identical 3. the distance they ran 4. the time they took to run the race

When two people are in a race, what do you need to know to determine who is the fastest? (Select all that apply.) 1. he height of the people 2. units of speed that are identical 3. the distance they ran 4. the time they took to run the race...

### All insurance is based on a principle called

All insurance is based on a principle called...

### What is the opposute of opposite of -18

What is the opposute of opposite of -18...

### Julie goes to the sports store and spends $40.50 before tax. She buys a pair of shorts for$21.75 and 3 pairs of socks that each cost the same amount. How much does each pair of socks cost?

Julie goes to the sports store and spends $40.50 before tax. She buys a pair of shorts for$21.75 and 3 pairs of socks that each cost the same amount. How much does each pair of socks cost?...

### What contributed to american consumer spending during the 1920s

what contributed to american consumer spending during the 1920s...

### Please Which process led to the release of large amounts of carbon dioxide at the end of the Devonian period? A. The breakup of Pangaea B. The extinction of plant life C. The melting of glaciers D. The volcanic activity

Please Which process led to the release of large amounts of carbon dioxide at the end of the Devonian period? A. The breakup of Pangaea B. The extinction of plant life C. The melting of glaciers D. The volcanic activity...

### Length-50 Width-24 The swimming pool at the right is a rectangle with a semicircle at one end. What are the area and perimeter of the pool?

Length-50 Width-24 The swimming pool at the right is a rectangle with a semicircle at one end. What are the area and perimeter of the pool?...

### Another name for computer programs

Another name for computer programs...

### What are the coefficients in the expression 4x - 2y + 1

What are the coefficients in the expression 4x - 2y + 1...

### Julie and Eric row their boat (at a constant speed) 55 miles downstream for 5 hours, helped by the current. Rowing at the same rate, the trip back against the current takes 11 hours. Find the rate of the current

Julie and Eric row their boat (at a constant speed) 55 miles downstream for 5 hours, helped by the current. Rowing at the same rate, the trip back against the current takes 11 hours. Find the rate of the current...

### How many grams of sodium carbonate are present after the reaction is complete?

how many grams of sodium carbonate are present after the reaction is complete?...

### If you do not manage your emotions, they most likely will affect your ability to make good decisions. Please select the best answer from the choices provided. True or False

If you do not manage your emotions, they most likely will affect your ability to make good decisions. Please select the best answer from the choices provided. True or False...

### What is the percentage composition for H2O in this compound Al(OH)3.2H2O? a 50.55% b 40.05% c 32.73 % d 65.09%

What is the percentage composition for H2O in this compound Al(OH)3.2H2O? a 50.55% b 40.05% c 32.73 % d 65.09%...

### Calculate the amount of heat (in btu) needed to raise the temp of 2.5lb of glass from 45°f to 350°f. the specific heat capacity of glass is 0.187Btu/lb°f

calculate the amount of heat (in btu) needed to raise the temp of 2.5lb of glass from 45°f to 350°f. the specific heat capacity of glass is 0.187Btu/lb°f...

### Why are ghost always hungry?

why are ghost always hungry?...

### Teds science class collects aluminum cans to sell to the recycling center. the center pays a fixed amount for each kilogram of aluminum. write a formula that will help ted determine how much money his group will recieve for the cans. let t= total amount, n=number of kilograms of cans, a= amount the center pays per kilogram

Teds science class collects aluminum cans to sell to the recycling center. the center pays a fixed amount for each kilogram of aluminum. write a formula that will help ted determine how much money his group will recieve for the cans. let t= total amount, n=number of kilograms of cans, a= amount the ...

### How many men were convicted of homosexuality, and were sent to concentration camps?

How many men were convicted of homosexuality, and were sent to concentration camps?...


text:
## Dr. Irena Lerman

#### Time and Place:

יום ג 11:00 - 08:00

## Course topics

Ordinary Differential EquationsBasic concepts: ordinary differential equations, differential equations of the first order, general solution, initial value problems, partial solutions. Linear differential equations with separable variables, exact equations, integration factor, homogeneous equations. Existence and Uniqueness theorem (without proof). System of differential equation of first order, solution by matrixes. Linear differential equations of second order, non- homogeneous equations, Wronskian. Linear differential equations of n-th order.Integral TransformsLaplace transform, properties of the Laplace transform. Convolution of two functions and convolution theorem. Heavyside (unit step) function, ?-function (Dirac), particularly continuous functions, their Laplace transform. Solution of non-homogeneous differential equations by Laplace transform.Fourier transform, properties of the Fourier transform. Convolution of two functions and convolution theorem. Cosines and Sine Fourier transform. Solution of integral equations by Fourier transform..

## Students' Issues

Class Representative
נועה מנור
Aguda Representative
רכזת סיוע אקדמי - הנדסה ב’ ומכינות - ימית רייזמן
Staff Observers


text:
# Basic topology set closure question

Let $X$ be a topological space with subspace $Y$ and $A$ a subset of $Y$. Let $Cl_X(A)$ denote the closure of $A$ in $X$ and $Cl_Y(A)$ denote the closure of $A$ in $Y$. Show that $Cl_Y(A)\subseteq Cl_X(A)$ and in general, $Cl_Y(A)\neq Cl_X(A)$.

My attempt: Since $Cl_X(A)$ is a closed subset of $X$ containing $A$, $Cl_X(A)\cap Y$ is a closed subset in $Y$ containing $A$, but $Cl_Y(A)$ is, by definition, a subset of every closed set in $Y$ containing $A$, so $Cl_Y(A)\subseteq Cl_X(A)\cap Y\subseteq Cl_X(A)$. To show that equality fails in general, consider $X=\mathbb{R}$ and $Y=A=(0,1)$. $Cl_{\mathbb{R}}(0,1)=[0,1]$, but $Cl_{(0,1)}(0,1)=(0,1)$. So equality fails in general.

Do my arguments look ok?

• The arguments are completely correct. – 5xum Feb 27 '14 at 7:37
• perfectly fine. – Max Feb 27 '14 at 7:40
• Looks great. Perhaps, copy the paragraph after "My attempt" as an answer and select it so that the question is marked as answered. – Sammy Black Feb 27 '14 at 7:56