日常学习笔记

SHA256


哈希是一种能将不同的输入映射为独一无二的定长字符串的算法,如果对于不同的输入,映射为同一字符串,则称之为哈希碰撞(collision).
对于哈希碰撞,我们可以记住这样一个公式

50%概率发生哈希碰撞的计算次数

    \[m =\sqrt{(\frac{\pi }{2}N)}\]

N为哈希值的二进制位数,对于 SHA256 来说,它会生成32字节,64长度的16进制字符串,256位(每个字符取值范围为[0-9a-z])

对于生日来说可以计算出它50%概率发生碰撞所需要的计算次数为23.9
同时也要记住另一个公式

哈希碰撞概率公式

    \[p(n,d)\approx 1 - e^{\frac{-n(n-1)}{2d}}\]

n为计算次数,d为取值空间,该公式推导过程中用到了泰勒公式e^x \approx 1+x

迪杰斯特拉算法


我们假设G中的每个顶点V都被赋予了一个标记L(V),它要么是一个数,要么是。假设PG的顶点的集合,P包含S,满足:

1)如果V属于P,则L(V)是从S到V的最短通路的长度,并且存在这样的从S到V的最短通路:通路上的顶点都在P中

2)如果V不属于P,则L(V)是从S到V的满足下面限制的最短通路的长度:V是通路中唯一一个不属于P的顶点。

先找出不在P中且带有最小标记的顶点U,标记为L(U), 可以证明从SU的最短通路中除U外不包含不属于P的元素。

因为若存在除U外其他顶点,先假如果最短通路U前最后一个点为Q且不属于P ,则最短通路为SP1P2...PnQU(P1,P2..Pn属于P,Q不属于P),则由性质2)最短通路长度为L(Q)+PATH(Q,U)>L(U)

从而大于SP1P2..PnU的通路长度L(U),不是最短通路,所以从S到U的最短通路中除U外不包含不属于P的元素,从而从S到U的最短通路长度由L(U)给出.

以上证明了最短路终点的前一个顶点一定属于P

日常学习笔记》有92个想法

  1. aredaby说:

    Internet casinos can offer a lot of fun, big payouts and exclusive promotions, but you have to be sure that online casino real money games are secure and reliable.
    free deposit casino Of course, such as large number of unhappy gamblers is a cause for concern, especially when players claim to have had their winnings confiscated and their accounts blocked for various reasons.

  2. journe说:

    However, the practice of plagiarizing by use of sufficient word substitutions to elude detection software, known as rogeting, has rapidly evolved as students and unethical academics seek to stay ahead of detection software.
    paper writer While writing on laminate is a bit more difficult compared to uncoated paper labels, they allow for a range of label applications that can help you make your products look more professional, more attractive, and markedly custom.

  3. oscing说:

    List of good topics to write a satirical essay essay on environment pollution in nepali, writing summary and response essays ucf essay prompt 2019 simple essay on doctor in hindi ucf essay prompt 2019 best sample argumentative essay. paper writing service The reason behind doing this is that they believe that by having affordable services, they open a broader gateway for helping a full spectrum of students as compared to if their prices were high.

  4. fluinge说:

    Written assignments may come with the serious challenges, and sometimes only trained academic essay authors or expert college admission essay writers can nail them. write my paper for me Another way academic assistance companies can guarantee your originality is by double-checking your assignments for plagiarism before delivering them to you.

  5. Bligma说:

    How to cite an interview in essay essay on my hobby cricket for class 1 essay on pollution problem with headings what colleges require sat essay in california. custom paper Our service understand this concern and so we have kept our prices at a range that is affordable for clients who are looking for online guidance regarding writing their report.

  6. LonyVoxy说:

    A second major point is that we essentialy give international students an opportunity to buy essay papers online cheap and make it as easy as possible to communicate with and the process of ordering is not time consuming at all. paper writer Being into the professional writing industry for years has made the idea about guidelines followed by different universities and colleges clear to them.

  7. bureMelf说:

    Overcompression gives the impression that he wants to assert that they are imitators of images of virtue, but this cannot be the sense of the passage, cf. hearthealthheroes Have them persevere in prayer, fasting, and conversion and have them wait with patience for the realization of my promise.

  8. inquito说:

    For the biggest benefit it is advised you join the complete programme, but of course it is also possible to join a single class. saqacommunity If, for example, the scooter is running too lean, it will not only start heavier, but a rotary hole may also occur alternately from the partial load to the full load range.

  9. bureMelf说:

    Sei es, weil es wieder mal schnell gehen muss, weil es eben bequem ist – oder einfach, weil es alle tun. frontechnigeria But what starts out as a playful game between two best friends turns into something infinitely more complicated, as just-for-show kisses begin to stir up forbidden feelings.

  10. Avoips说:

    Also, color or color combinations of the products might be a little bit different due to screen resolution or product photography. gmcourseonline So yes, your question was correct, but your students are trying hard to please you in every possible way.

  11. ontobaf说:

    A registered dietitian can repair you yearbook your chimerical foods in a initialled eruption too to boot plan. hearthealthheroes The coming week sees a special session in the club for all team mentors to build further on the strong training and development programmes evident across all age groups in the club.

  12. a course in miracles说:

    Thanks for sharing superb informations. Your web site is so cool. I’m impressed by the details that you have on this blog. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and simply couldn’t come across. What a great website.

  13. acim online retreat说:

    Thank you for sharing superb informations. Your site is very cool. I’m impressed by the details that you have on this web site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found just the information I already searched everywhere and just couldn’t come across. What a perfect website.

  14. Boadly说:

    Tadalafil nao e viciante. Ao comprar Cialis pode utiliza-lo em uma base diaria, entao voce pode estar alerta a qualquer momento. buy cialis online generic The similarity of the mechanisms of regulation of blood flow in the pelvic area in men and women allows the use of generic Tadalafil for women is more effective than gels or ointments, artificially increasing the sensitivity of the female genitals.

  15. TedJaild说:

    [url=https://kamagratb.com/]kamagra online usa[/url] [url=https://doxycycline36.com/]buy doxycycline[/url] [url=https://amoxicillinz.com/]amoxicillin 500mg[/url] [url=https://erythromycinz.com/]buy erythromycin[/url] [url=https://atorvastatin.us.com/]lipitor cost in india[/url] [url=https://chloroquine.us.com/]chloroquine for coronavirus[/url]

  16. TedJaild说:

    [url=https://levitra36.com/]levitra online[/url] [url=https://chloroquine.us.com/]chloroquine tab[/url] [url=https://singulair.us.org/]generic singulair[/url] [url=https://doxycycline36.com/]doxycycline 100mg[/url] [url=https://baclofen24.com/]baclofen 159[/url]

  17. YonJaild说:

    [url=https://tadalafilsale.com/]tadalafil prices 5mg[/url] [url=https://avanatop.com/]avana tablet[/url] [url=https://atorvastatin.us.com/]buy lipitor[/url] [url=https://doxycycline36.com/]order doxycycline 100mg without prescription[/url] [url=https://priligytab.com/]buy priligy[/url] [url=https://kamagratb.com/]kamagra 100mg[/url]

  18. TedJaild说:

    [url=https://levitra36.com/]levitra online[/url] [url=https://singulair.us.org/]buy singulair[/url] [url=https://chloroquine.us.com/]chloroquine tablets[/url] [url=https://atorvastatin.us.com/]lipitor 20 mg generic[/url] [url=https://furosemidelasix.com/]furosemide 20 mg[/url] [url=https://erythromycinz.com/]erythromycin buy[/url] [url=https://dapoxetinetabs.com/]buy dapoxetine[/url]

  19. ZakJaild说:

    [url=https://buspar.us.com/]cost of buspar in canada[/url] [url=https://chloroquine.us.com/]can i buy chloroquine over the counter[/url] [url=https://clonidinenorx.com/]clonidine 0.6[/url] [url=https://celebrexcelecoxib.com/]celebrex uk cost[/url]

  20. BooJaild说:

    [url=http://doxycycline36.com/]buy doxycycline[/url] [url=http://celebrexcelecoxib.com/]celebrex 200 mg capsule[/url] [url=http://xenical24.com/]xenical 120mg online[/url] [url=http://levitra36.com/]levitra 20 mg tablet[/url] [url=http://kamagratb.com/]kamagra 100mg online india[/url] [url=http://dapoxetinetabs.com/]buy dapoxetine uk online[/url] [url=http://furosemidelasix.com/]buying furosemide online[/url] [url=http://cymbaltaduloxetine.com/]cymbalta cost generic[/url]

  21. TedJaild说:

    [url=https://amitriptyline365.com/]amitriptyline 10mg[/url] [url=https://avanatop.com/]buy avana online[/url] [url=https://amoxicillinz.com/]buy amoxicillin[/url] [url=https://tadalafilsale.com/]generic cialis tadalafil[/url]

  22. AshJaild说:

    [url=http://furosemidelasix.com/]furosemide 40[/url] [url=http://erythromycinz.com/]where to buy erythromycin[/url] [url=http://ciprofloxacin24.com/]ciprofloxacin 700 mg[/url] [url=http://kamagratb.com/]buy kamagra[/url] [url=http://celebrexcelecoxib.com/]cheapest generic celebrex[/url] [url=http://finpecia911.com/]buy finpecia[/url] [url=http://baclofen24.com/]buy baclofen[/url] [url=http://priligytab.com/]priligy for sale uk[/url]

发表评论

邮箱地址不会被公开。 必填项已用*标注