hi David, I think (2,2) isn't a very interesting counter example,. if no loops and no multiple edges are allowed, the degree of a node must be less than the number of nodes,
@osgwow2 ай бұрын
Why don't we get this error on calculators? Is it because calculators don't store numbers?
@luckychouhan33935 ай бұрын
Would you tell me what books are behind you?
@Clarivex5 ай бұрын
You are THE GOAT
@foxypiratecove373505 ай бұрын
I've better for you: use the decimal standard module, with the Decimal class.
@oanafocsa1486 ай бұрын
This is great! Thank you very much!
@iharobalasimi6 ай бұрын
I really can't believe that there's such a function and it is standard.
@loki__5757 ай бұрын
I am working on a small project, was not sure how to go further your video helped a lot. Thanks man!
@pfaelzer22347 ай бұрын
Hi David, I am a bit surprised. In your video the nodes have labels (1,2,3, etc) but the python code has no such assignment. Is this a mistake on my part?
@gunternowak6028Ай бұрын
hi, the labels are per default equal to the node id, this is the number used when creating the node
@raghunathansundaresan10 ай бұрын
1:25 that's the exact same thing I also feel. That's why I'm here looking for this series.
@yevgen419510 ай бұрын
Amazing material!
@5thbatman11 ай бұрын
legend
@SSNewberry Жыл бұрын
I have it.
@komalaojas2560 Жыл бұрын
Awesomatic video
@igorgrischenko6518 Жыл бұрын
Hello. In case you're wondering, your face looks a lot like mine)
@CodeSolid Жыл бұрын
Another great video, well worth the time, thanks.
@CodeSolid Жыл бұрын
I enjoyed this quite a bit. I thought the Python could have been a bit more "dumbed down" to be more approachable for others (since you clearly are quite good at it), but that's a minor quibble. I was able to follow it. I also enjoyed the historical details, as another poster mentioned.
@galvanizedcorpse Жыл бұрын
noice, i've been obsessed trying to explain people how graphs are the epitome of real applications of maths, i'm an engineer so i couldn't are less about axioms and arbitrary mathematician tricks, your channel is a breath of fresh air, i only found idiots such as the sourcerer and other narcissists... thanks
@EsmaelM-ze8nk Жыл бұрын
Thank you so much
@louistiches4810 Жыл бұрын
Real Python is great!
@theencryptedpartition4633 Жыл бұрын
Euler was such a badass
@mmokhtabad Жыл бұрын
Nice, only if it was louder 😊
@EternalLoveAnkh Жыл бұрын
I have that book! Bought it several years ago. RJ
@ranvijaymehta Жыл бұрын
Wow ... thanks lot
@shoopddawhooped Жыл бұрын
Could you review Reinhard Diestel any edition ? Then it would be interesting to have a playlist of a Survey over course-required texts across the major Ivys / Polytechnics; book:101-class /per video, with comparison and wrap up at series end.
@souravdey1227 Жыл бұрын
Please continue Sir. Eventually if you can start a series on Directed Acyclic Graphs and Causal Calculus, I would be so happy.
@MobiusML11 Жыл бұрын
you seem a genuinly good person and mostly you are very clear. thank you david!
@lvyesem Жыл бұрын
Ctidp
@speakbaskar9620 Жыл бұрын
def radio_labeling(order, diameter): labels = [0] * order # Assign label 1 to vertex 0 labels[0] = 1 # Assign label 2 to the neighbors of vertex 0 for i in range(1, min(diameter + 1, order)): labels[i] = 2 # Assign labels to the remaining vertices for i in range(diameter + 1, order): # Check the labels of neighbors used_labels = set() for neighbor in range(i - diameter, i): used_labels.add(labels[neighbor]) # Find the smallest unused label j = 1 while j in used_labels: j += 1 # Assign the label to the current vertex labels[i] = j return labels # Example usage order = 10 # Number of vertices in the graph diameter = 3 # Diameter of the graph labels = radio_labeling(order, diameter) print(labels)
@speakbaskar9620 Жыл бұрын
Thank you for helping your video sir. Can you send me radio labeling algorithm using python ?
@Utb_h3 Жыл бұрын
Thank you for this serie can you do a video about finding cycles in graphs ?
@emmanuelonah4596 Жыл бұрын
The best video I have seen so far on graph representation in Python. Thank you!
@DavidAmos Жыл бұрын
Glad you enjoyed it!
@saicharanmarrivada5077 Жыл бұрын
Awesome video
@chobblegobbler6671 Жыл бұрын
Do visdcc plz
@dancollinsuk Жыл бұрын
Great series.. But please lose the music.. Ahhhhh
@DavidAmos Жыл бұрын
Thanks! Glad you like the series! Yeah... I will not have the music like this in future videos. I agree it's distracting. And I will have some more videos on graph theory soon!
@gregorymorse8423 Жыл бұрын
Actually comparison of floating point defaults linguistically to exact comparisons without tolerance. Comparing those is also interesting as NaN and even +/-zero must be checked first. Not to mention inequalities. What you are showing is inexact comparison which practically useful, it's way too misleading to say this is how to compare floats. In some contexts this method would cause a system failure. NASA won't be hiring you if you disregard exact comparison, needless to say
@Temulgeh Жыл бұрын
i find that i've actually never had to check equality of floats, except 0.f or 1.f when i know i just assigned it i try to keep as few floats in my code as possible for consistency
@emurphy42 Жыл бұрын
The other common way to deal with this is to not use floats, and instead use a type that basically avoids the base translation (accepting that it uses a bit more memory). Imagine using four bits per decimal digit (16 possible values, but only 10 used in practice). The actual implementation is no doubt more efficient, but this shows that it's at least possible.
@BW022 Жыл бұрын
Many languages have a currency type. Python has libraries to support it. Basically, it stores values as an integer (or 64-bit integer) in the currencies smallest form (i.e. cents) but displays as a floating point. $5.24 is just stored as a "524". Given that int64s can reach 9,223,372,036,854,775,807, that means you can still total, sum, multiply, etc. values equal to all the money on the planet, in cents.
@LettersAndNumbers300 Жыл бұрын
Such a mess!!
@CZghost Жыл бұрын
Try comparing 0.1 + 0.2 == 0.3 in C -> it returns true. :O So why C, which uses the very same IEEE 754 standard for floating point numbers, returns the correct answer, where Python, Javascript and other interpreted programming languages gossip?
@LettersAndNumbers300 Жыл бұрын
Because they suck!!
@pmnt_ Жыл бұрын
this could be due to compiler optimization. it might even the case that the compiler gets rid of the calculation completely and just writes the result into the executable. edit: compiler shenanigans aside, it also depends on the data type: C floats are 32 bit long, C doubles are 64 bit long (Python uses also 64bit floats). Using the 32bit version, it just happens that 0.1+0.2 is rounded to the same bit representation as 0.3, yielding true. Just because floating point equalities can fail, doesn't mean that they must fail. 0.1+0.2==0.3 is just an easy way to raise awareness for that issue (for doubles). A float version that fails is for example 0.1+0.6==0.7.
@ENMPM Жыл бұрын
really well explained and lots of new information for me, thanks a lot and keep up the good work! :)
@prosecshane Жыл бұрын
Awesome video! Quite interesting :) Really hope to see more of your videos!
@ChronicTHX Жыл бұрын
What about just using a real language ?
@Sealedaway Жыл бұрын
This is a problem with how floating point numbers work regardless of language. No matter which language you use, you’ll need to be aware of how that particular language deals with this quirk. So stop gatekeeping you absolute dork
@mahorlel Жыл бұрын
Just got it recommended, great content! Shame that you stopped making it
@DavidAmos Жыл бұрын
It is a shame... and I will be changing that soon!
@vinnieg6161 Жыл бұрын
If I found this on my own I would have indeed smashed my keyboard into my computer last time I compared something that I used .lower() on to something with a capital letter, took me an hour to find ='D
@gloriosatierra Жыл бұрын
◽️
@035_shubhamrai2 Жыл бұрын
Please can you recommend any book with only results, formulas and theorems on graph theory ?
@joaovaleriodesouzaneto8038 Жыл бұрын
Thanks, very very very goood!
@canaldofetrentin Жыл бұрын
hii, I am taking a graph course in my university and from now on I'm watching your videos to get along with python etc. I just would like to know why is it necessary to declare a variable in available_bridhes and iterate over it, like: available_bridges = [ bridge for bridge in bridges: ] not simply: available_bridges = [ for bridge in bridges ]