Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to calculate dis [I] [j] [u] in JavaScript

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "dis [I] [j] [u] how to calculate in JavaScript", so the editor summarizes the following contents, detailed contents, clear steps, and certain reference value. I hope you can get something after reading this article. Let's take a look at this "dis [I] [j] [u] how to calculate" article in JavaScript.

A look at the size of the data, n ≤ 12, decisive pressure.

Then to enumerate the starting point, set the dp state:

F [I] [j] = the minimum cost from I to j, where j is a binary number (expressed in decimal). The 1 and 0 of bit I indicate whether point I has been reached (1 indicates that it has been reached, 0 indicates that it has not been reached yet).

(because m is very large and n is very small, there will be multiple edges, so use the adjacency matrix (e [u] [v]))

As a result, the state transition equation can be listed:

F [I] [j] = min {f [I] [k] + diss [I] [k] [u] * e [u] [v]} (j & (1)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report