Publications by Tony
Project Euler — problem 11
It’s been a while since I solved one Euler problem last time. Has been busy. Now I’m back and continue to solve the next problem, which is to find the maximum. Let’s take a look at the 11th problem: What is the greatest product of four adjacent numbers in any direction (up, down, left, right, or diagonally) in the 2020 grid? Well, the idea ...
2082 sym R (1597 sym/4 pcs) 2 img 2 tbl
automated cell phenotyping — R package “EBImage”
Counting cells under microscope is always laborious and null. Those in the art would be relieved with assistance of a powerful image processing package, EBImage. Images are treated as “Image” objects, essentially multi-dimensional arrays. The class “Image” contains spatial information, pixel intensities, color channels, etc. Image object...
2318 sym 2 img
Project Euler — problem 12
Going to supper in 20 minutes. I’d like to type down my solution to the 12th Euler problem, just make my time count. The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, … We can see th...
2245 sym R (884 sym/2 pcs) 1 tbl
leaf area measuring — R package “EBImage”
Besides microscopic images in our routine, common photos are frequently taken to measure quantitative plant features, such as leaf area, root length, branch numbers, etc. Scientific software is available for manual processing. For example, to measure the root length, one need to use the cursor to travel along the target, herein the root. Then...
2244 sym 2 img
Project Euler — problem 13
The 13th in Project Euler is one big number problem: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. Obviously, there are some limits in machine representation of numbers. In R, 2^(-1074) is the smallest non-zero positive number, and 2^1023 is the largest. The numbers in the 13th problem is definitely with...
1442 sym R (196 sym/2 pcs) 1 tbl
Project Euler — problem 14
It’s Monday today! It’s work day! And I’ve already worked on computer for two hours. Time for a break, which is the 14th problem of Project Euler. The following iterative sequence is defined for the set of positive integers: n n/2 (n is even); n 3n + 1 (n is odd) Although it has not been proved yet (Collatz Problem), it is thought that...
2610 sym R (735 sym/2 pcs) 6 img 1 tbl
Project Euler — problem 15
The 15th problem in Project Euler. Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? Mmm… walk in the grid; it sounds like a problem of graph theory. I’m sure there must be some complicated solution for this. But I’m gonna solv...
1167 sym R (64 sym/2 pcs) 6 img 1 tbl
googleVis — where did SYTYCD dancers come from?
After watching 20 wonderful dancers of the 9th season of So You Think You Can Dance, I have presented a geomap of the states where they are coming from (click here). Now, I am interested to this show’s history. I’d like to re-draw the geographic map of dancers’ hometown from SYTYCD Season One to Nine. Here comes the map! Dancers ...
1458 sym
Project Euler — problem 16
The 16th problem is another big-number problem: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? This is related to the precision of calculation. Although 2^1000 is within the numeric limit of R, the precision is limited with the digits number up to 22. Thus, I’m using gmp() pac...
1000 sym R (179 sym/2 pcs) 1 tbl
Project Euler — problem 17
It has been two weeks since my last post on the 16th Euler problem. Now, since I just need a break after supper, I’m coming the 17th problem. If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were w...
1428 sym R (4475 sym/4 pcs) 2 tbl