Categories
Ask Mathematics

Writing an algorithm solving the word-problem in hyperbolic groups

I am reading in the “Metric Spaces of Non-Positive Curvature Book by André Haefliger and Martin Bridson”, on Dehn’s Algorithm (Chapter III.Γ, p.449). Let $\mathcal{A}$ be a finite generating set of a group $\Gamma$. A list of pairs of words $(u_{1},v_{1}),…,(u_{n},v_{n})\in\Gamma\times\Gamma$ is called “satisfies the conditions of Dehn’s Algorithm” if the following hold: 1) $u_{i}=v_{i}$ […]

Categories
Ask Mathematics

Question regarding sequence of continuous functions

$\left \{f_n \right \}$ is a sequence of continuous non-negative functions defined on $[0,1]$, such that $\lim_{n\rightarrow\infty} f_n(x) = 0$ pointwise on $[0,1]$. I am asked to prove that $\forall \epsilon > 0$, $\exists \delta > 0, N \in \mathbb{N}$ and points $x_1, … , x_N $ and $n_1, … , n_N$ such that: $$[0,1] […]

Categories
Mastering Development

How does VS Code get type hints?

I was using argparse in a project when I noticed the following: VS Code shows type hints for the arguments of ArgumentParser.add_argument: add_argument(*name_or_flags: Text, action: Union[Text, Type[Action]]=…, nargs: Union[int, Text]=…, const: Any=…, default: Any=…, type: Union[Callable[[Text], _T], Callable[[str], _T], FileType]=…, choices: Iterable[_T]=…, required: bool=…, help: Optional[Text]=…, metavar: Optional[Union[Text, Tuple[Text, …]]]=…, dest: Optional[Text]=…, version: Text=…, **kwargs: […]

Categories
Ask Mathematics

PMF of total score in a card matching game

Consider a deck of cards with ​$N$​ different playing cards equally distributed among $M$ suits (e.g., $N=52, M=4$). You draw all the cards without putting any back. After the first card, each time you pick a card, you compare it to the previous card. If the suits match, you get ONE point; otherwise, you get […]

Categories
Ask Mathematics

Fokker-Planck equation with zero diffusion coefficients on the boundaries

I am currently working on a Masters project in which I will be looking at numerical methods for a specific PDE. The PDE that I will be considering is a Fokker-Planck equation on a unit hyper-cube. More specifically I am studying the following PDE (in non-divergence form) $$ \frac{\partial u}{\partial t} = \frac{x_{d}(1-x_{d})}{2}\frac{\partial^2u}{\partial x_{d}^2}+\left(1-2x_{d}-M_{d}(x)\right)\frac{\partial u}{\partial […]

Categories
Ask Mathematics

Closed form expression for expectation of piecewise maximum

Suppose $Z$ is a random variable, Gaussian, with mean $0$ and variance $\sigma$. We are given some constant scalars $a_1,…,a_d$ and $b_1,…,b_d$. Is there a closed-form expression for this term (expectation over $Z$)? $$ \mathbb E_Z\left[\max_{i=1,…,d} (a_i \,Z+b_i)\right] $$ Any hint + a reference would be much appreciated!

Categories
Ask Mathematics

Rational map of curves extends to a morphism if $C$ regular

Let $f: C \dashrightarrow C’$ a rational map between curves. A curve is defined as proper $k$-scheme of dimension one. $k$ is the base field. Assume $C$ is regular curve. That means that for every point $a \in C$ the stals $\mathcal{O}_{C,a}$ is a dvr. Why $f$ extends to a morphism $f: C \to C’$ […]

Categories
Ask Mathematics

Question regarding sequence of continuous functions

$\left \{f_n \right \}$ is a sequence of continuous non-negative functions defined on $[0,1]$, such that $\lim_{n\rightarrow\infty} f_n(x) = 0$ pointwise on $[0,1]$. I am asked to prove that $\forall \epsilon > 0$, $\exists \delta > 0, N \in \mathbb{N}$ and points $x_1, … , x_N $ and $n_1, … , n_N$ such that: $$[0,1] […]

Categories
Mastering Development

Shiny inputs to imported routes

I’m trying to make my pages for shiny before app launches. I’m using shiny.router package. Reason why I want to make pages is in app I generate so many pages (over 5000) so it takes over 2-3 seconds per app launch. So now I’m using that code (I also modified some functions from bs4Dash for […]

Categories
Ask Mathematics

Math puzzle: how many races (permutations) respects those constraints …?

Here below is a combinatoric challenge. I am not sure if it can be craked only using pencil and paper or if a numerical simulation is required. Four boats are doing a regatta. This one consists of seven races. At the end of each race, each crew is credited with one point if it finishes […]