Posez n’importe quelle question sur les cours, conférences, exercices, recherches, actualités, etc. de l’EPFL ou essayez les exemples de questions ci-dessous.
AVERTISSEMENT : Le chatbot Graph n'est pas programmé pour fournir des réponses explicites ou catégoriques à vos questions. Il transforme plutôt vos questions en demandes API qui sont distribuées aux différents services informatiques officiellement administrés par l'EPFL. Son but est uniquement de collecter et de recommander des références pertinentes à des contenus que vous pouvez explorer pour vous aider à répondre à vos questions.
An irreducible fraction (or fraction in lowest terms, simplest form or reduced fraction) is a fraction in which the numerator and denominator are integers that have no other common divisors than 1 (and −1, when negative numbers are considered). In other words, a fraction a/b is irreducible if and only if a and b are coprime, that is, if a and b have a greatest common divisor of 1. In higher mathematics, "irreducible fraction" may also refer to rational fractions such that the numerator and the denominator are coprime polynomials. Every positive rational number can be represented as an irreducible fraction in exactly one way. An equivalent definition is sometimes useful: if a and b are integers, then the fraction a/b is irreducible if and only if there is no other equal fraction c/d such that < or < , where means the absolute value of a. (Two fractions a/b and c/d are equal or equivalent if and only if ad = bc.) For example, 1/4, 5/6, and −101/100 are all irreducible fractions. On the other hand, 2/4 is reducible since it is equal in value to 1/2, and the numerator of 1/2 is less than the numerator of 2/4. A fraction that is reducible can be reduced by dividing both the numerator and denominator by a common factor. It can be fully reduced to lowest terms if both are divided by their greatest common divisor. In order to find the greatest common divisor, the Euclidean algorithm or prime factorization can be used. The Euclidean algorithm is commonly preferred because it allows one to reduce fractions with numerators and denominators too large to be easily factored. In the first step both numbers were divided by 10, which is a factor common to both 120 and 90. In the second step, they were divided by 3. The final result, 4/3, is an irreducible fraction because 4 and 3 have no common factors other than 1. The original fraction could have also been reduced in a single step by using the greatest common divisor of 90 and 120, which is 30. As 120 ÷ 30 = 4, and 90 ÷ 30 = 3, one gets Which method is faster "by hand" depends on the fraction and the ease with which common factors are spotted.
[2]Paolo Prandoni, [3]LCAV, EPFL
In [1]:
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal as sp
import seaborn as sns
sns.set()
In [2]:
plt.rcParams["figure.figsize"] = (14,4)
The basic reproduction number[4]¶
The propagation mechanism of an epidemic such as the one caused by
SARS-CoV-2 virus can be roughly modeled, at least in its inital phase,
as a process in which each infected individ [2]Paolo Prandoni, [3]LCAV, EPFL
In this notebook we will implement a simple fractional resampler that
uses local Lagrange interpolation. The resampler can be used to perform
any rational sampling rate change (but beware of aliasing when
downsampling!)
In [1]:
import numpy as np
import IPython
from scipy.io import wavfile
Local Lagrange interpolation[4]¶
To perform resampling we will need to compute subsample values and, in