Circle in a Right Triangle

I was recently asked to prove that a circle inscribed in a right triangle with sides 3, 4 and 5 had a radius of 1. Mathematics never ceases to amaze me! How could a standard 3, 4, 5 triangle be associated with a circle of radius 1? It’s akin to the 9 year old me discovering that the sum of the first n odd numbers is simply n squared.

Anyway, on with the proof. In the triangle above we can assume that AB = 5, AC = 4 and BC = 3. The points P, Q and R are where the sides of the triangle meet the circle, and are tangents. If we assume the radius of the circle is r, then CR = CP = r. Hence, AP = 4 – r, and RB = 3 – r. Since tangents to a circle meeting at a point are equal, AQ = AP = 4 – r and BQ = BR = 3 -r. We can also see that the triangles AOP and AOQ are congruent, as is the case with the triangles BOR and BOQ.

We know AB = 5, which implies AQ + BQ = 5. Substituting, we get (4 – r) + (3 – r) = 5. Re-arranging, 7 – 2r = 5, ie 2r = 2 leading to r = 1.

Seeing this got me thinking about the next right triangle I remember, with sides 5, 12 and 13. What would be the radius of the circle inscribed in that? Amazingly enough, the answer to that is also a surprise. That radius is 2; isn’t mathematics wonderful?

 

Tagged | Leave a comment

Eclipse – did you see it?

I have just watched the eclipse of the sun in the UK. It was an amazing experience, much better than the 1999 eclipse.

Hearing the commentary on TV started me thinking about how it would have seemed to people in the past. I remembered reading the adventures of Tintin as a child and how he escapes from Incas in the Prisoners of the Sun book. That got me thinking how an eclipse would seem to different cultures.

One of the most famous stories written by Isaac Asimov was Nightfall about a planet which is illuminated by sunlight at all times. How would they react if the sky became dark? If you have not read this, please do so, it is a classic of science fiction. Asimov is one of my favourite authors, along with Robert Heinlein (although Heinlein did deteriorate in his latter career).

Incidentally, I have read somewhere that someone mentioned that Asimov did not include sex in his novels. Apparently, this annoyed him so much that he wrote a novel which had sex as a main motif for the story (The Gods Themselves), albeit only for about a third of the book. That won the Nebula Award for the Best Novel in 1972, and the Hugo Award for the Best Novel in 1973.

Anyway, getting back to eclipses, how would humans react if they could not see the sun for an extended period of time? I remember reading Tau Zero in the early 80s, about a spaceship voyaging to a nearby star. Without giving away the story, the stars begin to disappear. I have started re-reading that today, and may post about it in the future. From memory, it was an amazing book, please read it if you get the chance.

Posted in Books, Uncategorized | Tagged | Leave a comment

Retirement – Part 2

I have been semi-retired for a few years now. Semi-retired meant that I worked only 3 days a week. Since my work allows me to work from home that was not particularly onerous.

My current contract was changed just over a month ago, so I now work 1 day a week only, still working from home. This has meant that I now have a lot more time to pursue my other interests.

I have booked 3 cruise holidays for the next 2 months, to get away to some nice weather. Having said that we are now heading towards another heat wave in the UK.

In the meantime I have been catching up on playing Role Playing Games. The latest game I have completed is Dragon Age – The Veilguard. I will probably be posting about that soon. I have also purchased Knights of the Old Republic and Horizon Zero Dawn.

I have also been updating my website https://www.nimusi.net which is why I am resuming blogging. Expect some new posts soon.

I have also been playing more text adventure games. For some years, I have seen some utilities that allow you to reverse engineer these games, ie CHEAT. I have been loathe to use these because they are not graphical, just text based. I have often wondered whether it would be possible to write these with a Windows interface. I have made some half-hearted attempts over the years, with little success. With my new found leisure time, I have tried again. It has taken me some time but I have managed a first attempt at this and will be posting it to my site soon.

I will also be watching Reacher on Amazon Prime, hopefully when I can binge watch it. Someone has also suggested that I go to watch the movie The Odyssey.

Posted in Uncategorized | Tagged | Leave a comment

The 12 Coins Puzzle

I recently came across this puzzle:

There are 12 coins, all identical in appearance, and all identical in weight except for one, which is either heavier or lighter than the remaining 11 coins. Determine which is the counterfeit coin in only 3 weighings with a balance scale.

After struggling with this, both mentally and using pencil and paper, I decided to write a web page to simulate the problem; it can be found here. You may find it interesting to attempt this puzzle there before reading the discussion below. Continue reading

Tagged , | 1 Comment

My first Android app

I have been dabbling with Android development on and off for a little while now.

Android apps are usually written in Java, and having never used Java before, I have had to teach myself the basics of Java.

I wanted to start with a very basic app so I decided to convert an existing app that I had written in C# to run on Android.

The app is SolveX and I have written it to help me when I get stuck with a crossword, which seems to happen all the time. It uses SQL to find matches for the words I am stuck on. Having a database of over 105,000 words it usually manages to find the right word. 

 I have used this app on a personal basis for some time now although I had not released it on my website.  I have taken this opportunity to tidy it up, seperating the presentation from the logic by dividing it into seperate classes, and it is available now at my website.

The conversion to Android went quite smoothly, after I had converted the database to use SQLite, as used by Android.  

The only issue that I had  was how to deploy the database, which was a file of over 3Mb.  I eventually decided to store the database on a web server and deploy the app without the database.  When the app is used for the first time it connects to the web server and copies the database to the user’s device.  This only needs to be done on the first occasion the app is used. 

The app is now available at the Android market with a download size of 34k.

Posted in Uncategorized | Tagged , , | 1 Comment