图表中的负边
图中负边的物理意义是什么,即当我们必须在现实世界编程中将边设为负时?
What is the physical significance of negative edges in a graph i.e when we have to put the edges negative in real world programming ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在现实世界的例子中,负边代表“损失”。现在我们举个例子:
如果您购买的商品有一定的价格。如果您从自己这边捐钱,那就意味着您正在损失一些钱,对吗?另一方面,现在如果你在市场上卖掉一些旧书并得到一些钱。现在这会增加你的钱数。因此,在现实生活中,第一种情况可以被视为 -ve 边缘权重,而后一种情况可以被视为 +ve 边缘权重。
Negetive edges represent "loss" in real world examples. Now lets take an example:
if you are purchasing an item that has some price. if you are giving money from your side that means you are losing some of your money right? now on the other hand if you sell some of your old books in the market and get some money. now this increases your money count. So, the first case can be considered as a -ve edge weight and the later case can be considered as a +ve edge weight in real life example.