当前位置:网站首页>在线问题与离线问题
在线问题与离线问题
2022-07-06 05:58:00 【瞻邈】
1. 在线问题
决策时未掌握全部实例信息,已做的决策在更多信息呈现后不可更改。
2. 离线问题
实例在决策前全部已知的问题。
3. 在线算法
可以以序列化的方式一个个的处理输入,也就是说在开始时并不需要已经知道所有的输入。相对的,对于一个离线算法,在开始时就需要知道问题的所有输入数据,而且在解决一个问题后就要立即输出结果。例如,选择排序在排序前就需要知道所有待排序元素,然而插入排序就不必。
因为在线算法并不知道整个的输入,所以它被迫做出的选择最后可能会被证明不是最优的,对在线算法的研究主要集中在当前环境下怎么做出选择。对相同问题的在线算法和离线算法的对比分析形成了以上观点。如果想从其他角度了解在线算法可以看一下 流算法(关注精确呈现过去的输入所使用的内存的量),动态算法(关注维护一个在线输入的结果所需要的时间复杂度)和在线机器学习。
一个很好的展示在线算法概念的例子是加拿大旅行者问题,这个问题的目标是在一个有权图中以最小的代价到达一个目标节点,但这个有权图中有些边是不可靠的,可能已经被剔除。然而一个旅行者只有到某个边的一个端点时才能确定该边是否已经被移除了。最坏情况下,该问题会变得简单,即所有的不确定的边都被移除该问题将会变成通常的最短路径问题。
4. 离线算法
离线算法设计策略都是基于在执行算法前输入数据已知的基本假设,也就是说,对于一个离线算法,在开始时就需要知道问题的所有输入数据,而且在解决一个问题后就要立即输出结果,通常将这类具有问题完全信息前提下设计出的算法成为离线算法。
参考文献
边栏推荐
- 假设检验学习笔记
- How Huawei routers configure static routes
- 公司視頻加速播放
- Auto. JS learning notes 17: basic listening events and UI simple click event operations
- GTSAM中李群的运用
- ArcGIS application foundation 4 thematic map making
- Web service connector: Servlet
- 2022 software testing workflow to know
- How to use the container reflection method encapsulated by thinkphp5.1 in business code
- Seven imperceptible truths in software testing
猜你喜欢
如何在业务代码中使用 ThinkPHP5.1 封装的容器内反射方法
Processes and threads
GTSAM中李群的运用
授予渔,从0开始搭建一个自己想要的网页
[SQL Server fast track] - authentication and establishment and management of user accounts
[experience] install Visio on win11
Embedded point test of app
How Huawei routers configure static routes
LTE CSFB process
Download, install and use NVM of node, and related use of node and NRM
随机推荐
Request forwarding and redirection
The difference and usage between continue and break
IPv6 comprehensive experiment
Web服务连接器:Servlet
Cognitive introspection
Configuring OSPF GR features for Huawei devices
[ram IP] introduction and experiment of ram IP core
单元测试的意义
[happy Spring Festival] if you feel happy, dance
入侵检测领域数据集总结
Query the standard text code corresponding to a work center (s) in the production order
多线程应用的测试与调试
(5) Explanation of yolo-v3 core source code (3)
华为BFD的配置规范
Winter 2021 pat class B problem solution (C language)
J'ai un chaton.
OSPF configuration command of Huawei equipment
Function of contenttype
AUTOSAR from getting started to becoming proficient (10) - embedded S19 file analysis
[Jiudu OJ 08] simple search x