Logic: The Most General Unifier

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • This is my second video on logic. I will be discussing unification and the algorithm for finding the Most General Unifier (MGU).

ความคิดเห็น • 54

  • @patricksteiner3859
    @patricksteiner3859 2 ปีที่แล้ว +12

    07:58 **Algorithm**:
    Scenario: [t/u] … Given two formulas `t` and `u` we want to know if they have a MGU.
    * Rule 1) if `f(t₁, …, tₙ)/f(u₁, …, uₙ)` (t and u are the same size)
    then `[t₁/u₁, …, tₙ/uₙ]` (break open the equation and compare).
    * Rule 2) if `g≠f` or `n≠m` in `f(t₁, …, tₙ)/g(u₁, …, uₘ)`
    then FAIL (→ no MGU exists).
    * Rule 3) if `X/X` (exactly the same)
    then remove (them from list) and continue.
    * Rule 4) if `X/f(t₁, …, tₙ)`
    then `f(t₁, …, tₙ)/X` (you can switch them around).
    * Rule 5) if `X ∉ (t₁, …, tₙ)` in `f(t₁, …, tₙ)/X`
    then replace `X` everywhere with `f(t₁, …, tₙ)` except in `f(t₁, …, tₙ)/X`.
    * Rule 6) if `X ∈ (t₁, …, tₙ)` in `f(t₁, …, tₙ)/X`
    then FAIL (→ no MGU exists).
    13:45 **Example**:
    - [t/u] = [ q(a, g(X,a), f(Y)) / q(a, g(f(b),a), X) ]
    - R1: [ a/a, g(X,a)/g(f(b),a), f(Y)/X ]
    - R2: [ g(X,a)/g(f(b),a), f(Y)/X ]
    - R1: [ X/f(b), a/a, f(Y)/X ]
    - R4: [ f(b)/X, a/a, f(Y)/X ]
    - R5: [ f(b)/X, a/a, f(Y)/f(b) ]
    - R3: [ f(b)/X, f(Y)/f(b) ]
    - R1: [ f(b)/X, Y/b ]
    - R4: [ f(b)/X, b/Y ]
    MGU = [ f(b)/X, b/Y ]

  • @junjieyang3444
    @junjieyang3444 4 ปีที่แล้ว

    Thank you so much! After listening your class, I can figure out the mgu and it's algorithm.

  • @soaringChris
    @soaringChris 8 ปีที่แล้ว +22

    Thank you so much! I am suffering in my Logics class at Uni because my professor is an utterly useless man. His English is extremely poor so all my brain power during his lectures is spent trying to decipher his words, all of his handouts are plagiarized Frankensteins of other textbooks. And he is never available for one-on-one meetings. Your videos are my only real hope of passing.

    • @noel2071
      @noel2071 3 ปีที่แล้ว +2

      have you passed it though?

    • @I3uzzzzzz
      @I3uzzzzzz 3 ปีที่แล้ว +3

      @@noel2071 he became homeless and died

  • @michaelNXT1
    @michaelNXT1 2 ปีที่แล้ว

    Clearest explanation I could find, thank you

  • @ZeekCannon
    @ZeekCannon 8 ปีที่แล้ว

    Loved this.

  • @ryanlarke2618
    @ryanlarke2618 10 ปีที่แล้ว

    Very useful. Well explained! Thanks alot :)

  • @baharehbadiei7698
    @baharehbadiei7698 4 ปีที่แล้ว

    Thanks a lot Raoul. Very helpful.

  • @shanzipanz
    @shanzipanz 10 ปีที่แล้ว

    This was very helpful! Thanks so much! :)

  • @dramalexi
    @dramalexi 8 ปีที่แล้ว

    Thats a very clear explanation how to use that algorithm.
    Now I must hope that my teacher will accept that notification.

  • @WGLYYL01
    @WGLYYL01 6 ปีที่แล้ว

    Much useful than the notes I got from lecturer, thanks

  • @lala-jy4kz
    @lala-jy4kz 4 ปีที่แล้ว

    Excellent introduction!

  • @user-il6ob8lw1m
    @user-il6ob8lw1m 7 ปีที่แล้ว

    Great explanation! Thanks

  • @ShaiTeller
    @ShaiTeller 8 ปีที่แล้ว

    Thanks a lot mate, really helpful.

  • @niheltouil7513
    @niheltouil7513 ปีที่แล้ว

    Thank you so much ! This is so very helpful

  • @luca8932
    @luca8932 4 หลายเดือนก่อน

    Thanks voor de uitleg!

  • @naharulhayat
    @naharulhayat 5 ปีที่แล้ว

    Thanks!...this is the best explanation

  • @wpunkthenry
    @wpunkthenry 5 ปีที่แล้ว

    Thank you Raoul!

  • @yunhanli8159
    @yunhanli8159 8 ปีที่แล้ว

    Good explanation, thank you

  • @RituRajdps
    @RituRajdps 7 ปีที่แล้ว

    thanx mate. that was really helpful

  • @uzoosiona1588
    @uzoosiona1588 8 ปีที่แล้ว

    thank you so much ....really helpful

  • @rhiran8924
    @rhiran8924 3 ปีที่แล้ว

    Please Keep posting more videos on logics.. ...

  • @kuzaxe
    @kuzaxe 7 ปีที่แล้ว

    Thanks Raoul!

  • @cpriyankara
    @cpriyankara 11 ปีที่แล้ว

    good explanation, thanks!

  • @gulshanjangid3470
    @gulshanjangid3470 5 ปีที่แล้ว

    Thanks mate using the algorithm slide for exam today :p

  • @somesanity1
    @somesanity1 11 ปีที่แล้ว +2

    omg this was so helpful THANK YOU the first two minutes made me understand after an hour of having no idea what the fuck my question meant.. lecturer didn't explain shit. you're awesome

  • @user-assia
    @user-assia 7 ปีที่แล้ว

    thank you that was very useful :)

  • @Benny1196
    @Benny1196 10 ปีที่แล้ว

    Thank you very much :)

  • @hariminggu7205
    @hariminggu7205 11 ปีที่แล้ว

    nice video, thank you so much, it's very helpful! :)

  • @fufuhu148
    @fufuhu148 7 ปีที่แล้ว

    very good

  • @harish261000
    @harish261000 9 ปีที่แล้ว

    good explanation

  • @giladeini
    @giladeini 8 ปีที่แล้ว

    thanks, was realy good

  • @radhouanebenbrahim1661
    @radhouanebenbrahim1661 8 ปีที่แล้ว

    thank you

  • @AwsomeAlligator
    @AwsomeAlligator 8 ปีที่แล้ว

    Thanks for the great explanation, but those unmatched parentheses are bothering my pseudo-ocd :D

  • @igniculus_
    @igniculus_ 6 ปีที่แล้ว +4

    *KEANU REEVES* teaching unification ... This should be fun ...

    • @SgtKanyo
      @SgtKanyo 5 ปีที่แล้ว

      Dude it's young Jake Gyllenhaal

  • @Poncholay
    @Poncholay 6 ปีที่แล้ว

    Saved me a headache

  • @DauphinetB
    @DauphinetB 5 ปีที่แล้ว

    GOD. FUCKING. BLESS YOU. YOU'VE SAVED MY ASS

  • @sriharshaananthoju8671
    @sriharshaananthoju8671 5 ปีที่แล้ว

    how did u replace f(y) with y and f(b) with b

  • @marshaul
    @marshaul 9 ปีที่แล้ว +1

    You might consider crossing your Zs. They look like 2s to me. =)

  • @ZeekCannon
    @ZeekCannon 8 ปีที่แล้ว +2

    At the very end, why did you swap y and b? I thought the rule only said you had to move function to left side.

    • @MagicTheGabriel
      @MagicTheGabriel 8 ปีที่แล้ว +1

      +Elijah Kohrt you have to move everything to the left side that is not a variable. and a and b are constants.

    • @dramalexi
      @dramalexi 8 ปีที่แล้ว

      +Elijah Kohrt
      Because you cannot just replace the b in f(b) with the y in [f(b) / x, y/b]
      You have to swap the b to the left side to [f(b) / x, b/y] before you can substitute. That is as I understood the algorithm.

    • @ZeekCannon
      @ZeekCannon 8 ปีที่แล้ว

      Yeah it's been a while, but I think I just didnt get that a and b were constants. Thanks. :)

  • @IslamHanafieh
    @IslamHanafieh 11 ปีที่แล้ว

    thanks for the nice video,
    but i still cant understand it !!
    in my book it says that if the first variable equals the second, there will be no MGU !!
    but in the second example you did that at 03:08 there was (a) at both of the tow formula !!
    here's some question i got at home exam, can you please help me with !!?
    1. f(g(w),h) , f(g(b),h).
    2. likes(r,t) , likes(t,r).
    3. shape(ball,round) , shape(Z,A).
    4. power(M,2) , power(N).
    5. div(X,7) , div(5,3).
    6. aunt(F,L) , aunt(Helen,helen)
    thanks

  • @xamidi
    @xamidi 5 หลายเดือนก่อน

    0:43 rightmost parenthesis is missing

  • @AntoniaIvanovaStorm
    @AntoniaIvanovaStorm 10 ปีที่แล้ว

    thanks hotty

    • @soccerfp
      @soccerfp 7 ปีที่แล้ว

      no problem

  • @drulee3000
    @drulee3000 8 ปีที่แล้ว

    At 19:45, why can you break open the f? Why is there no rule about that listed on the page of the algorithm (13:42) ? You said because (like first rule on 13:42) both are f and have the same size (=number of arguments). But does that "breaking up" only work with functions of 1 argument? You should say that. And put it on the page about the algorithm (13:42).

    • @ZeekCannon
      @ZeekCannon 8 ปีที่แล้ว

      +drulee3000 In general when people write x_1,... x_n, then when n=1, we just have x_1.
      So there is a rule listed.

  • @hakiterror9274
    @hakiterror9274 7 ปีที่แล้ว +1

    u look like tom odell lol

  • @savassemirli3539
    @savassemirli3539 5 ปีที่แล้ว

    OMG! I'm sorry but you sound EXACTLY like a young Walter Lewin! 🤩

  • @Stefan06091991
    @Stefan06091991 11 ปีที่แล้ว

    U are a champ! Our lecturer is useless, nowhere near as informative as this ...