text:
# Search by Topic

#### Resources tagged with Visualising similar to Using Games in the Classroom:

Filter by: Content type:
Stage:
Challenge level:

##### Other tags that relate to Using Games in the Classroom
Group worthy. Visualising. Pedagogy. Networks/Graph Theory. Learning mathematics. Rich Tasks. Interactivities. Problem solving. Games. Mathematical Thinking.

### There are 262 results

Broad Topics > Using, Applying and Reasoning about Mathematics > Visualising

### Thinking Through, and By, Visualising

##### Stage: 2, 3 and 4

This article is based on some of the ideas that emerged during the production of a book which takes visualising as its focus. We began to identify problems which helped us to take a structured view. . . .

### The Development of Spatial and Geometric Thinking: 5 to 18

##### Stage: 1, 2, 3 and 4

This is the first article in a series which aim to provide some insight into the way spatial thinking develops in children, and draw on a range of reported research. The focus of this article is the. . . .

### Sprouts

##### Stage: 2, 3, 4 and 5 Challenge Level:

A game for 2 people. Take turns joining two dots, until your opponent is unable to move.

### Instant Insanity

##### Stage: 3, 4 and 5 Challenge Level:

Given the nets of 4 cubes with the faces coloured in 4 colours, build a tower so that on each vertical wall no colour is repeated, that is all 4 colours appear.

### Konigsberg Plus

##### Stage: 3 Challenge Level:

Euler discussed whether or not it was possible to stroll around Koenigsberg crossing each of its seven bridges exactly once. Experiment with different numbers of islands and bridges.

### Tetrahedra Tester

##### Stage: 3 Challenge Level:

An irregular tetrahedron is composed of four different triangles. Can such a tetrahedron be constructed where the side lengths are 4, 5, 6, 7, 8 and 9 units of length?

### Penta Play

##### Stage: 2 Challenge Level:

A shape and space game for 2,3 or 4 players. Be the last person to be able to place a pentomino piece on the playing board. Play with card, or on the computer.

### Picturing Triangle Numbers

##### Stage: 3 Challenge Level:

Triangle numbers can be represented by a triangular array of squares. What do you notice about the sum of identical triangle numbers?

### Muggles Magic

##### Stage: 3 Challenge Level:

You can move the 4 pieces of the jigsaw and fit them into both outlines. Explain what has happened to the missing one unit of area.

### Rolling Around

##### Stage: 3 Challenge Level:

A circle rolls around the outside edge of a square so that its circumference always touches the edge of the square. Can you describe the locus of the centre of the circle?

### Endless Noughts and Crosses

##### Stage: 2 Challenge Level:

An extension of noughts and crosses in which the grid is enlarged and the length of the winning line can to altered to 3, 4 or 5.

### Painted Cube

##### Stage: 3 Challenge Level:

Imagine a large cube made from small red cubes being dropped into a pot of yellow paint. How many of the small cubes will have yellow paint on their faces?

### Twice as Big?

##### Stage: 2 Challenge Level:

Investigate how the four L-shapes fit together to make an enlarged L-shape. You could explore this idea with other shapes too.

### World of Tan 17 - Weather

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of the watering can and man in a boat?

### World of Tan 18 - Soup

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of Mai Ling and Chi Wing?

### World of Tan 16 - Time Flies

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of the candle and sundial?

### Right or Left?

##### Stage: 2 Challenge Level:

Which of these dice are right-handed and which are left-handed?

### Tourism

##### Stage: 3 Challenge Level:

If you can copy a network without lifting your pen off the paper and without drawing any line twice, then it is traversable. Decide which of these diagrams are traversable.

### Redblue

##### Stage: 2 Challenge Level:

Investigate the number of paths you can take from one vertex to another in these 3D shapes. Is it possible to take an odd number and an even number of paths to the same vertex?

### Travelling Salesman

##### Stage: 3 Challenge Level:

A Hamiltonian circuit is a continuous path in a graph that passes through each of the vertices exactly once and returns to the start. How many Hamiltonian circuits can you find in these graphs?

### Diagonal Dodge

##### Stage: 2 and 3 Challenge Level:

A game for 2 players. Can be played online. One player has 1 red counter, the other has 4 blue. The red counter needs to reach the other side, and the blue needs to trap the red.

### World of Tan 19 - Working Men

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of this shape. How would you describe it?

### Ding Dong Bell

##### Stage: 3, 4 and 5

The reader is invited to investigate changes (or permutations) in the ringing of church bells, illustrated by braid diagrams showing the order in which the bells are rung.

### You Owe Me Five Farthings, Say the Bells of St Martin's

##### Stage: 3 Challenge Level:

Use the interactivity to listen to the bells ringing a pattern. Now it's your turn! Play one of the bells yourself. How do you know when it is your turn to ring?

### World of Tan 29 - the Telephone

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of this telephone?

### Makeover

##### Stage: 1 and 2 Challenge Level:

Exchange the positions of the two sets of counters in the least possible number of moves

### Isosceles Triangles

##### Stage: 3 Challenge Level:

Draw some isosceles triangles with an area of $9$cm$^2$ and a vertex at (20,20). If all the vertices must have whole number coordinates, how many is it possible to draw?

### L-ateral Thinking

##### Stage: 1 and 2 Challenge Level:

Try this interactive strategy game for 2

### Nine-pin Triangles

##### Stage: 2 Challenge Level:

How many different triangles can you make on a circular pegboard that has nine pegs?

### World of Tan 28 - Concentrating on Coordinates

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of Little Ming playing the board game?

### World of Tan 27 - Sharing

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of Little Fung at the table?

### World of Tan 21 - Almost There Now

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of the lobster, yacht and cyclist?

### World of Tan 20 - Fractions

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of the chairs?

### Put Yourself in a Box

##### Stage: 2 Challenge Level:

A game for 2 players. Given a board of dots in a grid pattern, players take turns drawing a line by connecting 2 adjacent dots. Your goal is to complete more squares than your opponent.

### World of Tan 22 - an Appealing Stroll

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of the child walking home from school?

### World of Tan 24 - Clocks

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of these clocks?

### World of Tan 26 - Old Chestnut

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of this brazier for roasting chestnuts?

### World of Tan 25 - Pentominoes

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of these people?

##### Stage: 2 Challenge Level:

How can the same pieces of the tangram make this bowl before and after it was chipped? Use the interactivity to try and work out what is going on!

### World of Tan 15 - Millennia

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outlines of the workmen?

### Colour Wheels

##### Stage: 2 Challenge Level:

Imagine a wheel with different markings painted on it at regular intervals. Can you predict the colour of the 18th mark? The 100th mark?

### Coin Cogs

##### Stage: 2 Challenge Level:

Can you work out what is wrong with the cogs on a UK 2 pound coin?

### World of Tan 2 - Little Ming

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of Little Ming?

### Domino Numbers

##### Stage: 2 Challenge Level:

Can you see why 2 by 2 could be 5? Can you predict what 2 by 10 will be?

### World of Tan 4 - Monday Morning

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of Wai Ping, Wah Ming and Chi Wing?

### World of Tan 12 - All in a Fluff

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of these rabbits?

### World of Tan 11 - the Past, Present and Future

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of the telescope and microscope?

### World of Tan 1 - Granma T

##### Stage: 2 Challenge Level:

Can you fit the tangram pieces into the outline of Granma T?

### Clocking Off

##### Stage: 2, 3 and 4 Challenge Level:

I found these clocks in the Arts Centre at the University of Warwick intriguing - do they really need four clocks and what times would be ambiguous with only two or three of them?


text:
# From Vim to Emacs - Year Later Bit Of Retrospective On What I Came Through

Posted in: emacs.
Posted on December 29, 2016

It’s been about a year since I’ve switched from my highly customized vim to Emacs as a default editor. I have to admit it I had sometimes pretty tough times with Emacs especially at the beginnings. Anyway at the same time I’ve found it really beneficial and have significant impact on my current workflow. This article isn’t meant in any sense to be tutorial to neither Emacs nor Vim but is rather a reasoning about my experience and recapitulation of what I’ve learned during past year. Can it really help someone? I don’t know. But I still feel it’s worth putting those ideas down.

## Why Would Anyone Possibly Want To Do This?

This sounds like a simple question, doesn’t it? And indeed I believe It’s simple question. However I struggle to find a simple answer. Let me at least try to explain what drove me to all of this in bit more complicated way.

Generally I think there are some people who focus on creating things. I’m not really one of them - sorry. Maybe I had been driven by passion for creating things in past and maybe it was reason I’ve started doing things I do. Unfortunately I feel like I enjoy learning how things work rather then simply applying that knowledge. I also think it’s absolutely fine feel differently about this.

Some might point out that tools are just disruption1 from real problems and in some sense I get it. On the other hand there are folks saying that it’s almost required to learn how to use one of truly extensible editors (Vim/Emacs) to become real hacker2. I don’t want to do any of these points.

If you’re really focused on things you’re creating and don’t see any point in changing your tools it’s just fine. Just forget about this article right now and go do stuff you’re really interested in.

As you can imagine I spent quite a some time learning and putting together my original Vim configuration. Why I did start over and switch to Emacs then? I think this is actually more philosophical than practical question. Both Vim and Emacs has own way of thinking about world. To some degree Vim is more *NIXy kind of tool. It does one thing and it does it well - text manipulation. Yes learning curve isn’t the smoothest one but once you get to used to it it’s fairly simple. It’s also extensible even though you’re forced to use VimL3 which is a bit strange language. However it’s still pretty straight forward tool. It’s also limited by design and its simplicity to some degree. Vim itself is synchronous (even blocking UI) and it doesn’t really supports much that goes beyond basic text editing. Even though there are projects like Neo Vim I think it’ still fair to say that vim is design as ultimate tool for text manipulating and that’s it. Is it extensible? Sure but only to the point you’re not trying to bend it way too much. Than it starts to feel.. strange.

Emacs on the other hand is Lips interpreter with interface for text editing. It’s extensibility is insane. As old joke you probably heard says: “Emacs is a great operating system lacking only decent text editor.” Think about it this way. Emacs is framework given to you so you can build your own editor or anything you want in it. It’s much more complicated than Vim is. For good and bad there are more concepts you need to learn to actually understand even small fraction of what Emacs can do. Anyway for text editing addicts this is an ultimate tool. If you like text as I do you have all reasons to consider using Emacs.

## Frustration

I have to admit I’m not one of these super smart people. Anyway I think I have good resistance to a pain. I’m usually able to force myself through the hard path and somehow handle it without going crazy too much. Or maybe I have no problem with going crazy a bit. Anyway I have to admit that this was hard. I was playing with Emacs for some time before I actually started using it as main editor. I’ve tried Spacemacs distribution and wasn’t really happy with it. Then I’ve rewrote my configuration from scratch at least three times. I’ve also used Emacs for about two weeks and then switched back to Vim for next few weeks simply because it drove me mad.

One of the worst moments is when you really need to focus on solving some problem or delivering some shit and your editor keeps telling you that you don’t really know how edit files. That sux pretty much.

I’ve managed to break it the hard way. I can tell you that I don’t want to ever go through this process again. The truth is I don’t know if it was worth it. I know I’m happy now but I’m pretty sure I’m not objective at this point. Anyway I have some advise especially for people who are coming to Emacs from Vim. Few lessons I’ve learned anyone should know up front.

### Learn First

You don’t have to switch from day to day. Generally it’s good idea to play with Emacs a bit first. And I mean pure Emacs.

If you’re starting I think it’s better to play with emacs-lisp rather than use it for working on your projects. Using Emacs to do some work without knowing it will be only frustrating experience. Using it to learn emacs-lisp helps you to stay focus and enjoy that experience. Also elisp has amazing support up front. Let it be the measure for how you want to build your workflow for other languages.

### Don’t be Too Much Evil

Evil mode is great. Anyway looking back I think it is really not a good idea to rely on it much especially at the beginning. Evil is really Vim for Emacs but Emacs + Evil is much more than Vim inside Emacs. Don’t ignore it. You will have to learn some of the Emacs way sooner and later. Sooner is better.

### Try To Use Emacs In YOURS Workflow

There are many cool plugins you want to try out I know. Anyway You can’t possibly change your whole workflow in one day. If you’re using tmux try to use Emacs within tmux4. If you’re coming from GUI editor - use GUI and forget about terminal version.

### Don’t Stick With It For Too Long Though…

Once you feel comfortable with Emacs try to evolve your workflow.

#### GUI Version Is Better

Really it is. Are you running Emacs with in terminal? What about running terminal within Emacs?

#### Magit is Awesome

I heard you like command line tools. That’s great. I like them too. Give Magit a try anyway. It’s advanced and you can switch to terminal any time you want.

#### Org Mode is Super Cool… But NOT Necessary

Org mode is great. You want to learn it. However if you’re programmer I think it’s not the most important thing. You should focus on work first. Org mode is really simple and you can learn it in no time later.

## After One Year

So I’m kind of celebrating my first year with Emacs. I really wanted to make some recap of what I’ve learned. So I’ve rewrote my configuration to org-mode as literate program. I’ve also switched from use-package to Cask and Pallet. Once again I’ve spend some of my free time just for setting things up. This is what we OCD’s do, right?

I also made few other changes / decisions based on my personal preferences:

For some reason I don’t feel like I’ll need to use evil-leader anymore. I don’t think it fits well to Emacs. It was really helpful for making Emacs feel more like Vim at first but now I feel like I want to use Emacs way of bindings rather then using leader.

### Goodbye NeoTree

You might know NERDTree plugin for Vim. It’s largely popular among Vimmers. However I was never really happy with Neotree (Emacs alternative) for many reasons I don’t want to discuss here. To prevent this frustration I simply forced myself not to use it by removing it. I’ll rather use basics like dired or C-x C-f instead going forward.

## Are Emacs Users Better Programmers?

Hard to say. But you bet I believe they are as every other Emacs user do:D Probably it’s better to avoid any discussion like this right from start. In any case I think that there are certain skill which comes from experience of setting up Emacs. In the end your configuration is probably the biggest project of your life time. It will live and evolve with you. It’s worth understanding and spending some time on its maintainance. But in the end it’s all up to you.

1. You can find many articles about tools as procrastination and similar.

format: plain


text:
# Items tagged with intint Tagged Items Feed

### How to put 'if' into dsolve?...

November 17 2015
0 4

This is the code example_hw2.mw which derives from hw2_I1.mw.

hw2_I1.mw works but example_hw2.mw doesn't work and the differences between two codes are two new function I added to the dsolve which are η(t) and I2(t). The I2(t) is the second part of I1(t) at the interval t>t* which subject to Phi(t*)=0.

So how to make the sentence 'if |(H(t))/(omega)|>1 then eta(t)=0 else eta(t)=arccos(-(H(t))/(omega))' and 'I2(t) = (int(p(t), x = -eta(t) .. eta(t)))/Pi' work?

### How to calculate that integral?...

November 10 2015
0 14

I have in mind

.

My unsuccessful trials are

evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01akc));

The maximum number of subdivisions has
been reached: max_num_subint = 500

and

evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01akc, methodoptions = [maxintervals = 2000]));

The maximum number of subdivisions has
been reached: max_num_subint = 2000

and

evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01ajc));

The integral is probably divergent or slowly convergent.

Mathematica cracks it without any options, producing 0.323367.

### Numerical Amounts of Definite Integrals...

September 23 2015
0 2

------------------------------------------------------------------------------------------------------------------------------

restart:

Digits :=30: m := 4: g :=0.3: nu := 0.4: a := 1:k:=0.2:

W:=cos(n*2*evalf(Pi)*( r-k*a)/((1-k)*a)):

ODE:=((2*(diff(W, r, r, r, r))+2*(diff(W, r, r, r))/r-4*(diff(W, r, r))/r^2+4*(diff(W, r))/r^3-(2*(1-nu))*(diff(W, r, r, r))/r+(4*(1-nu))*(diff(W, r, r))/r^2-(4*(1-nu))*(diff(W, r))/r^3)*r*(1+g*r/a)^3+(2*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*(1+g*r/a)^3+(6*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*r*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*r*(1+g*r/a)*g^2/a^2-((2*(diff(W, r, r, r)+(diff(W, r, r))/r-(diff(W, r))/r^2))/r-(2*(diff(W, r, r)+(diff(W, r))/r))/r^2-(2*(1-nu))*(diff(W, r, r, r))/r+(2*(1-nu))*(diff(W, r, r))/r^2)*r*(1+g*r/a)^3-((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r)*(1+g*r/a)^3-(3*((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r))*r*(1+g*r/a)^2*g/a)/(2*(diff(W, r, r))*r+2*(diff(W, r))) :

for i from 1 to m do  for j from 1 to m do
C[i,j]:=int(subs(n=i,ODE)*subs(n=j,W),r=k*a..a)
end do:end do:

### Why can't Maple calculate it?...

September 15 2015
1 5

why when maple cant solve the following?

### Slow and not accurate...

September 07 2015
1 9

restart: with(plots):
H := a -> piecewise(a>=0,1):
f1 := y->(H(y-1*Pi)-H(y-2*Pi))*sin(y)^2:

g1:=(f1(y)/sqrt(4*Pi*t))*(sin((x-y)^2/4/t+Pi/4)-sin((x+y)^2/4/t+Pi/4)):
g2:= int(g1, y= 0..100):

g3:= diff(g2,t):
g4:= diff(g2,x\$2):
g5:= (g3^2+g4^2)/2:
E2:= unapply(Int(g5, x= 0..100, epsilon= 1e-4, digits= 7), t):
CodeTools:-Usage( plot(E2, 0..20, numpoints= 50, labels= [t, E]));

The above mentioned code should give constant figure, but it takes a lot of time and not accurate.

If you can help me to improve these codes, I would be pleased.

Thanks!

### Why cannot I plot it?...

August 20 2015
3 12

I need a help about running the following codes..

restart:
d:=1:
s:=0.8:
c1:=sqrt((s)/Pi/r^3)/2 * (-sin(r*(u-1)^2/4/(s)+Pi/4)+sin(r*(u+1)^2/4/(s))/sqrt(2)):

c22:=-((u+1)/(4*Pi*r*sqrt(y-1)))*(exp(-r*y*(u+1)^2/(8*s)))*(sin(r*y*(u+1)^2/8/(s*(y-1))+Pi/4)/2+sin(r*y*(u-1)^2/8/(s*(y-1))+Pi/4)):
c2:=Int(c22, y= 1..100):

c33:=(sin(r*y*(u+1)^2/8/(s*(y-1))+Pi/4)+sin(r*y*(u-1)^2/8/(s*(y-1))+Pi/4))*(((d*s)/(Pi*(r^2)*y*sqrt(y-1))*exp(-r*y*(u+1)^2/8/s))-((d^2*sqrt((2*s^3)/(Pi*(y-1)*y^3*r^5)))*exp(d*(u+1)+(2*d^2*s)/(y*r))*erfc((r*y*(u+1)+4*d*s)/(2*sqrt(2*s*r*y))))):
c3:=Int(c33, y= 1..100):

g1:=c1+c2+c3:
g2:= unapply(Int(g1, r= 1..infinity, epsilon=1e-4,digits=7),u):
plot(g2, 0..10, numpoints=100);

Thank you!

### How to integrate the function...

August 18 2015
1 3

Dear All

I am trying to integrate a function, however Maple is not giving me the results. I have tried to use int as well as evalf however I am still not getting the results.

I would be grateful if you could please suggest me a way out. I have attached the maple file for your reference.

ThanksExample.mw

### a few integrals in Maple...

June 13 2015
1 6

Trying a few integrals in Maple -- doesn't seem to handle them very well. Any workarounds please?

f1(p,b):= 1/(p^2 + b^2)^2 ;

f2(p,b):= exp(-p/b)^2;

T1pbm := Int(q*f1(q, b)*ln((p+q)^2+m^2), q = 0 .. infinity);

T2pbm := Int(q*f1(q, b)*ln((p-q)^2+m^2), q = 0 .. infinity);

with(IntegrationTools):

PT1 := evalf(Parts(T1pbm, q*f1(q, b), ln((p+q)^2+m^2)));

PT2 := evalf(Parts(T2pbm, q*f1(q, b), ln((p-q)^2+m^2)));

Ev := evalf(-pi*c*Int*(p*f1(p, b)*(PT1-PT2), p = 0 .. infinity))

### How to integrate this expression in maple...

May 20 2015
1 10

Hello Everyone

I have an expression which I wish to integrate. I would be grateful if you could please help me with it. I have uploaded the maple file for your refrence.

Thanks a lot for your time.

IntegrationExample.mw

### Can't figure this out...

April 06 2015
1 7

Consider

> z := Int(f(t-s), s=0..1);

The result is clearly a function of t (and definitely not a function of s, which is a dummy variable).  Let's define

> F := unapply(z, t);

Then

> F(q);

as expected.  However:

> F(s);

which is not correct, as this confuses the argument s of F with the dummy integration variable s.  How would you salvage the situation?

### Problem with integration....

April 06 2015
0 11

I am performing the int operation on an experssion but it does not consider constants to be constants. For example, maple is considering this constant namely, f'(-1) or eval(diff(f(x), x), x=-1) as a function and henceforth does not give the desired output. Please tell me how to make eval(diff(f(x), x), x=-1) as a constant function or to say, how to convert any given function in to a constant function.

Thank you for your time and help!

### Why does Maple not use the +C at the end of an ind...

April 04 2015
0 4

We're starting on indefinite integrals in my 1st year calculus class.

A quick example would be int(sin(x), x);=-cos(x)+C

Maple doesn't add the +C on the end of it's solution. Can someone explain or point me to a resource? I've tried searching but I can't find an answer.

### An unknown error int command to use...

February 19 2015
2 4

Hi number of officials,

As I enter the command defined 'int' I get an error message.

What can I do. Can you help me.

Commands Entered:

int(x^2+3*x, x);

ansvers:

Error, (in int) wrong number (or type) of arguments: invalid option value passed to indefinite integration: {}

### How do i solve integration of odes using composite...

February 13 2015
1 5

hai everyone. i am currently trying to solve an integration of the following ∫g(η)dη . integrate from 0 to 10.

from the following odes.

f ''' +1-(f ')2 +ff ''=0,

g''-gf'+fg'=0,

with boundary conditions f(0)=0, f'(0)=λ, f'(∞)=1, g(0)=1,g(∞)=0

First, i solve the odes using the shooting method. then i used the trapezoidal rule to solve for the integration of g(eta) using the following codes

> with(student);
> trapezoid(g(eta), eta = 0 .. 10, 10);
> evalf(%);

it seems that it can not read the data from the shooting method. can anyone suggest why it is happening?

thank you verymuch for your concern :)

### Expected Value of a function...

January 08 2015
0 2

Hello people in Mapleprimes,

I want to do calculations about an expected value.

For example,

expectedvalueofc.pdf

that is, \int_a^b c d \Omega

where, \Omega is a distribution function of c.

But, I don't know whether this equation can be put into worksheet.

Is there no way other than writing this as

\int_a^b c g(c) dc,

where g shows a probability density function.

Can I use Statistics[ExpectedValue] to calculate expected value with a general distribution function, not specified

to normal distribution?

I hope you will give me some hints.

Best wishes.

 1 2 3 4 5 Page 1 of 5


text:
# cf.List.match_by_property¶

List.match_by_property(*mode, **properties)[source]

Whether or not properties satisfy conditions.

New in version 3.0.0.

Parameters: mode: optional Define the behaviour when multiple conditions are provided. By default (or if the mode parameter is 'and') the match is True if the field construct satisfies all of the given conditions, but if the mode parameter is 'or' then the match is True when at least one of the conditions is satisfied. properties: optional Define conditions on properties. Properties are identified by the name of a keyword parameter. The keyword parameter value defines a condition to be applied to the property, and is either a string (e.g. 'latitude'); a Query object (e.g. cf.eq('longitude')); or a compiled regular expression (e.g. re.compile('^atmosphere')) that is compared with the property value via re.search. If the value is None then the condition is one of existence and is satisfied if the property exists, regardless of its value. Otherwise the condition is satisfied if the property equals the value. Parameter example: To see if there is a ‘standard_name’ property of ‘time’: standard_name='time'. Parameter example: To see if there is a ‘valid_min’ property of that is less than -999: valid_min=cf.lt('-999). Parameter example: To see if there is a ‘long_name’ property with any value: long_name=None. bool Whether or not the conditions are met.

Examples:

>>> f.match_by_property(standard_name='longitude')

>>> f.match_by_property(standard_name='longitude', foo='cf.set(['bar', 'not_bar'])

>>> f.match_by_property(long_name=re.compile('^lon'))


text:
# On the Role of Time in Learning

By and large the process of learning concepts that are embedded in time is regarded as quite a mature research topic. Hidden Markov models, recurrent neural networks are, amongst others, successful approaches to learning from temporal data. In this paper, we claim that the dominant approach minimizing appropriate risk functions defined over time by classic stochastic gradient might miss the deep interpretation of time given in other fields like physics. We show that a recent reformulation of learning according to the principle of Least Cognitive Action is better suited whenever time is involved in learning. The principle gives rise to a learning process that is driven by differential equations, that can somehow descrive the process within the same framework as other laws of nature.

## Authors

• 23 publications
• 45 publications
• ### Least Action Principles and Well-Posed Learning Problems

Machine Learning algorithms are typically regarded as appropriate optimi...
07/04/2019 ∙ by Alessandro Betti, et al. ∙ 0

• ### Cognitive Action Laws: The Case of Visual Features

This paper proposes a theory for understanding perceptual learning proce...
08/28/2018 ∙ by Alessandro Betti, et al. ∙ 14

• ### Stochastic Physics-Informed Neural Networks (SPINN): A Moment-Matching Framework for Learning Hidden Physics within Stochastic Differential Equations

Stochastic differential equations (SDEs) are used to describe a wide var...
09/03/2021 ∙ by Jared O'Leary, et al. ∙ 0

• ### Hidden Markov models are recurrent neural networks: A disease progression modeling application

Hidden Markov models (HMMs) are commonly used for sequential data modeli...
06/04/2020 ∙ by Matt Baucum, et al. ∙ 0

• ### Attacker Behaviour Profiling using Stochastic Ensemble of Hidden Markov Models

Cyber threat intelligence is one of the emerging areas of focus in infor...
05/28/2019 ∙ by Soham Deshmukh, et al. ∙ 0

• ### Developing Constrained Neural Units Over Time

In this paper we present a foundational study on a constrained method th...
09/01/2020 ∙ by Alessandro Betti, et al. ∙ 0

• ### Motion Invariance in Visual Environments

The puzzle of computer vision might find new challenging solutions when ...
07/14/2018 ∙ by Alessandro Betti, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

The process of learning has been recently formulated under the framework of laws of nature derived from variational principle [1]. While the paper addresses some fundamental issues on the links with mechanics, a major open problem is the one connected with the satisfaction of the boundary conditions of the Euler-Lagrange equations of learning.

This paper springs out from recent studies especially on the problem of learning visual features [3, 4, 2] and it is also stimulated by a nice analysis on the interpretation of Newtonian mechanics equations in the variational framework [5]. It is pointed out that the formulation of learning as Euler-Lagrange (EL) differential equation is remarkably different with respect to classic gradient flow. The difference is mostly originated from the continuous nature of time; while gradient flow has a truly algorithmic flavor, the EL-equations of learning, which are the outcome of imposing a null variation of the action, can be interpreted as laws of nature.

The paper shows that learning is driven by fourth-order differential equations that collapses to second-order under an intriguing interpretation connected with the mentioned result given in [5] concerning the arising of Newtonian laws.

## 2 Euler-Lagrange equations

Consider an integral functional of the following form

 A(q):=∫tNt1L(t,q(t),˙q(t))dt (1)

where maps a point into the real number and is a map of . Consider a partition of the interval into subintervals of length . Given a function one can identify the point , and in general one can define the subset of

 Xε:={(q(t1),q(t2),…q(tN))∈RN:q∈X}.

Now consider the and consider the following “approximation” of the functional integral :

 Aε(x1,…,xN):=εN−1∑k=1L(k,xk,Δεxk),

where . The stationarity condition on is , thus we have

 ∇iAε(x)=ε∇i[L(i−1,xi−1,Δεxi−1)+L(i,xi,Δεxi)].

Using the fact that and we get

 ∇iAε(x) =ε[Lp(i−1,xi−1,Δεxi−1)ε−1+Lq(i,xi,Δεxi)−Lp(i,xi,Δεxi)ε−1] (2) =εLq(i,xi,Δεxi)−εLp(i,xi,Δεxi)−Lp(i−1,xi−1,Δεxi−1)ε. (3)

This means that the condition implies

 Lq(i,xi,Δεxi)−ΔεLp(i−1,xi−1,Δεxi−1)=0,i=2,…,N−1, (4)

where, consistently with our previous definition we are assuming that .

This last equation is indeed the discrete counterpart of the Euler-Lagrange equations in the continuum:

 Lq(t,u(t),˙u(t))−ddtLp(t,u(t),˙u(t))=0,t∈[t1,tN]. (5)

The discovery of stationary points of the cognitive action defined by Eq. 1 is somewhat related with the gradient flow that one might activate to optimize , namely by the classic updating rule

 Xϵ←Xϵ−η∇Aϵ. (6)

This flow is clearly different with respect to Eq. 4 (see also its continuous counterpart 5). Basically, while the Euler-Lagrange equations yield an updating computation model of , the gradient flow moves

## 3 A surprising link with mechanics

Let us consider the action

 A=∫T0dt h(t)¯L(x(t),q(t),˙q(t)). (7)

The Euler-Lagrange equations are

 h¯Lq−˙h¯L˙q−hddt¯L˙q=0. (8)

Since we have

 ddt¯L˙q+˙hh¯L˙q−¯Lq=0. (9)

In case we make no assumption on the variation then these equations must be joined with the boundary condition . Now suppose , with . Then Eq. 9 becomes

 ddtT˙q+˙hhT˙q−γVq=0. (10)

The Lagrangian , with and , and , is the one used in mechanics, which returns the Newtonian equations

 m¨q+θ˙q+Vq=0

of the damping oscillator. We notice in passing that this equation arises when choosing the classic action from mechanics, which does not seem to be adequate for machine learning since the potential (analogous to the loss function) and the kinetic energy (analogous to the regularization term) come with different sign. It is also worth mentioning that the trivial choice

yields a pure oscillation with no dissipation, which is on the opposite the fundamental ingredient of learning.

This Lagrangian, however, does not convey a reasonable interpretation for a learning theory, since one very much would like , so as could be nicely interpreted as a temporal regularization parameter. Before exploring a different interpretation, we notice in passing that large values of , which corresponds with strong dissipation on small masses yields the gradient flow

 ˙q=−1θVq

## 4 Laws of learning and gradient flow

While the discussion in the previous section provides a somewhat surprising links with mechanics, the interpretation of the learning as a problem of least actions is not very satisfactory since, just like in mechanics, we only end up into stationary points of the actions that are typically saddle points.

We will see that an appropriate choice of the Lagrangian function yields truly laws of nature where Euler-Lagrange equations turns out to minimize corresponding actions that are appropriate to capture learning tasks. We consider kinetic energies that also involve the acceleration and two different cases which depend on the choice of . The new action is

 A2=∫T0dt L(t,q(t),˙q(t),¨q(t)), (11)

where . In the continuum setting, the corresponding Euler-Lagrange equations can be determined by considering the variation associated with , where is a variation and . We have

 δA2=s∫T0dt (Lqv+Lp˙v+La¨v). (12)

If we integrate by parts, we get

 ∫T0dt Lp˙v=−∫T0dt vddtLp+[vLp]T0 ∫T0dt La¨v=−∫T0dt ˙vddtLa+[˙vLa]T0=∫T0dt vd2dt2La−[vddtLa]T0+[˙vLa]T0,

and, therefore, the variation becomes

 δA2=s∫T0dt v(d2dt2La−ddtLp+Lq)+[v(Lp−ddtLa)]T0+[˙vLa]T0=0.

Now, suppose we give the initial conditions on and . In that case we can promptly see that this is equivalent with posing and . Hence, we get the Euler-Lagrange equation when posing

 v(T)(Lp∣∣t=T−ddtLa∣∣∣t=T)+˙v(T)La∣∣t=T=0.

Now if we choose as a constant we immediately get

 Lp∣∣t=T−ddtLa∣∣∣t=T=0, (13)

while if we choose as an affine function, when considering the above condition we get

 La∣∣∣t=T=0. (14)

Finally, the stationary point of the action corresponds with the Euler-Lagrange equations

 d2dt2La−ddtLp+Lq=0, (15)

that holds along with Cauchy initial conditions on and boundary conditions 13 and 14.

Now, let us consider the case in which . The Euler-Lagrange equations become

 d2dt2¯La+2˙hhddt¯La+¨hh¯La−˙hh¯Lp−ddt¯Lp+Lq=0. (16)

If we consider again the case we get

 d2dt2Ta+2˙hhddtTa+¨hhTa−˙hhTp−ddtTp+γVq=0. (17)

Now we consider the kinetic energy associated with the differential operator

 T=12θ2(Pq)2=12θ2(α1˙q+α2¨q)2=12α21θ2˙q2+α1α2θ2˙q¨q+12α22θ2¨q2 (18)

Let us consider the following two different cases of . In both cases, they convey the unidirectional structure of time.

1. In this case, when plugging the kinetic energy in Eq. 18 into Eq. 17 we get

 1θ2q(4)+2θq(3)+α1α2θ+α22θ2−α21α22θ2¨q+α1α2θ2−α21θα22θ2˙q+γα22Vq=0. (19)

These equations hold along with Cauchy conditions and boundary conditions given by Eq. 13 and 14, that turn out to be

 α21θ2˙q(T)−α22θ2q(3)(T)=0 (20) α1α2θ2˙q(T)+α22θ2¨q(T)=0. (21)

A possible satisfaction is . Notice that as the Euler-Lagrange Eq. 19 reduces to

 ¨q+α1α2˙q+γα22Vq=0. (22)

and the corresponding boundary conditions are always verified.

2. Let us assume that in the kinetic energy 18 and . In particular we consider the action

 A=∫T0dt e−t/ϵ(12ϵ2ρ¨q2+12ϵν˙q2+V(q,t)) (23)

In this case the Lagrange equations turn out to be

 ϵ2ρq(4)−2ϵρq(3)+(ρ−ϵν)¨q+ν˙q+γVq=0, (24)

along with the boundary conditions

 ϵ2ρ¨q(T)=0 (25) ϵν¨q(T)−ρϵ2q3(T)=0. (26)

Interesting, as the Euler-Lagrange equations become:

 ρ¨q+ν˙q+γVq=0, (27)

where the boundary conditions are always satisfied.

Notice that while we can choose the parameters in such a way that Eq. 19 is stable, the same does not hold for Eq. 24. Interestingly, stability can be gained for , which is corresponds with a singular solution. Basically if we denote by the solution associated with , we have that does not approximate corresponding at in case in which we can choose arbitrarily large domains .

## 5 Conclusions

While machine learning is typically framed in the statistical setting, in this case time is exploited in such a way that one relies on a sort of underlying ergodic principle according to which statistical regularities can be captured in time. This paper shows that the continuous nature of time gives rise to computational models of learning that can be interpreted as laws of nature. Unlike traditional stochastic gradient, the theory suggests that, just like in mechanics, learning is driven by the Euler-Lagrange equations that minimize a sort of functional risk. The collapsing from forth- to second-order differential equations opens the doors to an in-depth theoretical and experimental investigation.

## Acknowledgments

We thank Giovanni Bellettini for insightful discussions.


text:
# Ferrers (1877) Gravitational Potential for Inhomogeneous Ellipsoids

In an accompanying chapter titled, Properties of Homogeneous Ellipsoids (1), we have shown how analytic expressions may be derived for the gravitational potential inside of uniform-density ellipsoids. In that discussion, we largely followed the derivations of EFE. In the latter part of the nineteenth-century, N. M. Ferrers, (1877, Quarterly Journal of Pure and Applied Mathematics, 14, 1 - 22) showed that very similar analytic expressions can be derived for ellipsoids that have certain, specific inhomogeneous mass distributions. Here we specifically discuss the case of configurations that exhibit concentric ellipsoidal iso-density surfaces of the form,

 $~\rho$ $~=$ $~ \rho_c \biggl[ 1 - \biggl( \frac{x^2}{a_1^2} + \frac{y^2}{a_2^2} + \frac{z^2}{a_3^2}\biggr) \biggr] \, .$
SUMMARY — copied from accompanying, Trial #2 Discussion

After studying the relevant sections of both EFE and BT87 — this is an example of a heterogeneous density distribution whose gravitational potential has an analytic prescription. As is discussed in a separate chapter, the potential that it generates is sometimes referred to as a Ferrers potential, for the exponent, n = 1.

In our accompanying discussion we find that,

 $~\frac{ \Phi_\mathrm{grav}(\bold{x})}{(-\pi G\rho_c)}$ $~=$ $~ \frac{1}{2} I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) ~+ \biggl( A_{12} x^2y^2 + A_{13} x^2z^2 + A_{23} y^2z^2\biggr) ~+ \frac{1}{6} \biggl(3A_{11}x^4 + 3A_{22}y^4 + 3A_{33}z^4 \biggr) \, ,$

where,

 for $~i \ne j$ $~A_{ij}$ $~\equiv$ $~-\frac{A_i-A_j}{(a_i^2 - a_j^2)}$ [ EFE, §21, Eq. (107) ]
 for $~i = j$ $~2A_{ii} + \sum_{\ell = 1}^3 A_{i\ell}$ $~=$ $~\frac{2}{a_i}$ [ EFE, §21, Eq. (109) ]

More specifically, in the three cases where the indices, $~i=j$,

 $~3A_{11}$ $~=$ $~ \frac{2}{a_1^2} - (A_{12} + A_{13}) \, ,$ $~3A_{22}$ $~=$ $~ \frac{2}{a_2^2} - (A_{21} + A_{23}) \, ,$ $~3A_{33}$ $~=$ $~ \frac{2}{a_3^2} - (A_{31} + A_{32}) \, .$

## Derivation

 Other references to Ferrers Potential: Ferrers, N. M. (1877, Quarterly Journal of Pure and Applied Mathematics, 14, 1) … from BT87 References (p. 711) Galpy methods Lucas Antonio Caritá, Irapuan Rodriguez, & I. Puerari (2017) Explicit Second Partial Derivatives of the Ferrers Potential Martin G. Abrahamyan (2006, Astrophysics, 49(3), 306-319), Anisotropic and inhomogeneous S-type Riemann ellipsoids inside spheroidal halos. II

Following §2.3.2 (beginning on p. 60) of BT87, let's examine inhomogeneous configurations whose isodensity surfaces (including the surface, itself) are defined by triaxial ellipsoids on which the Cartesian coordinates $~(x_1, x_2, x_3)$ satisfy the condition that,

 $~m^2$ $~\equiv$ $~a_1^2 \sum_{i=1}^{3} \frac{x_i^2}{a_i^2} \, ,$ [ EFE, Chapter 3, §20, p. 50, Eq. (75) ] [ BT87, §2.3.2, p. 61, Eq. (2-97) ]

be constant. More specifically, let's consider the case (related to the so-called Ferrers potentials) in which the configuration's density distribution is given by the expression,

 $~\rho(m^2)$ $~=$ $~\rho_c \biggl[1 - \frac{m^2}{a_1^2}\biggr]^n$ $~=$ $~ \rho_c \biggl[1 - \sum_{i=1}^{3} \frac{x_i^2}{a_i^2} \biggr]^n$ $~=$ $~ \rho_c \biggl[1 - \biggl( \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2}\biggr) \biggr]^n \, .$
 NOTE:     In our accompanying discussion of compressible analogues of Riemann S-type ellipsoids, we have discovered that — at least in the context of infinitesimally thin, nonaxisymmetric disks — this heterogeneous density profile can be nicely paired with an analytically expressible stream function, at least for the case where the integer exponent is, n = 1.

According to Theorem 13 of EFE — see his Chapter 3, §20 (p. 53) — the potential at any point inside a triaxial ellipsoid with this specific density distribution is given by the expression,

 $~\Phi_\mathrm{grav}(\bold{x})$ $~=$ $~ - \frac{\pi G \rho_c a_1 a_2 a_3}{(n+1)} \int_0^\infty \frac{ du}{\Delta } Q^{n+1} \, ,$ [ EFE, Chapter 3, §20, p. 53, Eq. (101) ]

where, $~\Delta$ has the same definition as above, and,

 $~Q$ $~\equiv$ $~ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \, .$

For purposes of illustration, in what follows we will assume that, $~a_1 > a_2 > a_3$.

### The Case Where n = 0

When $~n = 0$, we have a uniform-density configuration, and the "interior" potential will be given by the expression,

 $~\Phi_\mathrm{grav}(\bold{x})$ $~=$ $~ - \pi G \rho_c a_1 a_2 a_3 \int_0^\infty \frac{ du}{\Delta } \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr]$ $~=$ $~ - \pi G \rho_c a_1 a_2 a_3 \biggl\{ \int_0^\infty \frac{ du}{\Delta } - \int_0^\infty \frac{ du}{\Delta } \biggl( \frac{x^2}{ a_1^2 + u } \biggr) - \int_0^\infty \frac{ du}{\Delta } \biggl( \frac{y^2}{ a_2^2 + u } \biggr) - \int_0^\infty \frac{ du}{\Delta } \biggl( \frac{z^2}{ a_3^2 + u } \biggr) \biggr\}$ $~=$ $~ - \pi G \rho_c a_1 a_2 a_3 \biggl\{ \int_0^\infty \frac{ du}{\Delta } ~ - ~x^2 \int_0^\infty \frac{ du}{\Delta (a_1^2 + u) } ~ - ~y^2 \int_0^\infty \frac{ du}{\Delta (a_2^2 + u) } ~ - ~ \int_0^\infty \frac{ du}{\Delta (a_3^2 + u) } \biggr\}$ $~=$ $~ -\pi G \rho_c \biggl[ I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) \biggr] \, .$

As a check, let's see if this scalar potential satisfies the differential form of the

Poisson Equation

 $\nabla^2 \Phi = 4\pi G \rho$

Given that,

 $~\sum_{\ell = 1}^3 A_\ell$ $~=$ $~2 \, ,$ [ EFE, §21, Eq. (108) ]

we find,

 $~\nabla^2\Phi_\mathrm{grav} = \biggl[\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\biggr]\Phi_\mathrm{grav}$ $~=$ $~ + 2\pi G \rho_c (A_1 + A_2 + A_3) = 4\pi G\rho_c \, .$

Q.E.D.

### The Case Where n = 1

When $~n = 1$, we have a specific heterogeneous density configuration, and the "interior" potential will be given by the expression,

 $~\frac{ \Phi_\mathrm{grav}(\bold{x})}{(-\pi G\rho_c)}$ $~=$ $~ \frac{1}{2} a_1 a_2 a_3 \int_0^\infty \frac{ du}{\Delta } \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr]^2$ $~=$ $~ \frac{1}{2} a_1 a_2 a_3 \biggl\{ \int_0^\infty \frac{ du}{\Delta } \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr] ~- ~ x^2 \int_0^\infty \frac{ du}{\Delta (a_1^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr]$ $~ ~- ~y^2 \int_0^\infty \frac{ du}{\Delta (a_2^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr] ~ - ~z^2 \int_0^\infty \frac{ du}{\Delta (a_3^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr] \biggr\} \, .$

The first definite-integral expression inside the curly braces is, to within a leading factor of $~\tfrac{1}{2}$, identical to the entire expression for the normalized potential that was derived in the case where n = 0. That is, we can write,

 $~\frac{ \Phi_\mathrm{grav}(\bold{x})}{(-\pi G\rho_c)}$ $~=$ $~ \frac{1}{2} \biggl[ I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) \biggr] ~- \frac{1}{2} a_1 a_2 a_3 \biggl\{ ~ x^2 \int_0^\infty \frac{ du}{\Delta (a_1^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr]$ $~ ~+~y^2 \int_0^\infty \frac{ du}{\Delta (a_2^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr] ~ + ~z^2 \int_0^\infty \frac{ du}{\Delta (a_3^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr] \biggr\} \, .$

Then, from §22, p. 56 of EFE, we see that,

 $~a_1 a_2 a_3 \int_0^\infty \frac{ du}{\Delta (a_i^2 + u)} \biggl[ 1 - \sum_{\ell = 1}^3 \frac{x_\ell^2}{ a_\ell^2 + u } \biggr]$ $~=$ $~ \biggl( A_i - \sum_{\ell=1}^3 A_{i\ell} x_\ell^2 \biggr) \, .$ [ EFE, Chapter 3, §22, p. 53, Eq. (125) ]

Applying this result to each of the other three definite integrals gives us,

 $~\frac{ \Phi_\mathrm{grav}(\bold{x})}{(-\pi G\rho_c)}$ $~=$ $~ \frac{1}{2} \biggl[ I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) \biggr] ~- \frac{x^2}{2} \biggl( A_1 - \sum_{\ell=1}^3 A_{1\ell} x_\ell^2 \biggr) ~- \frac{y^2}{2} \biggl( A_2 - \sum_{\ell=1}^3 A_{2\ell} x_\ell^2 \biggr) ~- \frac{z^2}{2} \biggl( A_3 - \sum_{\ell=1}^3 A_{3\ell} x_\ell^2 \biggr) \, .$ $~=$ $~ \frac{1}{2} \biggl[ I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) \biggr] ~- \frac{x^2}{2} \biggl[ A_1 - \biggl( A_{11}x^2 + A_{12}y^2 + A_{13}z^2 \biggr) \biggr]$ $~ ~- \frac{y^2}{2} \biggl[ A_2 - \biggl( A_{21}x^2 + A_{22}y^2 + A_{23}z^2 \biggr) \biggr] ~- \frac{z^2}{2} \biggl[ A_3 - \biggl( A_{31}x^2 + A_{32}y^2 + A_{33}z^2 \biggr) \biggr]$ $~=$ $~ \frac{1}{2} I_\mathrm{BT} a_1^2 - \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) ~+ \biggl( A_{12} x^2y^2 + A_{13} x^2z^2 + A_{23} y^2z^2\biggr) ~+ \frac{1}{2} \biggl(A_{11}x^4 + A_{22}y^4 + A_{33}z^4 \biggr) \, ,$

where,

 for $~i \ne j$ $~A_{ij}$ $~\equiv$ $~-\frac{A_i-A_j}{(a_i^2 - a_j^2)}$ [ EFE, §21, Eq. (107) ]
 for $~i = j$ $~2A_{ii} + \sum_{\ell = 1}^3 A_{i\ell}$ $~=$ $~\frac{2}{a_i}$ [ EFE, §21, Eq. (109) ]

and we have made use of the symmetry relation, $~A_{ij} = A_{ji}$. Again, as a check, let's see if this scalar potential satisfies the differential form of the

Poisson Equation

 $\nabla^2 \Phi = 4\pi G \rho$

We find,

 $~\nabla^2 \biggl[ \frac{\Phi_\mathrm{grav}}{-2\pi G \rho_c} \biggr]$ $~=$ $~ \frac{1}{2}\biggl[\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\biggr] \biggl[- \biggl(A_1 x^2 + A_2 y^2 +A_3 z^2 \biggr) ~+ \biggl( A_{12} x^2y^2 + A_{13} x^2z^2 + A_{23} y^2z^2\biggr) ~+ \frac{1}{2} \biggl(A_{11}x^4 + A_{22}y^4 + A_{33}z^4 \biggr) \biggr]$ $~=$ $~ \frac{\partial}{\partial x} \biggl[- A_1 x ~+ A_{12} x y^2 + A_{13} x z^2 ~+ A_{11}x^3 \biggr] +\frac{\partial}{\partial y} \biggl[- A_2 y ~+ A_{12} x^2y + A_{23} y z^2~+ A_{22}y^3 \biggr] + \frac{\partial}{\partial z}\biggl[- A_3 z ~+ A_{13} x^2z + A_{23} y^2z~+ A_{33}z^3 \biggr]$ $~=$ $~ \biggl[- A_1 + A_{12} y^2 + A_{13} z^2 ~+ 3A_{11}x^2 \biggr] + \biggl[- A_2 + A_{12} x^2 + A_{23} z^2~+ 3A_{22}y^2 \biggr] + \biggl[- A_3 + A_{13} x^2 + A_{23} y^2~+ 3A_{33}z^2 \biggr]$ $~=$ $~ - (A_1 + A_2 + A_3) + x^2(3A_{11} + A_{12} + A_{13}) + y^2( 3A_{22} + A_{12} + A_{23}) + z^2( 3A_{33} + A_{13} + A_{23})\, .$

In addition to recognizing, as stated above, that $~(A_1 + A_2 + A_3) = 2$, and making explicit use of the relation,

 $~2A_{ii} + \sum_{\ell = 1}^3 A_{i\ell}$ $~=$ $~\frac{2}{a_i} \, ,$

this last expression can be simplified to discover that,

 $~\nabla^2 \biggl[ \frac{\Phi_\mathrm{grav}}{-2\pi G \rho_c} \biggr]$ $~=$ $~ - (2) + \frac{2x^2}{a_1^2} + \frac{2y^2}{a_2^2} + \frac{2z^2}{a_3^2}$ $~\Rightarrow ~~~ \nabla^2 \Phi_\mathrm{grav}$ $~=$ $~ 4\pi G \rho_c \biggl[ 1 - \biggl( \frac{x^2}{a_1^2} + \frac{y^2}{a_2^2} + \frac{z^2}{a_3^2}\biggr) \biggr] \, .$

This does indeed demonstrate that the derived gravitational potential is consistent with our selected mass distribution in the case where n = 1, namely,

 $~\rho$ $~=$ $~ \rho_c \biggl[ 1 - \biggl( \frac{x^2}{a_1^2} + \frac{y^2}{a_2^2} + \frac{z^2}{a_3^2}\biggr) \biggr] \, .$

Q.E.D.


text:
# Storage Allocation

## Stack Storage

Array and pointer

A ----used----- ------unused----
|
sp

# Allocate x bytes
sp += x
return sp-x

• Allocating and freeing take O(1) time.
• Must free consistent with stack discipline
• Limited applicability, but great when it works
• One can allocate on the call stack using alloca(), but this function is deprecated, and the compiler is more efficient with fixed-size frames.

Limitation: there is no way to free memory in the middle of the used-region on the stack. ONly the last object can be freed.

## Heap

C provides malloc() and free(). C++ provides new and delete.

Unlike Java and Python, C and C++ provide no garbage collectors. Heap storage allocated by the programmer must be freed explicitly. Failure to do so can creates a memory leak. Also, watch for dangling pointers and double freeing

Memory checkers (e.g. AddressSanitizer, Valgrind) can assist in finding these pernicious bugs.

## Fixed-size Allocation

• Every piece of storage has the same size
• Unused storage has a pointer to next unused block

Allocate 1 object

x = free;
free = free->next;
return x;

### Fixed-size Deallocation

free object x

x->next = free;
free = x

• Allocating and freeing take O(1) time
• Good temporal locality
• Poor spatial locality due to external fragmentation - blocks distributed across virtual memory - which can increase the size of the page table and cause disk thrashing (page fault)
• THe translation lookaside buffer(TLB) can also be a problem (map virtual address to physical address)

### Mitigating External Fragmentation

• Keep a free list per disk page.
• Allocate from the free list for the fullest page.
• Free a block of storage to the free list for the page on which the block resides.
• If a page becomes empty(only free-list items), the virtual-memory system can page it out without affecting program performance
• 90-10 is better than 50-50

Probability that 2 random accesses hit the same p age = .9 x .9 + .1 x .1 = .82 vs .5 x .5 + .5 x .5 = .5

## Variable-Size Allocation

Binned free lists

• Leverage the efficiency of free lists
• Accept a bounded amount of internal fragmentation
• Each bin is going to store a particular size

Allocate x bytes

• If bin k=[lg x] (以2为底log向上取整) is nonempty, return a block.
• Otherwise, find a block in the next larger nonempty bin k' > k, split it up into blocks of size $2^{k^’-1}, 2^{k^’-2}, 2^{k^’-3}, … ,2^{k}, 2^{k}$, and distribute the pieces.

Note that we’ll have two $2^{k}$, one of them will be returned.

For example, x=3, k = log[x] = 2. Bin 2 is empty

So we are going to look for a non-empty bin, which is 4 in this case. so k' = 4.

Next, we’ll split the block into 2^(3), 2^(2), 2^(2) and return 2^(2) = 4, as shown below.

if no larger blocks exist, ask the OS to allocate more memory.

mmap, sbrk those are system calls for asking memory

In practice, this exact scheme isn’t used. There are many variants. It turns out that the efficiency is very important for small allocations. The overhead of this scheme could cause performance bottlenecks. In reality, we usually don’t go all the way down to the block of size 1. We might stop at block of size 8 bytes. This does increase internal fragmentations because we have some waste space.

Alternatively, we can also group blocks into pages. All of blocks in the same page have the same size.

The standard implementation of malloc uses mmap andd sbrk to allocate memory. It doesn’t use any memory allocator.

### Analysis of Binned Free Lists

Theorem. Suppose that the maximum amount of heap memory in use at any time by a program is M. If the heap is managed by a BFL allocator, the amount of virtual memory consumed by heap storage is O(MlgM)

Proof. An allocation request for a block of size x consumes 2^{lg[x]} <= 2x storage. Thus, the amount of virtual memory devoted to blocks of size 2^k is at most 2M. Since there are most lgM free lists, the theorem holds.

## Storage Layout of a program

This is how the virtual memory address space is laid out.

In practice, the stack and heap pointer are never going to hit each other because we’re working with 64bit addresses.

### How virtual is virtual memory

Q: Since a 64-bit addressed space takes over a century to write at rate of 4 billion bytes per second, we effectively never run out of virtual memory. Why not just allocate out of virtual memory and never free?

A1: Will be running out of physical memory

A2: External fragmentation would be horrendous! The performance of the page table would degrade tremendously leading to disk thrashing, since all nonzero memory must be backed up on disk in page-size blocks.

Goal of storage allocators

Use as little virtual memory as possible, and try to keep the used portions relatively compact.

## Garbage Collection

Terminology

• Roots are objects directly accessible by the program (globals, stack, etc.).
• Live objects are reachable from the roots by following pointers.
• Dead objects are inaccessible and can be recycled.

In order for GC to work, in general, you need to have the GC identify pointers, which requires

• Strong typing.
• Prohibit pointer arithmetic (which may slow down some programs). Beacuse if the program changes the location of the pointer, then GC no longer knows where the memory region starts anymore.

### Reference Counting

Keep a count of the number of pointers referencing each object. If the count drops to 0, free the dead object.

A retain cycle is never garbage collected!

Objective-C solves this issue by introducing a two specical pointers, namely strong pointers and weak pointers. The reference count only stores the incoming of strong pointers. The weak pointers don’t contribute to the ref count.

### Mark-and-Sweep GC

Define a Graph Abstraction

Objects and pointers from a directed graph G = (V,E). Live objects reachable from the roots. Use BFS to find the live objects.

# seudo code

queue<vertex> Q;

for (v : vertices) {
if (root(v)) {
v.mark = 1;
enqueue(Q, v);
} else {
v.mark = 0;
}
}

while(!Q.empty()){
u = dequeue(Q);
for (v : v.children) {
if(v.mark == 0){
v.mark = 1;
enqueue(Q, v);
}
}
}

The Mark and Sweep procedures has two stages

• Mark Stage: Breadth-first search marked all of live objects
• Sweep Stage: Scan over memory to free unmarked objects

Mark-and-sweep doesn't deal with fragmentation. It doesn’t compact the live objects to be contiguous in memory. It just frees the ones that are unreachables. It doesn’t do anything with the ones that are reachable.

## Stop-And-Copy GC

At a higher level, it is similar to Mark-And-Sweep GC. It uses BFS to identify the live objects. Since all vertices are placed in contiguours storage in Q, we can use our queue as new memory. All unreachable objects will be implicitly deleted. This procedure will deal with external fragmentation.

Linear time to copy and update all vertices.


text:
# Figure 1

 Invariant-mass (mass-difference) distributions of $\Dzero$, $\Dplus$, $\Dstar$, and $\Ds$ candidates and charge conjugates in $1.5< \pt< 2~\gevc$, $16< \pt< 24~\gevc$, $7< \pt< 7.5~\gevc$, and $3< \pt< 4~\gevc$ intervals, respectively. The blue solid lines show the total fit functions as described in the text and the red dashed lines are the combinatorial-background terms. In case of $\Dzero$, the grey dashed line represents the combinatorial background with the contribution of the reflections. The values of the mean ($\mu$) and the width ($\sigma$) of the signal peak are reported together with the signal counts ($S$) and the signal over background ratio ($S/B$) in the mass interval ($\mu-3\sigma,\mu+3\sigma$). The reported uncertainties are only the statistical uncertainties from the fit.


text:
Prerequisites: Monte Carlo Calculation of pi

Author: Christina Lee

### Intro

If you didn’t check it out already, take a look at the post that introduces using random numbers in calculations. Any such simulation is a Monte Carlo simulation. The most used kind of Monte Carlo simulation is a Markov Chain, also known as a random walk, or drunkard’s walk. A Markov Chain is a series of steps where

• each new state is chosen probabilitically

• the probabilities only depend on the current state, no memory.

Imagine a drunkard trying to walk. At any one point, they could progress either left or right rather randomly. Also, just because they had been traveling in a straight line so far does not guaruntee they will continue to do. They’ve just had extremely good luck.

We use Markov Chains to approximate probability distributions.

To create a good Markov Chain, we need

• Ergodicity: All states can be reached

• Global Balance: A condition that ensures the proper equilibrium distribution

### The Balances

Let $\pi_i$ be the probability that a particle is at site $i$, and $p_{ij}$ be the probability that a particle moves from $i$ to $j$. Then Global Balance can be written as,

In non-equation terms, this says the amount of “chain” leaving site $i$ is the same as the amount of “chain” entering site $i$ for every site in equilibrium. There is no flow.

Usually though, we actually want to work with a stricter rule than Global Balance, Detailed Balance , written as

Detailed Balance further constricts the transition probabilities we can assign and makes it easier to design an algorithm. Almost all MCMC algorithms out there use detailed balance, and only lately have certain applied mathematicians begun looking and breaking detailed balance to increase efficiency in certain classes of problems.

### Today’s Test Problem

I will let you know now; this might be one of the most powerful numerical methods you could ever learn. I was going to put down a list of applications, but the only limit to such a list is your imagination.

Today though, we will not be trying to predict stock market crashes, calculate the PageRank of a webpage, or calculate the entropy a quantum spin liquid at zero temperature. We just want to calculate an uniform probability distribution, and look at how Monte Carlo Markov Chains behave.

• We will start with an $l\times l$ grid

• Our chain starts somewhere in that grid

• We can then move up, down, left or right equally

• If we hit an edge, we come out the opposite side

First question! Is this ergodic?

Yes! Nothing stops us from reaching any location.

Second question! Does this obey detailed balance?

Yes! In equilibrium, each block has a probability of $\pi_i = \frac{1}{l^2}$, and can travel to any of its 4 neighbors with probability of $p_{ij} = \frac{1}{4}$. For any two neighbors

and if they are not neighbors,

This is just the equivalent of mod for using in an array that indexes from 1.

Input the size of the grid

The centers of blocks will be used for pictoral purposes

A 5x5 grid after 2,000 steps.

The decreasing standard deviation from 1/25 shown in log base 10.

So, after running the above code and trying to figure out how it works, go back and study some properties of the system.

• How long does it take to forget it’s initial position?

• How does the behaviour change with system size?

• How long would you have to go to get a certain accuracy? …. especially if you didn’t know what distribution you where looking for

So hopefully you enjoyed this tiny introduction to an incredibly rich subject. Feel free to explore all the nooks and crannies to really understand the basics of this kind of simulation, so you can gain more control over the more complex simulations.

Monte Carlo simulations are as much of an art as a science. You need to live them, love them, and breathe them till you find out exactly why they are behaving like little kittens that can finally jump on top of your countertops, or open your bedroom door at 1am.

For all their mishaving, you love the kittens anyway.


text:
# Car journey physics homework

1. Nov 1, 2004

### roger

Homework problem....

Please can you help me with this problem.
I don't understand what its asking and I don't know where to begin :

It says : A car travels at a speed of 50mph from point A to B.
The distance travelled is 1200 km. How long does the journey take ?

Thanks guys for any help !

Roger

2. Nov 1, 2004

### Staff: Mentor

They want you to find the travel time. Use Distance = Speed X Time. Beware of units.

3. Nov 1, 2004

### Tom McCurdy

1200 kilometers (km) × 0.621 = 745.2 miles (mi).
distance=rate*time (in same units)

$$\frac{745.2 miles}{50\frac{miles}{hour}} =$$


text:
If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Dilate triangles

## Problem

triangle, A, prime, B, prime, C, prime is the image of triangle, A, B, C under a dilation whose center is P and scale factor is start fraction, 1, divided by, 4, end fraction.
Triangle ABC. Point P is the midpoint of segment AB.
Which figure correctly shows triangle, A, prime, B, prime, C, prime using the solid line?
Choose 1 answer:
Choose 1 answer:
Stuck?
Stuck?


text:
# CONN1

Connector ElementCONN1 lets you connect NLFE elements that have nonstructural discontinuity.

## Format

<CONN1
id       = "integer"
g1       = "integer"
g2       = "integer"
conn     = "string"
[graph    = "integer"]/>

## Attributes

id
Unique identification number.
g1
First grid identification number.
g2
Second grid identification number, $\text{g1}\ne \text{g2}$ .
conn
String containing at most 12 characters that describe the connection between the coordinates.4
graph
Post processing flag. Use this flag to control how this element is displayed in the animation H3D. Default for graph is 0. 6.

## Example

The example demonstrates the definition of a CONN1 element.

<CONN1 id="1000" g1="101" g2="17" conn="TTTFFFTTTFFF"/>

$\begin{array}{l}{r}_{1}={r}_{2}\\ r{x}_{1}=r{x}_{2}\\ r{y}_{1}=r{y}_{2}\\ r{z}_{1}=r{z}_{2}\end{array}$
4. The letter 'T' in attribute conn indicates the particular kinematic relationship that will be imposed by MotionSolve at all times during the simulation. The attribute conn can have up to 12 'T' (True) or 'F' (False) characters. For example, if conn="TTTFFFFFFFFF", the first three conditions ( ${r}_{1}={r}_{2}$ ) will be imposed and the rest of the conditions (for example, $r{x}_{1}=r{x}_{2}$ , $r{y}_{1}=r{y}_{2}$ , and $r{z}_{1}=r{z}_{2}$ ) will not be imposed by MotionSolve.


text:
Thursday, 17 May 2018

The Implicit Choice in the Maslow Hierarchy

"The hierarchy remains a very popular framework in sociology research, management training and secondary and higher psychology instruction.” So says Wikipedia. Judge an theory by the company that company that keeps it, and Maslow’s Hierarchy should be tossed in the bin for no more reason than that it is "a very popular framework in sociology research, management training and secondary and higher psychology instruction”. These are not reputable, hard-science, subjects. What they are, are normative theories disguised as descriptive ones. Morality passing itself off as science.

Maslow’s Hierarchy is the idea that people have a bunch of needs, some of which need to be met more or less well before we can go on to meeting the others. At the base of the pyramid he put physiological needs;: air, water, food, sleep, clothing, shelter. That’s the Rule of Threes: three minutes without air, three hours without shelter in extreme conditions, three days without water, three weeks without food. Those will kill you. Three days without sleep risks permenant damage to your mind.

Next is Safety, so that we’re not being raided by Vikings, dragged off to prison at two in the morning because we said something wrong, mugged when we take money out of an ATM, let go from work because the order book is looking thin, or getting beaten and abused by parents, teachers, policemen, or the other kids at school.

Given some safety, we can move on to Social Belonging as evidenced by having friends, intimacy, and being on good terms with our family of origin and our own family if we have one.

After that, we have Esteem, that our abilities and contributions are recognised by people whose opinions we care about, and that generally, the people around us think we are a Good Fellow. And then at the top, we have Self-Actualisation, which is realising one’s potential and abilities.

Notice that without the idea that these items are a) needs, b) ordered, and c) must be satisfied in order, this is just a list of stuff that we would like to have. It has no force.

The Hierarchy does not describe how we botch our way through our lives, grabbing an hour of self-actualisation at the gym, an hour of living death on the commute, eight hours of insecure employment (lack of Security) to pay the bills and the taxes that provide policemen and defence (Security, of a sort), before returning to a frugal meal and an empty bed (lack of Social Belonging), while trying to get a promotion, improve our professional networks (Esteem), and maybe get a drink with the Lads at the weekend (Social Belonging). Jeez, what a mess.

A number of things are not on the list: wealth or high income, exceptional athletic, artistic or intellectual achievement, religious vocations, or anything else that requires sustained, time-consuming dedication and the risk that all the effort might not lead to the winner’s podium or the award ceremony. These are examples of self-actualisation, but cannot be achieved without delaying other lower-order needs for so long it counts as abandonment. In other words, without some nifty verbal gymnastics, the Hierarchy is self-contradictory. You can’t have it all. Not without a lot of money, luck and a solid character.

But maybe decribing these compromises wasn’t Maslow’s aim.
Maslow studied what he called exemplary people such as Albert Einstein, Jane Addams, Eleanor Roosevelt, and Frederick Douglass rather than mentally ill or neurotic people, writing that "the study of crippled, stunted, immature, and unhealthy specimens can yield only a cripple psychology and a cripple philosophy.” Maslow studied the healthiest 1% of the college student population.
Maslow originally put sex in the physiological needs, and large numbers of puritans disagreed with him, or prissily said it was there because the survival of the human race. Some descriptions of the Hierarchy leave it out. Was Maslow on to something? Perhaps he thought that if a vigorous young man isn’t getting laid on the regular, he’s going to be distracted in the pursuit of his higher needs? I was a young man once, and I approve that insight.

That was what made me wonder if Maslow was pointing at something else, but happy to be lucratively misunderstood. I started this with the intention of explaining why the Heirarchy was nonsense. Then I wondered: what if Maslow was right? Not about how people manage to bodge and survive their way through the circumstances of their lives, but about what the circumstances of our life must be, to be satisfying as it is lived, rather than in retrospect when there’s money in the bank, awards on the walls and every Maitre d’ in town knows your name and face. What if the Hierarchy is actually a diagnostic tool rather than a truth about people?

C-Heads describes "the 21st century girl… a chick of many talents, one moment she’s in Europe, the next she’s in Asia. She’s working on several artistic projects at once and killing at every single one. She’s a mix of races – picking up different cultures as she travels. She’s the mysterious girl at the party you want to know her life story who everyone has their eyes on", and yet… what? She can go through the Maslow levels, tick or cross as applicable. When she finds herself arguing about whether this or that is really a need, that’s a cross. Now she can see what’s missing. And she may understand that, if she wants to go on killing it at every single project, then that's the price she pays.

Human beings are needy animals, and at any given time one or more of those needs will be going unmet. For many people, it’s far more than one and it’s every day of every week of every year. And the more lower-order needs go unmet, the shakier is the pursuit, and enjoyment, of the higher-order needs. The Hierarchy tells us where the structure of our lives and our selves is shaky. Reality tells us that the shakiness may just be the way it’s gotta be. Because The Hierarchy is impossible to satisfy from bottom to top. You have a choice: you can be satisfied and risk the occasional feeling that you haven’t made the most of what, if anything, God gave you; or you can aim to develop and exploit your abilities and talents, and accept the surety of dissatisfaction with this or that aspect of your life.

Thursday, 10 May 2018

What would you do with a million pounds?

We used to have a game at junior school called “What would you do if you had a million pounds?” Since one answer was always “buy a house” and for that sum you could have bought about eighty (!) of my parent’s houses, at today’s prices, make that “What would you do if you had eighty millions pounds”.

I’d buy my sister a house, and I’d give my nephew some money so he didn’t have to take the first job that came along just to pay the rent, but could go find a step on a career ladder. My mother already has a nice house.

That’s what everyone says, as well they should. I suppose I’d buy myself something in central London, maybe in Bloomsbury or Marylebone. Or maybe not. Maybe I would travel round the world, concentrating on large cities and villages by the sea, to find somewhere I really wanted to live. If there was such a place. Or maybe I’d find a university which would let me use their library and let me do a PhD. Or not, these days, given the state of the modern university.

Perhaps I’d back some start-ups, but I know that a lot of those are basically CV-enhancement schemes for BCBG Ph.D’s: the idea is that the start-up is flipped to a large firm who really wants the top talent. Anyone outside the in-crowd is a sucker who is not going to get an even break.

Establish a scholarship for a British philosopher of mathematics to study for a year abroad, to be awarded annually. Maybe.

I could buy art. That would give me a faux social-life.

What I would not do is buy a £15,000 watch. Or a £250,000 sports car. I might buy a few days at Silverstone driving fancy sports cars though.

I could become an eccentric recluse in my Amsterdam house by a canal, watching movies in a special screeening-room and having meals brought in from the nearby one-star restaurant. On the days I was not watching films, I would go to Zandvoort by limousine and walk along the beach. It’s a large beach. I’ve just spent a few minutes fantasising about a year spent working my way round the beaches from Italy, south of France, Spain-Portugal-Spain, France again, Cornwall and ending in Wales. Or something like that.

Maybe I’d get some sessions with a celebrity therapist just for fun and the possibility they say something that changes me. Jordan Peterson could tell me I deserve all the problems I’m having because I don’t have family.

We used to have fun with this game. It was exciting to think of what we might do. Not so much now. I have a feeling that I would do a number of worthy things with it, and get a decent flat in the upmarket section of a serious town. The catch with growing-up is learning all the downsides and costs: the young only see upsides and benefits.

Monday, 7 May 2018

You Can't Get Too Much Counter-Propaganda

Ever wonder why the religious person sitting opposite you on the train is reading the Bible? I mean, haven’t they finished it yet? Or why recovering alkies go to three or more meetings a week and read the Big Book? Or why people read one self-help book after another, or yet another book on personal effectiveness? Or why people go to Church every Sunday? Let alone pray five times a day (Fajr, Dhuhr, ‘Asr, Maghrib, and ‘Isha) or even seven (Matins, Lauds, Prime, Terce, Sext, Nones, Vespers, Compline). Or why men check into dark corners of the Internet to read their filthy alt-right misogynist propaganda? Okay. The last one is obvious: they are filthy alt-right misogynists. It’s entirely different when liberals read the Guardian (or the Evening Standard, or the Financial Times) for the latest revelations about how Brexit is going to be a disaster.

No. It’s not because they are insecure aand need their thoughts confirming.

If you don’t fill your head with the thoughts you want to have, other people will fill your head with the thoughts they want you to have.

Advertisers using whatever current cliches they think will get your attention. Politicians, who don’t actually care about you, since they are talking to a very small audience of other politicians, major donors and businessmen. Left-wing journalists (a tautology) pushing their agendas. PR agents agitating hashtags for their clients’ benefit. Songwriters pushing Blue Pill sentimentality and Girlzzz Just Wanna Party. Scientists pushing out pop-science gee-whiz to get publicity to keep the grant money rolling in. The news telling you that awful behaviour seems to bring rewards, at least in this life. Not to mention Facebook propaganda from your fake friends, or faking friends. And let’s never forget those communications from management, with more spin than Nathan Lyon.

That’s what will pour into my head if I don’t put what I want into it. I can go looking for different opinions, and I can keep track of what The Enemy are thinking, but then I know what I’m doing. If I just wander through this media-soaked world, watching TV, reading the Metro on the train, and overhear whatever the girl singer du jour is pushing at the moment, I’m going to pick up mainstream ideas. I can tell myself I’m watching ironically, or that I don’t believe it, but there’s a part of my brain that, in the words of Gabriel Shear…

Some alcoholics ask why they have to go to so many meetings a week. The reply is: well, you went drinking every night, right?

You can’t get too much counter-propaganda.

Monday, 30 April 2018

And Now Here's Some Music...

I'm deep in understanding Cohen Forcing at the moment. Those who know what that is will understand, and if you don't, just imagine the thing you understood least about maths at school, and multiply it by a thousand.

So here's a gorgeous album by Paul Desmond

that turned a recent Sunday morning into something light and easy. Paul Desmond is the guy who played sax on Take Five. That West Coast Cool Jazz thing, when it was done well, produced some wonderful music.

And then for something completely different, here's a KM Channel video. If you don't know them, watch one.

Thursday, 26 April 2018

I was goaded into writing this by a discussion of pluralism in mathematics by a philosopher I will not name because it would make you think ill of them.

The so-called paradox of toleration’ is that the tolerant must tolerate the intolerant, who will therefore take over and install Sharia Law, burkas, compulsory short beards, take away votes for women and leave the sewers to fall apart in a decade...

Nobody could take this paradox seriously, yet some people do. It relies accepting the claim that to be tolerant means you have to tolerate anything and everything.

That’s not what tolerance means. ‘Religious tolerance’ means that the State does not actively stop people worshiping the God of their understanding in the manner their sect prescribes - within the limits of civil and criminal law (so no live sacrifices).

We don’t have laws on what cuisines can and can’t be served in this country, except for dog, cat and a few other Chinese delicacies, and that’s culinary tolerance’ or something similar.

We do have laws against killing people, swindling them, assaulting or harming them, and various other things. We don’t tolerate that. If you think you can kill your daughter for making eyes at the wrong man, do it outside our borders or we will lock you up. Usually, even the grossly intolerant want laws about those things, involving steeper punishments, so there’s no clash.

And liberals, of course, don’t tolerate all sorts of things, but mostly a) anyone who disagrees with them, b) right-wing ideas and movements, c) nationalism and strict immigration controls. Except that doesn’t count as `intolerance’ because those are bad ideas and bad people and so outside the scope of tolerance. Tolerance is only for the good, if you’re a liberal.

Here’s a quote from a site about Islam, which to judge from what it says, is pro-Islamic.
...the reality is that Islam is meant to be a complete way of life for its followers. It includes a complete and logical set of beliefs, rituals, and a moral code that covers every action that a Muslim takes in their life.
Every action. Everything matters. Whether you swallow what you pick from between your teeth, or spit it out: that matters. When everything matters, there can be no tolerance.

Tolerance means that some things do not matter. What you wear on casual occasions, what you eat, what car you drive or even if you drive, how you style your hair, what church you go to, if your marriage partner is the same sex as you or different… these are things about which we have decided to be tolerant, in this country, and therefore do not matter to us, or at least, to the State.

What happens if the Sharia Law party gets started? The media choose the most rabid, least balanced spokesman and feed him questions intended to make it clear that women are going to have a hard time under SP rule, and it won’t be obvious how we will have a replacement generation of engineers when only rote-learned Koran is taught in schools. Nobody argues, nobody discusses, they just let him rant on. What nobody does is engage or argue, because that would suggest these might after all be reasonable people. Since they are their own worst enemy, and most extremists are, they can be relied on to do sabotage themselves.

Tolerance does not mean we have to make the intolerant look good or give way to their ideas and policies: it means we don’t lock them up for speaking. As long as we don’t do that, we can tell them to go hike on all the other stuff.

Monday, 23 April 2018

From Self-Improvement to Optimisation

Dom Mazetti has a good line about “The day you want to get big is the day you will be forever small”. Because no matter how big you get, something will always need working on, some bro will always have a bigger set of that muscle than you do.

I wonder. Is the day we go into self-improvement the day we will be forever unworthy? That we will have the nagging sense that we need to improve something else about us that is simply not good enough. Since we cannot be perfect, we can always improve. So how much improvement is enough?

Self-improvement has two purposes: first, to get rid of damaging or grossly sub-optimal habits and replace them with good habits; second, to take on new habits that will make us more informed, interesting, resilient, employable, healthier, better company and so on and on.

‘Lift weights’ contains within in the injunction ‘stop being a lazy slouch’. ‘Quit eating junk’ forces us to look for better food to eat. ‘Read books’ tears us away from the TV and the Internet. And so on.

Self-improvement stops when we’ve dumped the bad habits and replaced them with better, though possibly not optimal, ones.

Keep that up, and it’s maintenance mode. After that, it’s about optimising.

Getting your body fat down from 30%+ to around 20% is self-improvement. Getting down to 15% is optimising, and for looks at that. (Google it: Special ops have around 18% because any lower and you don’t have the reserves to wait for the submarine to come back the next night after the first pick-up has to be abandoned.)

Trying out for the local soccer or basketball team is more than exercising, it’s an interest. The work you will have to do to be good enough for a reasonable team will require some performance improvements and specific skills: this sounds like optimisation.

Reading some books on the history of food is maintenance. Reading a book on knife skills and using them is optimisation.

Throwing out garish branded clothes and getting some low-key trousers and shirts where the brand is tucked away inside, this is self-improvement. Custom suits are optimisation. https://twitter.com/michaelporfirio

I suspect I’ve been in maintenance mode for a while now, and need to get a little optimisation going on somewhere. I’ll tell you this: it’s not going to involve the gym. As I’ve said before and will say again, call my nephew when you’re doing what I’m doing at my age. I feel the need for some optimisation in some new direction and that may feel gratuitous.

Thursday, 19 April 2018

The Three Modes of Men

At any given time a man is a Monk, a Married or an Outcast. I started as a dysfunctional Outcast - ACoA and alcoholic - and over the last few years have learned to be functional Outcast. Those can look a lot like Monks, so let’s start with Monks.

(Secular) Monks live for a purpose, or pursue a set of personal goals, that benefits them, contributes to the economy (pay your damn taxes!), and allows them to be considerate to those deserving consideration, and co-operative to those deserving co-operation. A Monk pursues his goals as the primary activity and focus in his life, and his sense of value and identity comes from the pursuit of those goals rather than from recognition by others. None of those goals involve domestic relationships or raising children they have fathered. To put it another way, a monk is someone doing something constructive with their lives rather than raising two bratty kids and putting up with a metric tonne of nonsense from their soon-to-be ex-wife. If you were in any doubt. Secular monks can have affairs, one-night stands, the occasional weekend lost to EDM and sunshine, eat in nice restaurants, wear good clothes and enjoy the fine things in life, or, of course, they can live in a white man-cave in the suburbs with their extensive collection of J S Bach CD’s (nobody I know). A Monk feels good about himself when he gets one of his goals moved forward, not because some Six was kind enough to spend the night with him.

What kind of goals count as Monkly? It’s tempting to go full retard on the Protestant Work Ethic: the only allowable goals are Building a Business, Praising the Lord by Humble Labour (the original monkly lifestyle) and Searching For Truth. These are worthy goals, but don’t quite capture the whole idea. The goal has to be abstract, its attainment can’t depend on other people’s approval of us as people. (Building a succesful business depends on customer approval, but of the product or service, not of the people providing it.)

Moving on to Outcasts. Outcasts are not cast out by society, but by themselves. No purpose in life, or a drain on the economy, or being inconsiderate to decent people, or minimally and selfishly co-operative, suckered by every con-man and woman who comes along, or desperate for validation from someone, anyone, outside themselves. Outcasts can be married and have fathered children, but they are making a terrible job of it. All bad parents are outcasts. Addicts, drunks, neckbeards, assholes, Borderlines, Psychopaths, bullies, and other generalised losers, frak-ups and undesirables, are all Outcasts. Each Outcast is an Outcast in his own special way. Feeling like you don’t belong does not an Outcast make, that just suggests you’re surrounded by people whom you don’t click with. Nor does having a social crowd: a bunch of Outcasts who have known each other for years and are having fun is still a bunch of Outcasts. What Outcasts have the feeling that they need to belong, or that they don’t need to belong to no damn stupid group, hell no. Healthy adults belonged when they were children, and can now go through adult life as independent people.

Which leaves the Marrieds. These are reasonably functional men who are in, were in and want to be back in, or haven’t been in but want to be in, some kind of domestic relationship with a woman because they think their lives will be better for it, or because they think that marriage and children are an essential part of being a man. A Married man's primary aim is to make his marriage work. His job, pastimes and entertainment are subordinate to that. Not all married men are Marrieds. Some are Outcasts - loser-ness trumps wedding bands - and others are Monks, as what else would you call Andrew Wiles for the years he was proving Fermat’s Last Theorem? What makes Married is not marriage, but the idea that domestic relationships is somehow fundamental to a man’s identity and worth. (Warning: a lot of prominent men say that their wives and children are the most important things in their life, as well they should, but what they mean is ‘actually my career as a solo concert pianist / oil rig worker / CEO / novelist / whatever is the most important thing in my wife and children’s life because without it they would be poor and anonymous middle-class nobodies and they understand that and don’t sabotage me or themselves’.)

It’s possible to switch between any of these modes, and a man might be all three during his life. Monks, however, tend to stay Monks. Domestic relationships mean the man has to be house-trained, and Monks missed that while they were working on their projects.

I was a Functioning Outcast: I held down a job, I had what appeared to be a social life, and I even had what might be considered a sex life. I left home when I got a job. In my mid-thirties it started to fall apart as I lived with raging insomnia and discreet alcoholism. Never in the depths of self-pity and confusion that I sunk to did I think that being in a domestic relationship would be the answer to my problems. Not. Once. Alcoholics make bad boyfriends and should never be husbands and fathers. Though I didn’t know it I was being sensible by staying single.

I’m still a Functioning Outcast. Why? Well, I don’t want any part of a domestic relationship, so I can’t be a Married. But other than staying sober and getting by one day at a time, I don’t have a purpose or goal. I have a day job and some interests, but those are not a purpose, rather simply highbrow entertainment.