Prüfer Code

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 25

  • @racheld1090
    @racheld1090 7 лет назад +56

    In English:
    Hey guys, welcome to a new tutorial, this time we're talking about Prüfer sequences, specifically, how you go from a sequence to a tree, as well as get to a tree from a sequence. So this is an example that I've got: (5, 3, 5, 3, 5) And I'm gunna 'translate' this sequence into a tree. First step is to write down the vertices of the actual tree, (since there's 5 things in the Prüfer sequence, there'll be 5 + 2 = 7 vertices numbered from 1 to 7). Now I'll just mark the vertices that don't appear in the sequence.. 1,2,4,6,7. So then I CONNECT the first one in the sequence (5) with the minimum from the list of available vertices on top, then I'll mark that one, this time it's 1. So now vertices 1 and 5 are connected. Then I cross both 1 and 5 out. (from the top and the bottom list respectively). Now since the 5 appears again later in the sequence, I can't cross it out from the top. Then so I know 3 and 2 are connected (because 2 is the min from on top and 3 is the next number in the sequence) so I can cross both of those out. Now the three appears again later in the sequence (so I can't cross it out from the top)... Then 5 and 4, ... the 5 appears again later in the sequence, so now 3 and 6, I can cross both those out. So at this point I've already used the last three (3, 5, 5). (as in, (I think), they already appear in my drawing). So now 5 is the next number in the sequence and 3 is the minimum, so 3 and 5 are connected. Now there's two numbers left (5 and 7) so that means they are connected. That's the last step. So now we've drawn the tree. Now I'm gunna go from the tree to the sequence and this is relatively easy...

  • @alicefrommadworld
    @alicefrommadworld 10 лет назад +31

    This is funny, don't know a word in German but I get it thank you very much :D

  • @guru_laghima
    @guru_laghima 12 лет назад +3

    same here. more comprehensible then anything else on the internet. thanks

  • @AtanuShome
    @AtanuShome 9 лет назад +8

    Didn't understand a single word except prufer, yet understood the procedure :) Thanks. But please next time made videos in English.

    • @AtanuShome
      @AtanuShome 9 лет назад +1

      Szary Wilk yeah that could work too, but will take more time than learning prufer from books :)

  • @gauravmishra1935
    @gauravmishra1935 3 года назад

    Prufer code is 4541191 what will be it's tree structure

  • @hairlessstyle3489
    @hairlessstyle3489 11 месяцев назад

    super video danke dir

  • @MajorBreakfast
    @MajorBreakfast  12 лет назад +1

    cool :D

  • @TheKiraKnight
    @TheKiraKnight 11 лет назад

    ok i now understand most of it..i just have one question ...Why did you add 6 and 7? why not just 6 im bad in german so i dont understand for exemple if code vas 7778 woud i type 12345 above or 123456?

  • @jeffarends8843
    @jeffarends8843 11 лет назад

    The 6 and 7 are added because the prufer code can represent a tree on n nodes by a sequence of n-2 numbers. 7778 wouldn't exist as a prufer code, because it is only length 4 and so would represent a tree with 6 nodes. Modifying your code to be 777778, this tree would be on 8 nodes, and is actually a star with 7 as the internal node

  • @MysteryyXasn
    @MysteryyXasn 11 лет назад

    i dont speak german either, but i could understand (im dutch), danke schön! :D

  • @drusilla143
    @drusilla143 12 лет назад

    I don't speak German but it helped me anyways. Thanks!

  • @kemaltezerdilsiz4126
    @kemaltezerdilsiz4126 7 лет назад

    Danke, you are great at this, thank you!

  • @zzgkmzz
    @zzgkmzz 10 лет назад

    Explain me then please.

  • @EfiFemme01
    @EfiFemme01 12 лет назад

    thank you :)

  • @LeonhardMelzer
    @LeonhardMelzer 12 лет назад

    Yeah, habs verstanden! Danke dir!

  • @3a3HauKa
    @3a3HauKa 11 лет назад

    Vielen Dank! Sehr hilfreich.

  • @rafaniemczyk7634
    @rafaniemczyk7634 8 лет назад

    Danke my friends

  • @paidepk
    @paidepk 12 лет назад

    Danke schön

  • @tomekzet2047
    @tomekzet2047 9 лет назад

    danke schoen

  • @quirkyquester
    @quirkyquester 6 лет назад

    Danke Schoen!!

  • @ferfissimo
    @ferfissimo 10 лет назад

    Danke :D

  • @aaanldogan
    @aaanldogan 5 лет назад

    türkçe anlarsanıza olum ta