the-honk/challenges/euler/thoughts/15 - Lattice paths.md

18 lines
562 B
Markdown
Raw Normal View History

2024-10-09 17:02:42 +00:00
<div align="center">
### Lattice Paths
2024-10-09 17:02:38 +00:00
For a lattice with dimensions m x n, all paths will have m + n segments. m segments go down, n segments go right. To count m + n slots, count the ways to pick m downward moves - the rest will be rightward moves.
2024-10-09 17:02:42 +00:00
<br><br>
2024-10-09 17:02:38 +00:00
2024-10-09 17:02:42 +00:00
<img src="https://latex.codecogs.com/svg.image?{m&space;&plus;&space;n&space;\choose&space;m}&space;=&space;{m&space;&plus;&space;n&space;\choose&space;n}&space;=&space;\frac{(m&plus;n)!}{m!n!}" height="100">
#### LaTeX
2024-10-09 17:02:38 +00:00
```
{m + n \choose m} = {m + n \choose n} = \frac{(m+n)!}{m!n!}
```
2024-10-09 17:02:42 +00:00
</div>