What is a Graph Data Structure? When to use it? How to easily visualize it?

  Рет қаралды 25,611

Jacob Sorber

Jacob Sorber

2 жыл бұрын

Patreon ➤ / jacobsorber
Courses ➤ jacobsorber.thinkific.com
Website ➤ www.jacobsorber.com
---
What is a Graph Data Structure? When to use it? How to easily visualize it? // Finally, we're talking about graphs. A lot of you have requested it. This is video one of probably 3 or 4 videos on graphs. Here, I give you an overview of graphs, which are kind-of like trees. I talk about directed and undirected graphs, and show you how to use dot (one of the graphiz tools) to easily visualize your graphs.
Related Videos:
Trees: • How to Implement a Tre...
More Data Structures: • Understanding and impl...
***
Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
More about me and what I do:
www.jacobsorber.com
people.cs.clemson.edu/~jsorber/
persist.cs.clemson.edu/
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [ / jacobsorber ]
Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

Пікірлер: 47
@user-ol4qd8nx2y
@user-ol4qd8nx2y 2 жыл бұрын
Excellent way to introduce the topic
@shaharamoyal976
@shaharamoyal976 2 жыл бұрын
Outstanding topic and outstanding teacher
@aakashs1806
@aakashs1806 20 күн бұрын
You can use adjaceny matrix (2d array) adjacency list, compact list for graph representation.
@laxmikantbotkewar4057
@laxmikantbotkewar4057 10 ай бұрын
Hey, I am working on a project related to AST so i wanted to know if there is a way or a tool to convert the AST dump to .dot ?
@brunooliveirasoares7489
@brunooliveirasoares7489 2 жыл бұрын
Nice topic Would it be suitable for creation of State Machines?
@IndronilBanerjee
@IndronilBanerjee 2 жыл бұрын
Thank you very much. Nice topic with beautiful example. Is it possible to dump the output into terminal (in a graphical form) like drawing boxes with curses/ncurses lib?
@JacobSorber
@JacobSorber 2 жыл бұрын
Yes, that would be doable, but also a lot more work, unless someone has written a nice library to do it. Let me know if you find one.
@IndronilBanerjee
@IndronilBanerjee 2 жыл бұрын
Sure, 🙏🏻
@seanlowe7443
@seanlowe7443 2 жыл бұрын
But can it output ASCII? That's the real question. Thank you for the refresher. Good content!
@sohamjobanputra2914
@sohamjobanputra2914 Жыл бұрын
I relly liked your chennal, please continue making videos, its really helpful and I genuinely loved the dot tool that you showed 😃, actually can you make a video that contains basic introductions to tools like that!!
@freezinfire
@freezinfire 2 жыл бұрын
Awesome.
@pierreabbat6157
@pierreabbat6157 2 жыл бұрын
Where do you get the "open" command? I'd have opened the pdf file with okular (which, when programming, I sometimes confuse with okteta).
@lauritzt
@lauritzt 2 жыл бұрын
On most Linux distributions you can use `xdg-open`.
@embeddedbastler6406
@embeddedbastler6406 2 жыл бұрын
@@lauritzt That's the answer. Thanks, this will come handy in future.
@not_ever
@not_ever 2 жыл бұрын
I think he might be on a Mac. As Lauritz Thomsen has said, you need to use xdg-open on Linux.
@not_ever
@not_ever 2 жыл бұрын
@Yusuf Kazi nice spot. I wasn't sure if he was just one of those people who rice their Linux box to look and feel like MacOS. I think I spend too much time on Reddit
@commitgit5889
@commitgit5889 2 жыл бұрын
Please do more tutorials on select and go over poll and epoll. There are not enough resources on these topics imo.
@jnecaise
@jnecaise 2 жыл бұрын
It's fine, Carry on...
@RobinLeGaming
@RobinLeGaming 2 жыл бұрын
The XAudio2 "audio graph" makes way more sense now O.O
@xwaazes6375
@xwaazes6375 2 жыл бұрын
Trees and linked lists are subsets of graphs?
@casperes0912
@casperes0912 2 жыл бұрын
Yes - sort of. We’d usually call them just trees or lists, but yes
@crusaderanimation6967
@crusaderanimation6967 2 жыл бұрын
Me: Searches for infroamtion about Graph D.S. for my interview. Jacob: Done film about it. Me: "A blessing from the lord !"... and Jacob.
@asnawineoazhar9823
@asnawineoazhar9823 Жыл бұрын
where can I get that shirt
@maveasna2096
@maveasna2096 2 жыл бұрын
លោកគ្រូខ្ញុំធ្លាប់បានរៀនអំពីវាដែរ តែអត់ប្រើនៅពេលណាទេ ពេលនេះបានដឹងហើយ។
@JacobSorber
@JacobSorber 2 жыл бұрын
ពេលនេ៖ ខ្ញុំសប្បាយនាស់ ប្រើច្រើន ចេ៖ច្រើន
@user-sl6gn1ss8p
@user-sl6gn1ss8p 2 жыл бұрын
poor yoda : (
@rarodish5358
@rarodish5358 2 жыл бұрын
Make a video about Linux/Crypto pleeeaase :)
@JacobSorber
@JacobSorber 2 жыл бұрын
Do you have a specific algorithm, cryptosystem, or use case in mind?
@eniolasonowo8945
@eniolasonowo8945 2 жыл бұрын
I started using the data structure for arbitrage, and it makes everything easy
@michaelespinoza4562
@michaelespinoza4562 2 жыл бұрын
Hello!!!
@JacobSorber
@JacobSorber 2 жыл бұрын
Hi.
@collinsa8909
@collinsa8909 2 жыл бұрын
Never seen a good book on it. It's a rarely used structure that's y major languages don't include it in their libraries
@MalamIbnMalam
@MalamIbnMalam 2 жыл бұрын
Rarely used? Graphs are used in social networking, computer networking, GPS systems for shortest path, etc
@user-ux2kk5vp7m
@user-ux2kk5vp7m 2 жыл бұрын
Trees and Linked Lists are also types of graphs
@MalamIbnMalam
@MalamIbnMalam 2 жыл бұрын
@@user-ux2kk5vp7m linked lists are similar in the fact that they have nodes and edges... However, linked lists are often a sequential data structure. Linked list traversals are often only done forwards(next) and backwards(prev).
@collinsa8909
@collinsa8909 2 жыл бұрын
@@MalamIbnMalam the examples you give are niche. Proving my point. Outside of these special cases, there is little need for them. Compared that the use cases for more general structures like lists,sets,maps. Again this is why most mainstream languages don't include them in their libraries.
@collinsa8909
@collinsa8909 2 жыл бұрын
@@user-ux2kk5vp7m without stretching the generalization, else we'll call lists and trees graphs without distinction.
@JonnyRobbie
@JonnyRobbie 2 жыл бұрын
"For a graph, there is not starting point..." ehh...that's a misleading at best and downright wrong and false at worst. The thing to realize is that trees **are** graphs. Tree **is** a type of directed graph. Every tree is a graph and not every graph is a tree. That means that a graph definitely can have a "starting point" - root - if we're talking about a tree.
@ryebr3ad
@ryebr3ad 2 жыл бұрын
The graph data structure doesn't have a known starting point
@JacobSorber
@JacobSorber 2 жыл бұрын
Sorry, if I confused you. My point is simply that if you give me a graph, and don't tell me anything about it...you don't, for example, tell me that it's a tree or a list (lists are specialized graphs, too), I can't just infer a starting point. So, yes, in special cases (like trees and lists) there can be a designated starting point, but the graph-ness of those special cases does not tell me what the starting point is.
@antonw8134
@antonw8134 2 жыл бұрын
It doesn’t sound like @JonnyRobbie is confused, they sound more upset that the term “starting point” has no definition in the language that defines graphs. Isn’t it true with graphs any node may be the starting point, so saying they don’t have a starting point isn’t completely true? ;^} Nice use of dot/graphviz though - it’s a great tool that helps students (and non-students) visualize the complexity of graphs and just about every other abstract data type.
@MalamIbnMalam
@MalamIbnMalam 2 жыл бұрын
@@ryebr3ad you mean root node
@MalamIbnMalam
@MalamIbnMalam 2 жыл бұрын
@@antonw8134 yes, on a graph, any node can be the starting point.
How different are C and C++? Can I still say C/C++?
10:25
Jacob Sorber
Рет қаралды 218 М.
How To Implement a Graph in C. (adjacency matrix version)
20:04
Jacob Sorber
Рет қаралды 45 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 4,9 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 46 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 32 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 14 МЛН
Graph Data Modeling Tips & Tricks
41:54
Neo4j
Рет қаралды 19 М.
GRAPH TERMINOLOGY & TYPES OF GRAPHS - DATA STRUCTURES
19:10
Sundeep Saradhi Kanthety
Рет қаралды 95 М.
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,3 МЛН
What's the Best Way to Copy a Struct in C and C++?
13:44
Jacob Sorber
Рет қаралды 33 М.
Introduction to Graph Theory: A Computer Science Perspective
16:26
The Simple Solution to Traffic
5:14
CGP Grey
Рет қаралды 38 МЛН
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 109 М.
I tried 10 code editors
10:28
Fireship
Рет қаралды 2,9 МЛН
What Browser to Use? About Browser Isolation
17:40
Rob Braxman Tech
Рет қаралды 130 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 4,9 МЛН