yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

🔢 Графы и алгоритм Дейкстры #математикаграф #математика


less than 1m read
·Nov 3, 2024

Представим себе, что у нас есть граф. А что такое граф? Это значит, что есть какие-то вершины, и эти вершины как-то соединены рёбрами. Какие-то вершины могут быть соединены, какие-то — нет.

Можете для простоты представлять себе, что вершина — это некий перекрёсток. Ну, а между перекрёстками протянуты улицы, которые соединяют эти перекрёстки, или, если вам так проще, города, которые соединены авиалиниями. Всё это примеры графов.

У каждого ребра есть свой вес. Весом может быть что угодно. В случае с нашим графом улицами это может быть длина этой самой улицы или время, за которое автомобиль проедет. Да, если мы говорим про задачу, которую решает наш навигатор — за кратчайшее время.

Если мы перевели задачу в сторону навигатора проехать из одной точки в другую, в случае с графом нам нужно найти кратчайший путь по этим рёбрам, учитывая веса соответствующих рёбер. Разумеется, просто перебор всех возможных путей — это совсем не оптимально.

А так или иначе, эти алгоритмы есть. Вот про алгоритм Дейкстры я сейчас и поговорю.

More Articles

View All
Warren Buffett: Why Gold is a Bad Investment
Okay, so it’s no secret that the United States, and frankly, the entire world is experiencing high levels of inflation that most countries around the world haven’t experienced in decades. You’re probably seeing this inflation, which refers to things that …
Simplifying rational expressions: common monomial factors | High School Math | Khan Academy
So, I have a rational expression here, and what my goal is, is to simplify it. But while I simplify it, I want to make the simplified expression be algebraically equivalent. So if there are certain x values that would make this thing undefined, then I hav…
The U.S. Economy Enters "The Most Dangerous Time" in History (Jamie Dimon Explains)
You said this may be the most dangerous time the world has seen in decades. Why do you think it’s the most dangerous time? Jamie Diamond, CEO of JP Morgan Chase, is one of the most revered bankers to have ever lived. And while you might say, “Well, come o…
Rational equations intro | Algebra 2 | Khan Academy
[Instructor] Let’s say we wanna solve the following equation for x. We have x plus one over nine minus x is equal to 2⁄3. Pause this video and see if you can try this before we work through it together. All right, now let’s work through this together. N…
Should I Die?
Someday, I will die. But should I? If I was offered a longer life, I would take that in a second. But how long is too long? Is death something I should deny forever, or is death and the role it plays in the universe something I am better off accepting? I …
Adding decimals with thousandths | Adding decimals | Grade 5 (TX TEKS) | Khan Academy
So what we have here are two questions where they’re asking us to add decimals. So pause this video and have a go at this before we do this together. All right, so let’s tackle this first question up here. What I like to do is line up these numbers based…