Occasionally, it might be useful to do as the title here suggests.

Two examples that spring to mind include:

  • solving a\cdot\cos\theta\pm b\cdot\sin\theta=c for \theta (relative velocity example with - below)
  • maximising a\cdot\cos\theta\pm b\cdot\sin\theta without the use of calculus

a\cdot \cos\theta- b\cdot\sin\theta

Note first of all the similarity between:

\displaystyle a\cdot \cos\theta-b\cdot \sin \theta\sim \sin\phi\cos\theta-\cos\phi\sin\theta.

This identity is in the Department of Education formula booklet.

The only problem is that a and b are not necessarily sines and cosines respectively. Consider them, however, as opposites and adjacents to an angle in a right-angled-triangle as shown:

triangle

Using Pythagoras Theorem, the hypotenuse is \sqrt{a^2+b^2} and so if we multiply our expression by \displaystyle \frac{\sqrt{a^2+b^2}}{\sqrt{a^2+b^2}} then we have something:

\displaystyle \frac{\sqrt{a^2+b^2}}{\sqrt{a^2+b^2}}\cdot \left(a\cdot \cos\theta- b\cdot\sin\theta\right)

\displaystyle=\sqrt{a^2+b^2}\cdot \left(\frac{a}{\sqrt{a^2+b^2}}\cos\theta-\frac{b}{\sqrt{a^2+b^2}}\sin\theta\right)

=\sqrt{a^2+b^2}\cdot \left(\sin\phi\cos\theta-\cos\phi\sin\theta\right)=\sqrt{a^2+b^2}\sin(\phi-\theta).

Similarly, we have

a\cdot\cos\theta+b\cdot \sin\theta=\sqrt{a^2+b^2}\sin(\phi+\theta),

where \displaystyle\sin\phi=\frac{a}{\sqrt{a^2+b^2}}.

Read the rest of this entry »

Last semester, teaching some maths to engineers, I decided to play (via email) the Guess 2/3 of the Average game. Two players won (with guesses of 22) and so I needed a tie breaker.

I came up with a hybrid of Monty Hall, not too dissimilar to the game below (the prize was €5).

Rules

In this game, the host presents four doors to the players Alice and Bob:

monty

Behind three of the doors is an empty box, and behind one of the doors is €100.

The host flips a coin and asks the Alice would she like heads or tails. If she is correct, she gets to choose whether to go first or second.

The player that goes first picks a door, then the second player gets a turn, picking a different door.

Then the host opens a door revealing an empty box.

Now the first player has a choice to stay or switch.

The second player then has a choice to stay or switch (the second player can go to where the first player was if the first player switches).

Questions: 

  1. What is the best strategy for the player who goes second:
    • if the first player switches?
    • if the first player stays?
  2. Should the person who wins the toss choose to go first or second? What assumptions did you make?
  3. How much would you pay to play this game? What assumptions did you make?
  4. If there is a bonus for playing second, how much should the bonus be such that the answer to question 1. is “it doesn’t matter”.

 

Correlation does not imply causation is a mantra of modern data science. It is probably worthwhile at this point to define the terms correlation, imply, and (harder) causation.

Correlation

For the purposes of this piece, it is sufficient to say that if we measure and record values of variables x and y, and they appear to have a straight-line relationship, then the correlation is a measure of how close the data is to being on a straight line. For example, consider the following data:

graph14

The variables y and x have a strong correlation. 

Causation

Causality is a deep philosophical notion, but, for the purposes of this piece, if there is a relationship between variables y and x such that for each value of x there is a single value of y, then we say that y is a function of x: x is the cause and y is the effect.

In this case, we write y=f(x), said y is a function of x. This is a causal relationship between x and y. (As an example which shows why this definition is only useful for the purposes of this piece, is the relationship between sales t days after January 1, and the sales, S, on that day: for each value of t there is a single value of S: indeed S is a function of t, but t does not cause S).

Read the rest of this entry »

Consider the following problem:

Two masses of 5 kg and 1 kg hang from a smooth pulley at the ends of a light inextensible string. The system is released from rest. After 2 seconds, the 5 kg mass hits a horizontal table:

i. How much further will the 1 kg mass rise?

ii. The 1 kg mass then falls and the 5 kg mass is jolted off the table. With what speed will the 5 kg mass begin to rise?

[6D Q. 4. Fundamental Applied Maths, 2nd Edition, Oliver Murphy]

It isn’t difficult to answer part i.: the answer is \displaystyle \frac89 g m.

However how to treat part ii.? First of all a picture to help us understand this problem:

pulley

The 1 kg mass has dropped under gravity through a distance of \displaystyle \frac89 g m. We can find the speed of the 1 kg mass using u=0,a=g,s=\frac89 g. Alternatively, we can use Conservation of (Mechanical) Energy.

Taking the final position as h=0, at its maximum height, the 1 kg mass has potential energy and no kinetic energy:

\text{PE}_0=mgh=1g\frac89 g=\frac{8}{9}g^2.

When it reaches the point where the string is once again taut, it has not potential energy but the potential energy it had has been transferred into kinetic energy:

\text{KE}_1=\frac12 mv^2=\frac12 v^2=\frac12 v^2,

and this must equal the potential energy \text{PE}_0:

\frac{8}{9}g^2=\frac12 v^2\Rightarrow v=\frac43g.

Now this is where things get trickier. My idea was to use conservation of momentum on the two particles separately. As this clever answer to this question shows, you can treat the 5 kg mass, string, and 1 kg mass as a single particle.

So the prior momentum is the mass of the 1 kg mass by \frac43 g:

p_0=m_0u=1\cdot \frac43 g=\frac43g.

The ‘after’ momentum is the mass of the 1 kg and 5 kg masses times the new velocity:

p_1=m_1v=6\cdot v.

By Conservation of Momentum, these are equal:

\frac43 g=6v\Rightarrow v=\frac{2}{9} g\text{ m s}^{-1}.

Student Feedback

You are invited to give your feedback on this module here.

Test 2

Final CA results below. Unless you excelled, you are identified by the last five digits of your student number.

CA is your total continuous assessment marks out of 30.

PP is your passing percentage: what you need on the final paper to pass.

70P is the percentage you need on the final paper for a first (70%).

AW is the number of attendance warnings: for future reference you can see the fairly strong relationship between attendance and assessment performance.

I will have the assessments with me in today and tomorrow’s tutorials and will send on the marking scheme in a few minutes.

S/N

Test 1

Test 2

CA

PP

70P

AW

O Leary Garvey

96.2

100

29.4

15.1

58.0

0

McGrath

91

98.1

28.4

16.6

59.5

0

Xie

94.9

86.5

27.2

18.3

61.1

0

Cashman

87.2

88.5

26.4

19.5

62.4

1

62916

94.9

78.8

26.1

19.9

62.8

0

63379

82.1

90.4

25.9

20.2

63.0

0

64423

82.1

88.5

25.6

20.6

63.4

0

62647

73.7

96.2

25.5

20.7

63.6

0

62469

79.4

89.4

25.3

21.0

63.8

1

62740

91.7

73.1

24.7

21.8

64.7

0

64717

82.1

82.7

24.7

21.8

64.7

0

63549

70.5

86.5

23.6

23.5

66.4

0

64314

83.3

73.1

23.5

23.6

66.5

3

64860

76.9

78.8

23.4

23.8

66.6

0

63657

70.5

78.8

22.4

25.2

68.0

1

64078

72.4

76

22.3

25.3

68.2

0

61981

81.4

65.4

22.0

25.7

68.5

2

64100

65.4

78.8

21.6

26.2

69.1

0

62970

66.7

76.9

21.5

26.4

69.2

0

69532

67.3

71.2

20.8

27.5

70.3

0

64370

66.7

69.2

20.4

28.0

70.9

3

63904

65.4

67.3

19.9

28.7

71.6

2

62523

60.3

71.2

19.7

29.0

71.8

2

63815

50

80.8

19.6

29.1

72.0

3

63193

78.2

51.9

19.5

29.3

72.1

2

63651

73.7

53.8

19.1

29.8

72.7

1

62360

55.1

70.2

18.8

30.3

73.2

0

63606

61.5

57.7

17.9

31.6

74.5

0

64052

46.2

72.1

17.7

31.8

74.7

0

62502

36.5

52.9

13.4

38.0

80.8

1

64320

17.9

69.2

13.1

38.5

81.3

0

64259

77

0

11.6

40.6

83.5

3

64281

20.5

55.8

11.4

40.8

83.7

2

64273

30.1

44.2

11.1

41.2

84.1

0

61818

55.8

0

8.4

45.2

88.0

3

63677

48.1

0

7.2

46.8

89.7

3

64956

26.3

0

3.9

51.5

94.4

3

62151

23.7

0

3.6

52.1

94.9

0

63740

74.4

I

I

I

I

I

62812

64.1

WD

WD

WD

WD

WD

Week 12

In Week 12 we finished Recursion between Monday and Tuesday. Friday was an extra tutorial.

Week 13

In Week 13, we will have five tutorials (normal rooms and times) of which you are invited to up to four (your own tutorial slot plus the up to three of the lecture slots).

Study

Some students need to do extra work outside tutorials. Please feel free to ask me questions about the exercises via email or even better on this webpage.

Student Resources

Anyone who is missing notes is to email me.

Please see the Student Resources tab on the top of this page for information on the Academic Learning Centre, etc. There are some excellent notes on Blackboard for MATH6055.

 

Student Feedback

You are invited to give your feedback on this module here.

Test 2

Results not too far away… watch this space.

 

Week 12

We looked at centroids and centres of gravity.

Read the rest of this entry »

Student Feedback

You are invited to give your feedback on this module here.

Assessment 2

Results have been emailed to you. You have a chance to see your work this Friday in tutorial. Some comments here.

 

Week 12

I postponed Monday’s lecture. We nearly finished off Chapter 4 by looking at Error Analysis. I had to email ye on the last two rounding error examples.

Week 13

We will go through last year’s exam on the board and then I will answer your questions if there are any. If there are none I will help one-to-one. Usual class times and locations.

We will also have tutorials on Friday 8 December in the usual times and venues.

Study

Please feel free to ask me questions about the exercises via email or even better on this webpage.

Student Resources

Please see the Student Resources tab on the top of this page for information on the Academic Learning Centre, etc.

A Poker Hack

I told this story in class on Friday. I wasn’t sure if it was true but it appears that it is.

Texas Hold’Em Poker

Texas‘ is a poker game where a number of players sit around a table. Two cards are dealt to each player. There after follows a round of betting, the reveal of three more cards (the flop), more betting, another card (the turn), another round of betting, another card (the river), and another round of betting:

poker1

What we are interested in is what happens after all this, before another hand is dealt?

The deck is shuffled.

A shuffle is required to mix up the deck. Here we used three terms: deck, shuffle, mixed up. These can all be given a precise mathematical realisation (see the introduction here for more). Mixed up means ‘close to random’. Here let me introduce a mathematical realisation of random:

If one is handed a deck of cards, face down, and if each possible order of
the cards is equally possible then the deck is considered random.

Note there are 52!\approx 10^{68} possible orders that a deck can be in so when a deck is random the probability that a deck is in a specific order is

\displaystyle \frac{1}{52!}.

One popular method of shuffling cards is the riffle shuffle. In a remarkable 1992 paper by Bayer & Diaconis, with a really cool name: Trailing the Dovetail Shuffle to Its Lair, it is shown that seven riffle shuffles are necessary and sufficient to get a deck close to random:

graph20

Here we see d, distance to random, plotted against k, number of shuffles. After five shuffles the deck is still far from random, but then there is a fairly abrupt convergence to random. After seven shuffles the distance to random is less than 1/e.

So the idea is after, say, ten shuffles (or, equivalently, about ten rounds of hands), the deck is mixed up or close to random: each of the 52! orders are approximately likely.

Read the rest of this entry »

Student Feedback

You are invited to give your feedback on this module here.

Test 2

I hope to have these corrected at some stage next week. I will also send out the solutions at some point.

Week 11

We finished our study of Graph Theory by looking at Eulerian graphs, Fleury’s Algorithm, Hamiltonian graphs, and Dirac’s Theorem. We then began the last chapter on recursion. We had our test on Friday

Week 12

In Week 12 we will finish our study of recursion and perhaps do a little revision.

Week 13

In Week 13, perhaps we will have five tutorials (normal rooms and times) of which you are invited to up to four (your own tutorial slot plus the up to three of the lecture slots).

Study

Some students need to do extra work outside tutorials. Please feel free to ask me questions about the exercises via email or even better on this webpage.

Student Resources

Anyone who is missing notes is to email me.

Please see the Student Resources tab on the top of this page for information on the Academic Learning Centre, etc. There are some excellent notes on Blackboard for MATH6055.

 

Student Feedback

You are invited to give your feedback on this module here.

Test 2

I hope to have these corrected at some stage next week. I will also send out the solutions at some point.

 

Week 11

We looked at completing the square and work.

Week 12

We will look at centroids and centres of gravity.

Read the rest of this entry »