Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

情報処理工学04資料 /infoeng04

情報処理工学04資料 /infoeng04

Kazuhisa Fujita

October 06, 2022
Tweet

More Decks by Kazuhisa Fujita

Other Decks in Technology

Transcript

  1. ը૾ͷσδλϧԽͷྲྀΕ αϯϓϦϯά ྔࢠԽ ූ߸Խ      

             ྔࢠԽ "  ৭ͷೱ୶΋཭ࢄԽ͞ΕΔ ৭ͷೱ୶͸·ͩ࿈ଓ஋ ৔ॴ΋৭΋̎ਐ਺ʹͳΔ
  2. άϨʔεέʔϧը૾ͱ৭਺ • άϨʔεέʔϧը૾ • ޫͷ໌҉ʢೱ୶ʣͷΈදݱͰ͖Δը૾ɽ • ໌҉Λ཭ࢄ஋Ͱද͢ɽ • ըૉʹ͖ͭ৭ʢ໌҉ʣΛද͢਺஋Λ̍ͭ࣋ͭɽ •

    ըૉ஋ͱݺͿɽ • දݱͰ͖Δ৭͸ͷ΂͖৐ݸ͋Δɽ • ӈਤͷྫͰ͸ന͔Βࠇ·Ͱͷ৭Λɼ2! = 8৭Ͱ৭Λදݱ͍ͯ͠Δɽ ֊ௐάϨʔεέʔϧ ෼ׂʢ཭ࢄԽʣ ඞͣ͠΋̎ͷ΂͖৐ݸͰ͋Δඞཁ͸ͳ͍ɽ ͔͠͠ɼͷ΂͖৐͸ίϯϐϡʔλͱ૬ੑ ͕ྑ͍ͷͰ̎ͷ΂͖৐ݸʹ͍ͯ͠Δɽίϯ ϐϡʔλͰ͸਺஋Λਐ਺Ͱදݱ͠ͳ͚Ε ͹ͳΒͳ͍ɽਐ਺ͰදݱͰ͖Δ਺஋ͷ਺ ͸ͷܻ਺৐Ͱ͋Δɽͭ·Γɼըૉ஋Λ ਐ਺Ͱදݱ͢Δͱɼͷ΂͖৐छྨͷ৭Λ දݱͰ͖Δ͜ͱʹͳΔɽ
  3. άϨʔεέʔϧը૾ͱ৭਺ • άϨʔεέʔϧը૾ • දݱͰ͖Δ৭ͷ਺Λ֊ௐͱݺͿɽ • ৭දͤΔ৔߹ɼ֊ௐ • ৭දͤΔ৔߹ɼ֊ௐ •

    ֊ௐ͸ϏοτɾόΠτͰ΋දͤΔɽ͜Ε͸৭ͷྔࢠԽϏοτ਺Ͱ΋͋Δɽ • ֊ௐ2!֊ௐˠϏοτ • ֊ௐ2"֊ௐˠϏοτόΠτ ֊ௐάϨʔεέʔϧ ෼ׂʹ֊ௐˠϏοτ ྟচ޻ֶߨ࠲ҩ༻৘ใॲཧ޻ֶ   ͳƘ<…  ͸ ­ E  Ǒ×  ƤŠ c 2j "p : gfl p : hfl    2jG   Ȱ ȵ˵˜aJ0•a]K p  : ifm         ਐ਺ ࣮ࡍ͸ྔࢠԽϏοτ਺ΛܾΊ͔ͯΒ֊ௐ਺͕ܾ·Δɽ ྫ͑͹ྔࢠԽϏοτ਺͕Ϗοτͷ৔߹ɼܻͷਐ਺ Ͱըૉ஋Λද͔͢Βɼͷ৐ݸͷ৭Λද͢͜ͱ͕Ͱ͖ Δɽ͢ͳΘͪɼܻͷਐ਺ʢϏοτʣͰ͸֊ௐͷ৭ ͕දͤΔ͜ͱʹͳΔɽ
  4. άϨʔεέʔϧը૾ͱσʔλྔ • άϨʔεέʔϧը૾ͷσʔλྔ͸࣍ͷࣜͰද͞ΕΔɽ • ը૾ͷσʔλྔʹըૉ਺ Yըૉ͋ͨΓͷσʔλྔ • ըૉ͋ͨΓͷσʔλྔ͸֊ௐΛϏοτͰදͨ͠΋ͷʢྔࢠԽϏ οτ਺ʣʹͳΔɽ •

    ྫ͑͹ɼ֊ௐͷͱ͖ɼͭͷ৭Λਐ਺Ͱද͞ͳ͚Ε͹ͳΒͳ͍ɽ • छྨͷਐ਺Λ࡞ΔͨΊʹ͸ɼগͳ͘ͱ΋ਐ਺͸ܻͰͳ͚Ε͹ͳΒͳ ͍ɽ • Αͬͯɼ֊ௐͷ৭Λදݱ͢Δʹ͸Ϗοτͷσʔλྔ͕ඞཁͰ͋Δɽ • ͜Ε͸ɼ֊ௐΛͷO৐Ͱදͨ͠ͱ͖ͷOͱ౳͍͠ʢ֊ௐ2!֊ௐˠϏο τʣɽ • Լਤ͕৭ʢ֊ௐʣͰද͞ΕΔάϨʔεέʔϧը૾ͳΒ • 8×8×3 = 192Ϗοτ = 24όΠτ ըૉ਺ ըૉ͋ͨΓͷσʔλྔʢ֊ௐΛϏοτͰදͨ͠΋ͷʣ
  5. ԋश • ըૉ਺͕YͷϞϊΫϩը૾Λஈ֊ͷೱ౓Ͱදࣔ͢Δ ͨΊʹඞཁͳσʔλྔΛ౴͑Αɽͨͩ͠ɼѹॖ͸͍ͯ͠ͳ͍ͱ͢Δ ʢୈճࠃՈࢼݧվʣ  ըૉ਺Λܭࢉ͢Δɽ  Yըૉ ըૉ͋ͨΓͷσʔλྔΛܭࢉ͢Δɽ

    128 = 2"͔ͩΒ֊ௐͷ৭Λදݱ͢ΔͨΊʹ͸ϏοτඞཁͰ͋Δɽ ըૉ਺ͱըૉ͋ͨΓͷσʔλྔΛ͔͚Δɽ YϏοτ .Ϗοτ LόΠτ
  6. ԋश • നࠇࣸਅΛºըૉɼ֊ௐͷೱ୶ը૾ͱͯ͠ɼίϯ ϐϡʔλͷϝϞϦʹอଘ͍ͨ͠ɽѹॖͳͲͷॲཧΛߦΘͳ͍৔߹ɼ গͳ͘ͱ΋Կ,#ʢΩϩόΠτʣͷϝϞϦ༰ྔ͕ඞཁ͔ɽͨͩ͠ɼ ,##ͱ͢Δɽ ୈճ.&छ  ըૉ਺Λܭࢉ͢Δɽ 

    ૯ըૉ਺͸1024×1024ըૉͰ͋Δɽ͜͜Ͱ͸ֻ͚ࢉͷ··ʹ͓ͯ͘͠ɽ ըૉ͋ͨΓͷσʔλྔΛܭࢉ͢Δɽ 256 = 2#ͳͷͰɼ֊ௐͷ৭Λදݱ͢ΔͨΊʹ͸ϏοτඞཁͰ͋Δɽ ըૉ਺ͱըૉ͋ͨΓͷσʔλྔΛ͔͚Δɽ 1024×1024×8CJU= 1024×1024#= 1024,#
  7. 3(#Χϥʔը૾ͱ৭਺ • ੺ɼ྘ɼ੨ʢ3(#ʣͷ૊Έ߹ΘͤͰ৭Λදݱ͢Δɽ • 3 ( #ͦΕͧΕͷೱ୶Λ਺஋Ͱද͢ɽ • ֤৭ͷදݱͰ͖Δೱ୶ͷ਺Λ֊ௐͱݺͿɽ •

    3(#֤৭ͭͷೱ୶Ͱද͢ʢஈ֊Ͱද͢ʣͱ͖ɼ3(#ͦΕͧΕ֊ௐͰද ݱ͞Ε͍ͯΔͱ͍͏ɽ • Ұ෦ͷྫ֎Λআ͖ɼදݱͰ͖Δ৭͸ ֤৭ͷ֊ௐ ?ݸ͋Δɽ • 3(#ͦΕͧΕ֊ௐͰද͢৔߹ɼදݱͰ͖Δ৭਺͸ɼ • 8!৭ • 3(#ͦΕͧΕ֊ௐͰද͢৔߹ɼදݱͰ͖Δ৭਺͸ɼ • 256!໿ສ৭ 3(# ըૉΛ֦େ ʢ࣮ࡍʹσΟεϓϨΠ Λ֦େ͢Δͱ̍ըૉʹ ͖ͭ̏৭ݟ͑Δʣ
  8. 3(#Χϥʔը૾ͱ৭਺ • දݱͰ͖Δ৭਺͸ϏοτɾόΠτͰ΋දͤΔɽ • ͜Ε͸৭ͷྔࢠԽϏοτ਺Ͱ͋Δɽ • 8! = 2! !

    = 2$৭ˠϏοτ • 256! = 2# ! = 2%&৭ˠϏοτόΠτ • ৭਺͸༷ʑͳݴ͍ํ͕Ͱ͖Δɽ • 3(#ͦΕͧΕ৭ʢ֊ௐʣ • 3(#ͦΕͧΕϏοτ • ϏοτΧϥʔ • ৭3(# 3(# ըૉΛ֦େ ʢ࣮ࡍʹσΟεϓϨΠ Λ֦େ͢Δͱ̍ըૉʹ ͖ͭ̏৭ݟ͑Δʣ
  9. 3(#Χϥʔը૾ͱσʔλྔ • 3(#Χϥʔը૾ͷσʔλྔ͸ • ը૾ͷσʔλྔʹըૉ਺ Yըૉ͋ͨΓͷσʔλྔ • ըૉ͋ͨΓͷσʔλྔ͸3(#֤৭ͷ֊ௐ਺ΛϏοτͰදͨ͠΋ͷʢྔࢠ ԽϏοτ਺ʣͷ૯࿨ͳͷͰ •

    ը૾ͷσʔλྔʢϏοτʣʹըૉ਺ Y3(#֤৭ͷྔࢠԽϏοτ਺ͷ૯࿨ • 3(#֤৭ͷྔࢠԽϏοτ਺͕ಉ͡ͳΒ • ը૾ͷσʔλྔʢϏοτʣʹըૉ਺ Y3(#֤৭ͷྔࢠԽϏοτ਺ Y • ӈਤ͕৭Ͱද͞ΕΔը૾ͳΒ • YYϏοτόΠτ ըૉ਺ ըૉ͋ͨΓͷσʔλྔʢ֊ ௐΛϏοτͰදͨ͠΋ͷʣ 512 = 2! → 9Ϗοτ
  10. ը૾ͷछྨ • ϥελʔը૾ʢϐΫηϧը૾ʣ • զʑ͕ීஈͷੜ׆Ͱ৮ΕΔը૾ϑΝΠϧͷ΄ͱΜͲ͕ϥελʔը૾ɽ • ը૾ΛըૉʢϐΫηϧʣͰදݱ͢Δɽ • ը૾ॲཧͰऔΓѻ͏جຊతͳը૾ɽ •

    ֦େॖখ͢Δͱը૾͕ߥ͘ͳΔɽ • ϕΫλʔը૾ • ը૾Λ఺ͱͦΕΛ݁Ϳઢ΍໘ͷํఔࣜͷύϥϝλͰද͢ɽ • ֦େॖখΛͯ͠΋ը૾͕ߥ͘ͳΒͳ͍ɽ • ྫ͑͹ύϫʔϙΠϯτͷਤܗ
  11. ϥελʔը૾ͷϑΝΠϧܗࣜ • 8JOEPXT#JUNBQ CNQ ɼϏοτϚοϓ • جຊతʹແѹॖͰอଘ͢ΔͨΊɼϑΝΠϧαΠζ͕େ͖͘ͳΔɽ • +1&( +PJOU1IPUPHSBQIJD&YQFSUT(SPVQ

    ɼδΣʔϖά • ඇՄٯѹॖͷͨΊɼը૾͸ѹॖ͞Εͨݩը૾ΑΓը࣭͕ྼԽ͢Δɽ • ੩ࢭը૾ͷओྲྀͳը૾ܗࣜɽ • ࣗવը૾ͷه࿥ʹ޲͍͍ͯΔɽ • 1/( 1PSUBCMF/FUXPSL(SBQIJDT ɼϐϯά • ՄٯѹॖͷͨΊɼը૾͸ѹॖ͞Ε͍ͯΔ͕ը࣭ʹྼԽ͕ͳ͍ɽ • ಁա౓ͷ৘ใ΋อଘͰ͖Δɽ • (*'ɼΪϑ΋͘͠͸δϑ • ৭ҎԼͷը૾Λѻ͏͜ͱ͕Ͱ͖Δɽ • ՄٯѹॖͷͨΊɼը૾͸ѹॖ͞Ε͍ͯΔ͕ը࣭ʹྼԽ͕ͳ͍ɽ • ৭Ҏ্ͷ৭Λ࣋ͭը૾Λ(*'ʹม׵͢Δͱ৭ʹͳͬͯ͠·͏ͨΊɼ৭਺ͷࢹ఺Ͱ͸ ը࣭͕ྼԽ͢Δͱ͍͑Δɽ • Ξχϝʔγϣϯͷอଘ΋Ͱ͖Δɽ
  12. ಈըϑΝΠϧܗࣜ • .1&( NQH NQFH • ಈըΛѹॖͯ͠อଘ͢Δܗࣜɽ • ϏσΦ$%ͳͲͰར༻͞ΕΔɽ •

    .1&( • ςϨϏ์ૹɼ%7%ͳͲͷϏσΦίϯςϯπͳͲͷͰར༻͞ΕΔɽ • .1&( NQ • ௿଎ճઢ΍อଘྖҬͷগͳ͍ϋʔυ΢ΣΞͰ࢖༻ɽ