## Tuesday, February 23, 2016

I've collected all the best ideas on this blog and improved the presentation from these past 5 years and posted them over at a Facebook public page:

### Windmill sail boat

Just a thought experiment... I wonder if you have a windmill turning a propeller on a boat if you could sail into the wind? I can kind of make an argument that it would go backwards, stay in one place, or go forward so I guess an experiment maybe with a scale model would have to be done...

## Monday, February 15, 2016

### Perfect pivot quick sort

Suppose you have n items to be sorted, for example:
3,7,15,4,8,2,9,13,11,10,6,12,1,0,14,5
The first step is to take the first four items from the list and arrange them in 2 pairs, so that the least and greatest of the four numbers is the first pair and the two in between are the next pair like so:
3,15
4,7
Now the repeating step is to take the next 2 items from the list and arrange the 3 pairs so the six items are in order reading down the left items then up the right like so:
3,15
4,7
becomes
2,15
3,8
4,7 because these six items in order are 2,3,4,7,8,15
Now we can start a pile with 2 and 15 in it, and our four new numbers are just:
3,8
4,7
and repeat until all the numbers are exhausted for example it continues:
3,8
4,7
to get
3,13
4,9
7,8
then the 3 and the 13 join the piles so you have 2,15,3,13 and the four new numbers are:
4,9
7,8
to which you add 11,10 to get:
4, 11
7, 10
8, 9
and 4 and 11 get put onto the pile in progress to have 2,15,3,13,4,11

Now you can see that our bottom two number numbers must eventually be the median numbers of the set because every step found a number less and a number greater than them, and the pile can split in two for items less or greater than those two, this means you will have the perfect pivot to recursively apply the algorithm to the two halves!

## Sunday, February 7, 2016

### Maximizing CD Vector Magnitude Minimizes Length of Path through points

First defining some terms and a hypothesis for closed paths P on the plane through n points with x,y coordinates x[i], y[i] all in the first quadrant:
c and d so named because they are the cross and dot products of vectors from the origin to successive points on the path, and l is the sum of the lengths of the lines between successive points on the path each squared...

For example I plotted c,d values for the 720 possible closed paths through 7 random points all with the same starting point and got:

P[1] and P[-1] were the two solutions to the travelling salesman problem, or paths minimizing l through the points with the starting point fixed, and they also were the two points that maximized c^2+d^2, P[-1] being just P[1] traversing the points in reverse order...

**It looked to me even more generally decreasing c^2 +d^2 increased l proportionally but I'll have to investigate further**