Withings Activité – each step counts…

November 16, 2016 Leave a comment

This post is not about math… It’s about a watch which is elegant, smart and a good activity motivator. The Withings Activité is all the above and more. Apparently this watch is on a market for quite a while now, but I didn’t hear about it until recently (via a Facebook add, the irony… I usually despise ads). What caught me was the nice quality design and the promise that it can do more than just tell time.

So what exactly can this watch do?montre-1-black

  • tells time via an analog display
  • has a silent vibrating alarm
  • counts your steps
  • shows progress towards the daily goal
  • monitors sleep
  • can monitor running and swimming
  • battery lasts 8 months (that’s forever compared to other fancy smartwatches out there)

Read more…

Categories: Uncategorized

FreeFem to Matlab – fast mesh import

October 14, 2016 Leave a comment

I recently wrote a brief introduction to FreeFem++ in this post. FreeFem is a software designed for the numerical study of partial differential equations. It has the advantage of being able to easily define the geometry of the domain, construct and modify meshes, finite element spaces and solve problems on these meshes.

I use Matlab very often for numerical computations. Most of the numerical stuff I’ve done (take a look here if you want) was based on finite differences methods, fundamental solutions and other classical techniques different from finite elements methods. Once I started using finite elements I quickly realized that Matlab is not that easy to work with if you want some automated quality meshing. PDEtool is good, but defining the geometry is not easy. There is also a simple tool: distmesh which performs a simple mesh construction for simple to state geometries. Nevertheless, once you have to define finite element spaces and solve problems things are not easy…

This brings us to the topic of this post: is it possible to interface Matlab and FreeFem? First, why would someone like to do this? Matlab is easier to code and use than FreeFem (for one who’s not a C expert…), but FreeFem deals better with meshes and solving PDE with finite elements. Since FreeFem can be called using system commands, it is possible to call a static program from Matlab. FreeFem can save meshes and variables to files. Let’s see how can we recover them in Matlab.

There is a tool called “FreeFem to Matlab” developed by Julien Dambrine (link on Mathworks). There’s also a longer explanation in this blog post. I recently tried to use the tool and I quickly found that it is not appropriate for large meshes. It probably scans the mesh file line by line which makes the loading process lengthy for high quality meshes. Fortunately there’s a way to speed up things and I present it below. I will not cover the import of the data (other than meshes) since the function importdata from the FreeFem to Matlab tool is fast enough for this.

Read more…

IMC 2016 – Day 2 – Problem 8

July 28, 2016 2 comments

Problem 8. Let {n} be a positive integer and denote by {\Bbb{Z}_n} the ring of integers modulo {n}. Suppose that there exists a function {f:\Bbb{Z}_n \rightarrow \Bbb{Z}_n} satisfying the following three properties:

  • (i) {f(x) \neq x},
  • (ii) {x = f(f(x))},
  • (iii) {f(f(f(x+1)+1)+1) = x} for all {x \in \Bbb{Z}_n}.

Prove that {n \equiv 2} modulo {4}.

Read more…

IMC 2016 – Day 2 – Problem 7

July 28, 2016 Leave a comment

Problem 7. Today, Ivan the Confessor prefers continuous functions {f:[0,1]\rightarrow \Bbb{R}} satisfying {f(x)+f(y) \geq |x-y|} for all {x,y \in [0,1]}. Fin the minimum of {\int_0^1 f} over all preferred functions.

Read more…

IMC 2016 – Day 2 – Problem 6

July 28, 2016 1 comment

Problem 6. Let {(x_1,x_2,...)} be a sequence of positive real numbers satisfying {\displaystyle \sum_{n=1}^\infty \frac{x_n}{2n-1}=1}. Prove that

\displaystyle \sum_{k=1}^\infty \sum_{n=1}^k \frac{x_n}{k^2} \leq 2.

Read more…

IMC 2016 Problems – Day 2

July 28, 2016 Leave a comment

Problem 6. Let {(x_1,x_2,...)} be a sequence of positive real numbers satisfying {\displaystyle \sum_{n=1}^\infty \frac{x_n}{2n-1}=1}. Prove that

\displaystyle \sum_{k=1}^\infty \sum_{n=1}^k \frac{x_n}{k^2} \leq 2.

Problem 7. Today, Ivan the Confessor prefers continuous functions {f:[0,1]\rightarrow \Bbb{R}} satisfying {f(x)+f(y) \geq |x-y|} for all {x,y \in [0,1]}. Fin the minimum of {\int_0^1 f} over all preferred functions.

Problem 8. Let {n} be a positive integer and denote by {\Bbb{Z}_n} the ring of integers modulo {n}. Suppose that there exists a function {f:\Bbb{Z}_n \rightarrow \Bbb{Z}_n} satisfying the following three properties:

  • (i) {f(x) \neq x},
  • (ii) {f(f(x))=x},
  • (iii) {f(f(f(x+1)+1)+1) = x} for all {x \in \Bbb{Z}_n}.

Prove that {n \equiv 2} modulo {4}.

Problem 9. Let {k} be a positive integer. For each nonnegative integer {n} let {f(n)} be the number of solutions {(x_1,...,x_k) \in \Bbb{Z}^k} of the inequality {|x_1|+...+|x_k| \leq n}. Prove that for every {n \geq 1} we have {f(n-1)f(n+1) \leq f(n)^2}.

Problem 10. Let {A} be a {n \times n} complex matrix whose eigenvalues have absolute value at most {1}. Prove that

\displaystyle \|A^n\| \leq \frac{n}{\ln 2} \|A\|^{n-1}.

(Here {\|B\| = \sup_{\|x\|\leq 1} \|Bx\|} for every {n \times n} matrix {B} and {\|x\| = \sqrt{\sum_{i=1}^n |x_i|^2 }} for every complex vector {x \in \Bbb{C}^n}.)

Official source and more infos here.

Categories: Olympiad, Uncategorized Tags: , ,

IMC 2016 – Day 1 – Problem 2

July 27, 2016 Leave a comment

Problem 2. Let {k} and {n} be positive integers. A sequence {(A_1,...,A_k)} of {n\times n} matrices is preferred by Ivan the Confessor if {A_i^2 \neq 0} for {1\leq i \leq k}, but {A_iA_j = 0} for {1\leq i,j \leq k} with {i \neq j}. Show that if {k \leq n} in al preferred sequences and give an example of a preferred sequence with {k=n} for each {n}.

Read more…

%d bloggers like this: